Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
7671581f
R
raspberrypi-kernel
项目概览
openeuler
/
raspberrypi-kernel
通知
13
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
raspberrypi-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
7671581f
编写于
12月 17, 2008
作者:
I
Ingo Molnar
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
perfcounters: hw ops rename
Impact: rename field names Shorten them. Signed-off-by:
N
Ingo Molnar
<
mingo@elte.hu
>
上级
862a1a5f
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
31 addition
and
31 deletion
+31
-31
arch/x86/kernel/cpu/perf_counter.c
arch/x86/kernel/cpu/perf_counter.c
+3
-3
include/linux/perf_counter.h
include/linux/perf_counter.h
+3
-3
kernel/perf_counter.c
kernel/perf_counter.c
+25
-25
未找到文件。
arch/x86/kernel/cpu/perf_counter.c
浏览文件 @
7671581f
...
...
@@ -577,9 +577,9 @@ static void pmc_generic_read(struct perf_counter *counter)
}
static
const
struct
hw_perf_counter_ops
x86_perf_counter_ops
=
{
.
hw_perf_counter_
enable
=
pmc_generic_enable
,
.
hw_perf_counter_
disable
=
pmc_generic_disable
,
.
hw_perf_counter_
read
=
pmc_generic_read
,
.
enable
=
pmc_generic_enable
,
.
disable
=
pmc_generic_disable
,
.
read
=
pmc_generic_read
,
};
const
struct
hw_perf_counter_ops
*
...
...
include/linux/perf_counter.h
浏览文件 @
7671581f
...
...
@@ -128,9 +128,9 @@ struct perf_counter;
* struct hw_perf_counter_ops - performance counter hw ops
*/
struct
hw_perf_counter_ops
{
void
(
*
hw_perf_counter_enable
)
(
struct
perf_counter
*
counter
);
void
(
*
hw_perf_counter_disable
)
(
struct
perf_counter
*
counter
);
void
(
*
hw_perf_counter_read
)
(
struct
perf_counter
*
counter
);
void
(
*
enable
)
(
struct
perf_counter
*
counter
);
void
(
*
disable
)
(
struct
perf_counter
*
counter
);
void
(
*
read
)
(
struct
perf_counter
*
counter
);
};
/**
...
...
kernel/perf_counter.c
浏览文件 @
7671581f
...
...
@@ -109,7 +109,7 @@ static void __perf_counter_remove_from_context(void *info)
spin_lock_irqsave
(
&
ctx
->
lock
,
flags
);
if
(
counter
->
state
==
PERF_COUNTER_STATE_ACTIVE
)
{
counter
->
hw_ops
->
hw_perf_counter_
disable
(
counter
);
counter
->
hw_ops
->
disable
(
counter
);
counter
->
state
=
PERF_COUNTER_STATE_INACTIVE
;
ctx
->
nr_active
--
;
cpuctx
->
active_oncpu
--
;
...
...
@@ -226,7 +226,7 @@ static void __perf_install_in_context(void *info)
counter
->
oncpu
=
cpu
;
ctx
->
nr_active
++
;
cpuctx
->
active_oncpu
++
;
counter
->
hw_ops
->
hw_perf_counter_
enable
(
counter
);
counter
->
hw_ops
->
enable
(
counter
);
}
if
(
!
ctx
->
task
&&
cpuctx
->
max_pertask
)
...
...
@@ -297,7 +297,7 @@ counter_sched_out(struct perf_counter *counter,
if
(
counter
->
state
!=
PERF_COUNTER_STATE_ACTIVE
)
return
;
counter
->
hw_ops
->
hw_perf_counter_
disable
(
counter
);
counter
->
hw_ops
->
disable
(
counter
);
counter
->
state
=
PERF_COUNTER_STATE_INACTIVE
;
counter
->
oncpu
=
-
1
;
...
...
@@ -327,7 +327,7 @@ group_sched_out(struct perf_counter *group_counter,
*
* We stop each counter and update the counter value in counter->count.
*
* This does not protect us against NMI, but
hw_perf_counter_
disable()
* This does not protect us against NMI, but disable()
* sets the disabled bit in the control field of counter _before_
* accessing the counter control register. If a NMI hits, then it will
* not restart the counter.
...
...
@@ -359,7 +359,7 @@ counter_sched_in(struct perf_counter *counter,
if
(
counter
->
state
==
PERF_COUNTER_STATE_OFF
)
return
;
counter
->
hw_ops
->
hw_perf_counter_
enable
(
counter
);
counter
->
hw_ops
->
enable
(
counter
);
counter
->
state
=
PERF_COUNTER_STATE_ACTIVE
;
counter
->
oncpu
=
cpu
;
/* TODO: put 'cpu' into cpuctx->cpu */
...
...
@@ -395,7 +395,7 @@ group_sched_in(struct perf_counter *group_counter,
*
* We restore the counter value and then enable it.
*
* This does not protect us against NMI, but
hw_perf_counter_
enable()
* This does not protect us against NMI, but enable()
* sets the enabled bit in the control field of counter _before_
* accessing the counter control register. If a NMI hits, then it will
* keep the counter running.
...
...
@@ -537,11 +537,11 @@ void perf_counter_task_tick(struct task_struct *curr, int cpu)
/*
* Cross CPU call to read the hardware counter
*/
static
void
__
hw_perf_counter_
read
(
void
*
info
)
static
void
__read
(
void
*
info
)
{
struct
perf_counter
*
counter
=
info
;
counter
->
hw_ops
->
hw_perf_counter_
read
(
counter
);
counter
->
hw_ops
->
read
(
counter
);
}
static
u64
perf_counter_read
(
struct
perf_counter
*
counter
)
...
...
@@ -552,7 +552,7 @@ static u64 perf_counter_read(struct perf_counter *counter)
*/
if
(
counter
->
state
==
PERF_COUNTER_STATE_ACTIVE
)
{
smp_call_function_single
(
counter
->
oncpu
,
__
hw_perf_counter_
read
,
counter
,
1
);
__read
,
counter
,
1
);
}
return
atomic64_read
(
&
counter
->
count
);
...
...
@@ -855,9 +855,9 @@ static void cpu_clock_perf_counter_read(struct perf_counter *counter)
}
static
const
struct
hw_perf_counter_ops
perf_ops_cpu_clock
=
{
.
hw_perf_counter_
enable
=
cpu_clock_perf_counter_enable
,
.
hw_perf_counter_
disable
=
cpu_clock_perf_counter_disable
,
.
hw_perf_counter_
read
=
cpu_clock_perf_counter_read
,
.
enable
=
cpu_clock_perf_counter_enable
,
.
disable
=
cpu_clock_perf_counter_disable
,
.
read
=
cpu_clock_perf_counter_read
,
};
static
void
task_clock_perf_counter_update
(
struct
perf_counter
*
counter
)
...
...
@@ -891,9 +891,9 @@ static void task_clock_perf_counter_disable(struct perf_counter *counter)
}
static
const
struct
hw_perf_counter_ops
perf_ops_task_clock
=
{
.
hw_perf_counter_
enable
=
task_clock_perf_counter_enable
,
.
hw_perf_counter_
disable
=
task_clock_perf_counter_disable
,
.
hw_perf_counter_
read
=
task_clock_perf_counter_read
,
.
enable
=
task_clock_perf_counter_enable
,
.
disable
=
task_clock_perf_counter_disable
,
.
read
=
task_clock_perf_counter_read
,
};
static
u64
get_page_faults
(
void
)
...
...
@@ -937,9 +937,9 @@ static void page_faults_perf_counter_disable(struct perf_counter *counter)
}
static
const
struct
hw_perf_counter_ops
perf_ops_page_faults
=
{
.
hw_perf_counter_
enable
=
page_faults_perf_counter_enable
,
.
hw_perf_counter_
disable
=
page_faults_perf_counter_disable
,
.
hw_perf_counter_
read
=
page_faults_perf_counter_read
,
.
enable
=
page_faults_perf_counter_enable
,
.
disable
=
page_faults_perf_counter_disable
,
.
read
=
page_faults_perf_counter_read
,
};
static
u64
get_context_switches
(
void
)
...
...
@@ -983,9 +983,9 @@ static void context_switches_perf_counter_disable(struct perf_counter *counter)
}
static
const
struct
hw_perf_counter_ops
perf_ops_context_switches
=
{
.
hw_perf_counter_
enable
=
context_switches_perf_counter_enable
,
.
hw_perf_counter_
disable
=
context_switches_perf_counter_disable
,
.
hw_perf_counter_
read
=
context_switches_perf_counter_read
,
.
enable
=
context_switches_perf_counter_enable
,
.
disable
=
context_switches_perf_counter_disable
,
.
read
=
context_switches_perf_counter_read
,
};
static
inline
u64
get_cpu_migrations
(
void
)
...
...
@@ -1027,9 +1027,9 @@ static void cpu_migrations_perf_counter_disable(struct perf_counter *counter)
}
static
const
struct
hw_perf_counter_ops
perf_ops_cpu_migrations
=
{
.
hw_perf_counter_
enable
=
cpu_migrations_perf_counter_enable
,
.
hw_perf_counter_
disable
=
cpu_migrations_perf_counter_disable
,
.
hw_perf_counter_
read
=
cpu_migrations_perf_counter_read
,
.
enable
=
cpu_migrations_perf_counter_enable
,
.
disable
=
cpu_migrations_perf_counter_disable
,
.
read
=
cpu_migrations_perf_counter_read
,
};
static
const
struct
hw_perf_counter_ops
*
...
...
@@ -1283,7 +1283,7 @@ __perf_counter_exit_task(struct task_struct *child,
cpuctx
=
&
__get_cpu_var
(
perf_cpu_context
);
child_counter
->
hw_ops
->
hw_perf_counter_
disable
(
child_counter
);
child_counter
->
hw_ops
->
disable
(
child_counter
);
child_counter
->
state
=
PERF_COUNTER_STATE_INACTIVE
;
child_counter
->
oncpu
=
-
1
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录