diff options
author | Tejun Heo <tj@kernel.org> | 2009-07-03 18:13:18 -0400 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2009-07-03 18:13:18 -0400 |
commit | c43768cbb7655ea5ff782ae250f6e2ef4297cf98 (patch) | |
tree | 3982e41dde3eecaa3739a5d1a8ed18d04bd74f01 /tools/perf/builtin-top.c | |
parent | 1a8dd307cc0a2119be4e578c517795464e6dabba (diff) | |
parent | 746a99a5af60ee676afa2ba469ccd1373493c7e7 (diff) |
Merge branch 'master' into for-next
Pull linus#master to merge PER_CPU_DEF_ATTRIBUTES and alpha build fix
changes. As alpha in percpu tree uses 'weak' attribute instead of
inline assembly, there's no need for __used attribute.
Conflicts:
arch/alpha/include/asm/percpu.h
arch/mn10300/kernel/vmlinux.lds.S
include/linux/percpu-defs.h
Diffstat (limited to 'tools/perf/builtin-top.c')
-rw-r--r-- | tools/perf/builtin-top.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c index 5352b5e352ed..cf0d21f1ae10 100644 --- a/tools/perf/builtin-top.c +++ b/tools/perf/builtin-top.c | |||
@@ -392,11 +392,11 @@ static void record_ip(u64 ip, int counter) | |||
392 | samples--; | 392 | samples--; |
393 | } | 393 | } |
394 | 394 | ||
395 | static void process_event(u64 ip, int counter) | 395 | static void process_event(u64 ip, int counter, int user) |
396 | { | 396 | { |
397 | samples++; | 397 | samples++; |
398 | 398 | ||
399 | if (ip < min_ip || ip > max_ip) { | 399 | if (user) { |
400 | userspace_samples++; | 400 | userspace_samples++; |
401 | return; | 401 | return; |
402 | } | 402 | } |
@@ -509,9 +509,10 @@ static void mmap_read_counter(struct mmap_data *md) | |||
509 | 509 | ||
510 | old += size; | 510 | old += size; |
511 | 511 | ||
512 | if (event->header.misc & PERF_EVENT_MISC_OVERFLOW) { | 512 | if (event->header.type == PERF_EVENT_SAMPLE) { |
513 | if (event->header.type & PERF_SAMPLE_IP) | 513 | int user = |
514 | process_event(event->ip.ip, md->counter); | 514 | (event->header.misc & PERF_EVENT_MISC_CPUMODE_MASK) == PERF_EVENT_MISC_USER; |
515 | process_event(event->ip.ip, md->counter, user); | ||
515 | } | 516 | } |
516 | } | 517 | } |
517 | 518 | ||