diff options
Diffstat (limited to 'tools/perf/builtin-sched.c')
| -rw-r--r-- | tools/perf/builtin-sched.c | 34 |
1 files changed, 4 insertions, 30 deletions
diff --git a/tools/perf/builtin-sched.c b/tools/perf/builtin-sched.c index ea9c15c0cdfe..4470f2535706 100644 --- a/tools/perf/builtin-sched.c +++ b/tools/perf/builtin-sched.c | |||
| @@ -1544,16 +1544,15 @@ process_raw_event(event_t *raw_event __used, void *more_data, | |||
| 1544 | static int | 1544 | static int |
| 1545 | process_sample_event(event_t *event, unsigned long offset, unsigned long head) | 1545 | process_sample_event(event_t *event, unsigned long offset, unsigned long head) |
| 1546 | { | 1546 | { |
| 1547 | char level; | ||
| 1548 | int show = 0; | ||
| 1549 | struct dso *dso = NULL; | ||
| 1550 | struct thread *thread; | 1547 | struct thread *thread; |
| 1551 | u64 ip = event->ip.ip; | 1548 | u64 ip = event->ip.ip; |
| 1552 | u64 timestamp = -1; | 1549 | u64 timestamp = -1; |
| 1553 | u32 cpu = -1; | 1550 | u32 cpu = -1; |
| 1554 | u64 period = 1; | 1551 | u64 period = 1; |
| 1555 | void *more_data = event->ip.__more_data; | 1552 | void *more_data = event->ip.__more_data; |
| 1556 | int cpumode; | 1553 | |
| 1554 | if (!(sample_type & PERF_SAMPLE_RAW)) | ||
| 1555 | return 0; | ||
| 1557 | 1556 | ||
| 1558 | thread = threads__findnew(event->ip.pid, &threads, &last_match); | 1557 | thread = threads__findnew(event->ip.pid, &threads, &last_match); |
| 1559 | 1558 | ||
| @@ -1589,32 +1588,7 @@ process_sample_event(event_t *event, unsigned long offset, unsigned long head) | |||
| 1589 | return -1; | 1588 | return -1; |
| 1590 | } | 1589 | } |
| 1591 | 1590 | ||
| 1592 | cpumode = event->header.misc & PERF_RECORD_MISC_CPUMODE_MASK; | 1591 | process_raw_event(event, more_data, cpu, timestamp, thread); |
| 1593 | |||
| 1594 | if (cpumode == PERF_RECORD_MISC_KERNEL) { | ||
| 1595 | show = SHOW_KERNEL; | ||
| 1596 | level = 'k'; | ||
| 1597 | |||
| 1598 | dso = kernel_dso; | ||
| 1599 | |||
| 1600 | dump_printf(" ...... dso: %s\n", dso->name); | ||
| 1601 | |||
| 1602 | } else if (cpumode == PERF_RECORD_MISC_USER) { | ||
| 1603 | |||
| 1604 | show = SHOW_USER; | ||
| 1605 | level = '.'; | ||
| 1606 | |||
| 1607 | } else { | ||
| 1608 | show = SHOW_HV; | ||
| 1609 | level = 'H'; | ||
| 1610 | |||
| 1611 | dso = hypervisor_dso; | ||
| 1612 | |||
| 1613 | dump_printf(" ...... dso: [hypervisor]\n"); | ||
| 1614 | } | ||
| 1615 | |||
| 1616 | if (sample_type & PERF_SAMPLE_RAW) | ||
| 1617 | process_raw_event(event, more_data, cpu, timestamp, thread); | ||
| 1618 | 1592 | ||
| 1619 | return 0; | 1593 | return 0; |
| 1620 | } | 1594 | } |
