Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
9cc96b0a
cloud-kernel
项目概览
openanolis
/
cloud-kernel
1 年多 前同步成功
通知
160
Star
36
Fork
7
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
10
列表
看板
标记
里程碑
合并请求
2
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
cloud-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
10
Issue
10
列表
看板
标记
里程碑
合并请求
2
合并请求
2
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
9cc96b0a
编写于
1月 06, 2016
作者:
I
Ingo Molnar
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'perf/urgent' into perf/core, to pick up fixes before applying new changes
Signed-off-by:
N
Ingo Molnar
<
mingo@kernel.org
>
上级
d64fe8e6
12ca6ad2
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
6 addition
and
29 deletion
+6
-29
kernel/events/core.c
kernel/events/core.c
+6
-29
未找到文件。
kernel/events/core.c
浏览文件 @
9cc96b0a
...
...
@@ -3136,15 +3136,16 @@ static int event_enable_on_exec(struct perf_event *event,
* Enable all of a task's events that have been marked enable-on-exec.
* This expects task == current.
*/
static
void
perf_event_enable_on_exec
(
struct
perf_event_context
*
ctx
)
static
void
perf_event_enable_on_exec
(
int
ctxn
)
{
struct
perf_event_context
*
clone_ctx
=
NULL
;
struct
perf_event_context
*
c
tx
,
*
c
lone_ctx
=
NULL
;
struct
perf_event
*
event
;
unsigned
long
flags
;
int
enabled
=
0
;
int
ret
;
local_irq_save
(
flags
);
ctx
=
current
->
perf_event_ctxp
[
ctxn
];
if
(
!
ctx
||
!
ctx
->
nr_events
)
goto
out
;
...
...
@@ -3187,17 +3188,11 @@ static void perf_event_enable_on_exec(struct perf_event_context *ctx)
void
perf_event_exec
(
void
)
{
struct
perf_event_context
*
ctx
;
int
ctxn
;
rcu_read_lock
();
for_each_task_context_nr
(
ctxn
)
{
ctx
=
current
->
perf_event_ctxp
[
ctxn
];
if
(
!
ctx
)
continue
;
perf_event_enable_on_exec
(
ctx
);
}
for_each_task_context_nr
(
ctxn
)
perf_event_enable_on_exec
(
ctxn
);
rcu_read_unlock
();
}
...
...
@@ -6465,9 +6460,6 @@ struct swevent_htable {
/* Recursion avoidance in each contexts */
int
recursion
[
PERF_NR_CONTEXTS
];
/* Keeps track of cpu being initialized/exited */
bool
online
;
};
static
DEFINE_PER_CPU
(
struct
swevent_htable
,
swevent_htable
);
...
...
@@ -6725,14 +6717,8 @@ static int perf_swevent_add(struct perf_event *event, int flags)
hwc
->
state
=
!
(
flags
&
PERF_EF_START
);
head
=
find_swevent_head
(
swhash
,
event
);
if
(
!
head
)
{
/*
* We can race with cpu hotplug code. Do not
* WARN if the cpu just got unplugged.
*/
WARN_ON_ONCE
(
swhash
->
online
);
if
(
WARN_ON_ONCE
(
!
head
))
return
-
EINVAL
;
}
hlist_add_head_rcu
(
&
event
->
hlist_entry
,
head
);
perf_event_update_userpage
(
event
);
...
...
@@ -6800,7 +6786,6 @@ static int swevent_hlist_get_cpu(struct perf_event *event, int cpu)
int
err
=
0
;
mutex_lock
(
&
swhash
->
hlist_mutex
);
if
(
!
swevent_hlist_deref
(
swhash
)
&&
cpu_online
(
cpu
))
{
struct
swevent_hlist
*
hlist
;
...
...
@@ -9263,7 +9248,6 @@ static void perf_event_init_cpu(int cpu)
struct
swevent_htable
*
swhash
=
&
per_cpu
(
swevent_htable
,
cpu
);
mutex_lock
(
&
swhash
->
hlist_mutex
);
swhash
->
online
=
true
;
if
(
swhash
->
hlist_refcount
>
0
)
{
struct
swevent_hlist
*
hlist
;
...
...
@@ -9305,14 +9289,7 @@ static void perf_event_exit_cpu_context(int cpu)
static
void
perf_event_exit_cpu
(
int
cpu
)
{
struct
swevent_htable
*
swhash
=
&
per_cpu
(
swevent_htable
,
cpu
);
perf_event_exit_cpu_context
(
cpu
);
mutex_lock
(
&
swhash
->
hlist_mutex
);
swhash
->
online
=
false
;
swevent_hlist_release
(
swhash
);
mutex_unlock
(
&
swhash
->
hlist_mutex
);
}
#else
static
inline
void
perf_event_exit_cpu
(
int
cpu
)
{
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录