perf: 'perf kvm' tool for monitoring guest performance from host
Here is the patch of userspace perf tool. Signed-off-by: Zhang Yanmin <yanmin_zhang@linux.intel.com> Signed-off-by: Avi Kivity <avi@redhat.com>
This commit is contained in:
committed by
Avi Kivity
parent
ff9d07a0e7
commit
a1645ce12a
@@ -351,6 +351,7 @@ static void __print_result(struct rb_root *root, struct perf_session *session,
|
||||
int n_lines, int is_caller)
|
||||
{
|
||||
struct rb_node *next;
|
||||
struct kernel_info *kerninfo;
|
||||
|
||||
printf("%.102s\n", graph_dotted_line);
|
||||
printf(" %-34s |", is_caller ? "Callsite": "Alloc Ptr");
|
||||
@@ -359,10 +360,16 @@ static void __print_result(struct rb_root *root, struct perf_session *session,
|
||||
|
||||
next = rb_first(root);
|
||||
|
||||
kerninfo = kerninfo__findhost(&session->kerninfo_root);
|
||||
if (!kerninfo) {
|
||||
pr_err("__print_result: couldn't find kernel information\n");
|
||||
return;
|
||||
}
|
||||
while (next && n_lines--) {
|
||||
struct alloc_stat *data = rb_entry(next, struct alloc_stat,
|
||||
node);
|
||||
struct symbol *sym = NULL;
|
||||
struct map_groups *kmaps = &kerninfo->kmaps;
|
||||
struct map *map;
|
||||
char buf[BUFSIZ];
|
||||
u64 addr;
|
||||
@@ -370,8 +377,8 @@ static void __print_result(struct rb_root *root, struct perf_session *session,
|
||||
if (is_caller) {
|
||||
addr = data->call_site;
|
||||
if (!raw_ip)
|
||||
sym = map_groups__find_function(&session->kmaps,
|
||||
addr, &map, NULL);
|
||||
sym = map_groups__find_function(kmaps, addr,
|
||||
&map, NULL);
|
||||
} else
|
||||
addr = data->ptr;
|
||||
|
||||
|
Reference in New Issue
Block a user