Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
8d3b9323
cloud-kernel
项目概览
openanolis
/
cloud-kernel
大约 1 年 前同步成功
通知
158
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
8d3b9323
编写于
4月 23, 2010
作者:
A
Avi Kivity
浏览文件
操作
浏览文件
下载
差异文件
Merge remote branch 'tip/perf/core'
Signed-off-by:
N
Avi Kivity
<
avi@redhat.com
>
上级
d1476937
6eca8cc3
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
23 addition
and
13 deletion
+23
-13
arch/x86/kernel/cpu/perf_event.c
arch/x86/kernel/cpu/perf_event.c
+14
-6
arch/x86/kvm/x86.c
arch/x86/kvm/x86.c
+4
-0
include/linux/perf_event.h
include/linux/perf_event.h
+4
-6
tools/perf/util/probe-event.c
tools/perf/util/probe-event.c
+1
-1
未找到文件。
arch/x86/kernel/cpu/perf_event.c
浏览文件 @
8d3b9323
...
...
@@ -1752,23 +1752,31 @@ void perf_arch_fetch_caller_regs(struct pt_regs *regs, unsigned long ip, int ski
unsigned
long
perf_instruction_pointer
(
struct
pt_regs
*
regs
)
{
unsigned
long
ip
;
if
(
perf_guest_cbs
&&
perf_guest_cbs
->
is_in_guest
())
ip
=
perf_guest_cbs
->
get_guest_ip
();
else
ip
=
instruction_pointer
(
regs
);
return
ip
;
}
unsigned
long
perf_misc_flags
(
struct
pt_regs
*
regs
)
{
int
misc
=
0
;
if
(
perf_guest_cbs
&&
perf_guest_cbs
->
is_in_guest
())
{
misc
|=
perf_guest_cbs
->
is_user_mode
()
?
PERF_RECORD_MISC_GUEST_USER
:
PERF_RECORD_MISC_GUEST_KERNEL
;
}
else
misc
|=
user_mode
(
regs
)
?
PERF_RECORD_MISC_USER
:
PERF_RECORD_MISC_KERNEL
;
if
(
perf_guest_cbs
->
is_user_mode
())
misc
|=
PERF_RECORD_MISC_GUEST_USER
;
else
misc
|=
PERF_RECORD_MISC_GUEST_KERNEL
;
}
else
{
if
(
user_mode
(
regs
))
misc
|=
PERF_RECORD_MISC_USER
;
else
misc
|=
PERF_RECORD_MISC_KERNEL
;
}
if
(
regs
->
flags
&
PERF_EFLAGS_EXACT
)
misc
|=
PERF_RECORD_MISC_EXACT
;
...
...
arch/x86/kvm/x86.c
浏览文件 @
8d3b9323
...
...
@@ -3965,16 +3965,20 @@ static int kvm_is_in_guest(void)
static
int
kvm_is_user_mode
(
void
)
{
int
user_mode
=
3
;
if
(
percpu_read
(
current_vcpu
))
user_mode
=
kvm_x86_ops
->
get_cpl
(
percpu_read
(
current_vcpu
));
return
user_mode
!=
0
;
}
static
unsigned
long
kvm_get_guest_ip
(
void
)
{
unsigned
long
ip
=
0
;
if
(
percpu_read
(
current_vcpu
))
ip
=
kvm_rip_read
(
percpu_read
(
current_vcpu
));
return
ip
;
}
...
...
include/linux/perf_event.h
浏览文件 @
8d3b9323
...
...
@@ -941,10 +941,8 @@ static inline void perf_event_mmap(struct vm_area_struct *vma)
}
extern
struct
perf_guest_info_callbacks
*
perf_guest_cbs
;
extern
int
perf_register_guest_info_callbacks
(
struct
perf_guest_info_callbacks
*
);
extern
int
perf_unregister_guest_info_callbacks
(
struct
perf_guest_info_callbacks
*
);
extern
int
perf_register_guest_info_callbacks
(
struct
perf_guest_info_callbacks
*
callbacks
);
extern
int
perf_unregister_guest_info_callbacks
(
struct
perf_guest_info_callbacks
*
callbacks
);
extern
void
perf_event_comm
(
struct
task_struct
*
tsk
);
extern
void
perf_event_fork
(
struct
task_struct
*
tsk
);
...
...
@@ -1016,9 +1014,9 @@ static inline void
perf_bp_event
(
struct
perf_event
*
event
,
void
*
data
)
{
}
static
inline
int
perf_register_guest_info_callbacks
(
struct
perf_guest_info_callbacks
*
)
{
return
0
;
}
(
struct
perf_guest_info_callbacks
*
callbacks
)
{
return
0
;
}
static
inline
int
perf_unregister_guest_info_callbacks
(
struct
perf_guest_info_callbacks
*
)
{
return
0
;
}
(
struct
perf_guest_info_callbacks
*
callbacks
)
{
return
0
;
}
static
inline
void
perf_event_mmap
(
struct
vm_area_struct
*
vma
)
{
}
static
inline
void
perf_event_comm
(
struct
task_struct
*
tsk
)
{
}
...
...
tools/perf/util/probe-event.c
浏览文件 @
8d3b9323
...
...
@@ -1263,7 +1263,7 @@ static struct strlist *get_kprobe_trace_event_names(int fd, bool include_group)
static
int
write_kprobe_trace_event
(
int
fd
,
struct
kprobe_trace_event
*
tev
)
{
int
ret
;
int
ret
=
0
;
char
*
buf
=
synthesize_kprobe_trace_command
(
tev
);
if
(
!
buf
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录