Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
8fb93313
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看板
提交
8fb93313
编写于
12月 23, 2008
作者:
I
Ingo Molnar
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
perfcounters: remove warnings
Impact: remove debug checks Signed-off-by:
N
Ingo Molnar
<
mingo@elte.hu
>
上级
94c46572
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
0 addition
and
19 deletion
+0
-19
arch/x86/kernel/cpu/perf_counter.c
arch/x86/kernel/cpu/perf_counter.c
+0
-7
include/linux/perf_counter.h
include/linux/perf_counter.h
+0
-4
kernel/perf_counter.c
kernel/perf_counter.c
+0
-8
未找到文件。
arch/x86/kernel/cpu/perf_counter.c
浏览文件 @
8fb93313
...
...
@@ -64,7 +64,6 @@ x86_perf_counter_update(struct perf_counter *counter,
{
u64
prev_raw_count
,
new_raw_count
,
delta
;
WARN_ON_ONCE
(
counter
->
state
!=
PERF_COUNTER_STATE_ACTIVE
);
/*
* Careful: an NMI might modify the previous counter value.
*
...
...
@@ -89,7 +88,6 @@ x86_perf_counter_update(struct perf_counter *counter,
* of the count, so we do that by clipping the delta to 32 bits:
*/
delta
=
(
u64
)(
u32
)((
s32
)
new_raw_count
-
(
s32
)
prev_raw_count
);
WARN_ON_ONCE
((
int
)
delta
<
0
);
atomic64_add
(
delta
,
&
counter
->
count
);
atomic64_sub
(
delta
,
&
hwc
->
period_left
);
...
...
@@ -193,7 +191,6 @@ __x86_perf_counter_disable(struct perf_counter *counter,
int
err
;
err
=
wrmsr_safe
(
hwc
->
config_base
+
idx
,
hwc
->
config
,
0
);
WARN_ON_ONCE
(
err
);
}
static
DEFINE_PER_CPU
(
u64
,
prev_left
[
MAX_HW_COUNTERS
]);
...
...
@@ -209,8 +206,6 @@ __hw_perf_counter_set_period(struct perf_counter *counter,
s32
left
=
atomic64_read
(
&
hwc
->
period_left
);
s32
period
=
hwc
->
irq_period
;
WARN_ON_ONCE
(
period
<=
0
);
/*
* If we are way outside a reasoable range then just skip forward:
*/
...
...
@@ -224,8 +219,6 @@ __hw_perf_counter_set_period(struct perf_counter *counter,
atomic64_set
(
&
hwc
->
period_left
,
left
);
}
WARN_ON_ONCE
(
left
<=
0
);
per_cpu
(
prev_left
[
idx
],
smp_processor_id
())
=
left
;
/*
...
...
include/linux/perf_counter.h
浏览文件 @
8fb93313
...
...
@@ -218,8 +218,6 @@ struct perf_cpu_context {
extern
int
perf_max_counters
;
#ifdef CONFIG_PERF_COUNTERS
extern
void
perf_counter_show
(
struct
perf_counter
*
counter
,
char
*
str
,
int
trace
);
extern
const
struct
hw_perf_counter_ops
*
hw_perf_counter_init
(
struct
perf_counter
*
counter
);
...
...
@@ -237,8 +235,6 @@ extern int perf_counter_task_enable(void);
#else
static
inline
void
perf_counter_show
(
struct
perf_counter
*
counter
,
char
*
str
,
int
trace
)
{
}
static
inline
void
perf_counter_task_sched_in
(
struct
task_struct
*
task
,
int
cpu
)
{
}
static
inline
void
perf_counter_task_sched_out
(
struct
task_struct
*
task
,
int
cpu
)
{
}
...
...
kernel/perf_counter.c
浏览文件 @
8fb93313
...
...
@@ -861,8 +861,6 @@ static void task_clock_perf_counter_update(struct perf_counter *counter)
atomic64_set
(
&
counter
->
hw
.
prev_count
,
now
);
delta
=
now
-
prev
;
if
(
WARN_ON_ONCE
(
delta
<
0
))
delta
=
0
;
atomic64_add
(
delta
,
&
counter
->
count
);
}
...
...
@@ -906,8 +904,6 @@ static void page_faults_perf_counter_update(struct perf_counter *counter)
atomic64_set
(
&
counter
->
hw
.
prev_count
,
now
);
delta
=
now
-
prev
;
if
(
WARN_ON_ONCE
(
delta
<
0
))
delta
=
0
;
atomic64_add
(
delta
,
&
counter
->
count
);
}
...
...
@@ -954,8 +950,6 @@ static void context_switches_perf_counter_update(struct perf_counter *counter)
atomic64_set
(
&
counter
->
hw
.
prev_count
,
now
);
delta
=
now
-
prev
;
if
(
WARN_ON_ONCE
(
delta
<
0
))
delta
=
0
;
atomic64_add
(
delta
,
&
counter
->
count
);
}
...
...
@@ -1000,8 +994,6 @@ static void cpu_migrations_perf_counter_update(struct perf_counter *counter)
atomic64_set
(
&
counter
->
hw
.
prev_count
,
now
);
delta
=
now
-
prev
;
if
(
WARN_ON_ONCE
(
delta
<
0
))
delta
=
0
;
atomic64_add
(
delta
,
&
counter
->
count
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录