mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-10 07:00:48 +00:00
perf report: Display user/kernel differentiator
Before: 25.96% copy_user_generic_string 15.23% two_op 15.19% one_op 6.92% enough_duration 1.23% alloc_pages_current 1.14% acpi_os_read_port 1.08% _spin_lock After: 25.96% [k] copy_user_generic_string 15.23% [.] two_op 15.19% [.] one_op 6.92% [.] enough_duration 1.23% [k] alloc_pages_current 1.14% [k] acpi_os_read_port 1.08% [k] _spin_lock The '[k]' differentiator is a quick clue that it's a kernel symbol, without having to bring in the full dso column. Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Mike Galbraith <efault@gmx.de> Cc: Paul Mackerras <paulus@samba.org> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> LKML-Reference: <new-submission> Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
parent
fc54db5105
commit
8edd4286f9
@ -504,7 +504,7 @@ sort__comm_print(FILE *fp, struct hist_entry *self)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static struct sort_entry sort_comm = {
|
static struct sort_entry sort_comm = {
|
||||||
.header = " Command",
|
.header = " Command",
|
||||||
.cmp = sort__comm_cmp,
|
.cmp = sort__comm_cmp,
|
||||||
.collapse = sort__comm_collapse,
|
.collapse = sort__comm_collapse,
|
||||||
.print = sort__comm_print,
|
.print = sort__comm_print,
|
||||||
@ -569,10 +569,12 @@ sort__sym_print(FILE *fp, struct hist_entry *self)
|
|||||||
if (verbose)
|
if (verbose)
|
||||||
ret += fprintf(fp, "%#018llx ", (__u64)self->ip);
|
ret += fprintf(fp, "%#018llx ", (__u64)self->ip);
|
||||||
|
|
||||||
if (self->sym)
|
if (self->sym) {
|
||||||
ret += fprintf(fp, "%s", self->sym->name);
|
ret += fprintf(fp, "[%c] %s",
|
||||||
else
|
self->dso == kernel_dso ? 'k' : '.', self->sym->name);
|
||||||
|
} else {
|
||||||
ret += fprintf(fp, "%#016llx", (__u64)self->ip);
|
ret += fprintf(fp, "%#016llx", (__u64)self->ip);
|
||||||
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -586,9 +588,9 @@ static struct sort_entry sort_sym = {
|
|||||||
static int sort__need_collapse = 0;
|
static int sort__need_collapse = 0;
|
||||||
|
|
||||||
struct sort_dimension {
|
struct sort_dimension {
|
||||||
char *name;
|
char *name;
|
||||||
struct sort_entry *entry;
|
struct sort_entry *entry;
|
||||||
int taken;
|
int taken;
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct sort_dimension sort_dimensions[] = {
|
static struct sort_dimension sort_dimensions[] = {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user