diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-04-30 10:41:01 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-04-30 10:41:01 -0400 |
| commit | e0972916e8fe943f342b0dd1c9d43dbf5bc261c2 (patch) | |
| tree | 690c436f1f9b839c4ba34d17ab3efa63b97a2dce /include/uapi | |
| parent | 1f889ec62c3f0d8913f3c32f9aff2a1e15099346 (diff) | |
| parent | 5ac2b5c2721501a8f5c5e1cd4116cbc31ace6886 (diff) | |
Merge branch 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull perf updates from Ingo Molnar:
"Features:
- Add "uretprobes" - an optimization to uprobes, like kretprobes are
an optimization to kprobes. "perf probe -x file sym%return" now
works like kretprobes. By Oleg Nesterov.
- Introduce per core aggregation in 'perf stat', from Stephane
Eranian.
- Add memory profiling via PEBS, from Stephane Eranian.
- Event group view for 'annotate' in --stdio, --tui and --gtk, from
Namhyung Kim.
- Add support for AMD NB and L2I "uncore" counters, by Jacob Shin.
- Add Ivy Bridge-EP uncore support, by Zheng Yan
- IBM zEnterprise EC12 oprofile support patchlet from Robert Richter.
- Add perf test entries for checking breakpoint overflow signal
handler issues, from Jiri Olsa.
- Add perf test entry for for checking number of EXIT events, from
Namhyung Kim.
- Add perf test entries for checking --cpu in record and stat, from
Jiri Olsa.
- Introduce perf stat --repeat forever, from Frederik Deweerdt.
- Add --no-demangle to report/top, from Namhyung Kim.
- PowerPC fixes plus a couple of cleanups/optimizations in uprobes
and trace_uprobes, by Oleg Nesterov.
Various fixes and refactorings:
- Fix dependency of the python binding wrt libtraceevent, from
Naohiro Aota.
- Simplify some perf_evlist methods and to allow 'stat' to share code
with 'record' and 'trace', by Arnaldo Carvalho de Melo.
- Remove dead code in related to libtraceevent integration, from
Namhyung Kim.
- Revert "perf sched: Handle PERF_RECORD_EXIT events" to get 'perf
sched lat' back working, by Arnaldo Carvalho de Melo
- We don't use Newt anymore, just plain libslang, by Arnaldo Carvalho
de Melo.
- Kill a bunch of die() calls, from Namhyung Kim.
- Fix build on non-glibc systems due to libio.h absence, from Cody P
Schafer.
- Remove some perf_session and tracing dead code, from David Ahern.
- Honor parallel jobs, fix from Borislav Petkov
- Introduce tools/lib/lk library, initially just removing duplication
among tools/perf and tools/vm. from Borislav Petkov
... and many more I missed to list, see the shortlog and git log for
more details."
* 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (136 commits)
perf/x86/intel/P4: Robistify P4 PMU types
perf/x86/amd: Fix AMD NB and L2I "uncore" support
perf/x86/amd: Remove old-style NB counter support from perf_event_amd.c
perf/x86: Check all MSRs before passing hw check
perf/x86/amd: Add support for AMD NB and L2I "uncore" counters
perf/x86/intel: Add Ivy Bridge-EP uncore support
perf/x86/intel: Fix SNB-EP CBO and PCU uncore PMU filter management
perf/x86: Avoid kfree() in CPU_{STARTING,DYING}
uprobes/perf: Avoid perf_trace_buf_prepare/submit if ->perf_events is empty
uprobes/tracing: Don't pass addr=ip to perf_trace_buf_submit()
uprobes/tracing: Change create_trace_uprobe() to support uretprobes
uprobes/tracing: Make seq_printf() code uretprobe-friendly
uprobes/tracing: Make register_uprobe_event() paths uretprobe-friendly
uprobes/tracing: Make uprobe_{trace,perf}_print() uretprobe-friendly
uprobes/tracing: Introduce is_ret_probe() and uretprobe_dispatcher()
uprobes/tracing: Introduce uprobe_{trace,perf}_print() helpers
uprobes/tracing: Generalize struct uprobe_trace_entry_head
uprobes/tracing: Kill the pointless local_save_flags/preempt_count calls
uprobes/tracing: Kill the pointless seq_print_ip_sym() call
uprobes/tracing: Kill the pointless task_pt_regs() calls
...
Diffstat (limited to 'include/uapi')
| -rw-r--r-- | include/uapi/linux/perf_event.h | 71 |
1 files changed, 70 insertions, 1 deletions
diff --git a/include/uapi/linux/perf_event.h b/include/uapi/linux/perf_event.h index 9fa9c622a7f4..fb104e51496e 100644 --- a/include/uapi/linux/perf_event.h +++ b/include/uapi/linux/perf_event.h | |||
| @@ -132,8 +132,10 @@ enum perf_event_sample_format { | |||
| 132 | PERF_SAMPLE_BRANCH_STACK = 1U << 11, | 132 | PERF_SAMPLE_BRANCH_STACK = 1U << 11, |
| 133 | PERF_SAMPLE_REGS_USER = 1U << 12, | 133 | PERF_SAMPLE_REGS_USER = 1U << 12, |
| 134 | PERF_SAMPLE_STACK_USER = 1U << 13, | 134 | PERF_SAMPLE_STACK_USER = 1U << 13, |
| 135 | PERF_SAMPLE_WEIGHT = 1U << 14, | ||
| 136 | PERF_SAMPLE_DATA_SRC = 1U << 15, | ||
| 135 | 137 | ||
| 136 | PERF_SAMPLE_MAX = 1U << 14, /* non-ABI */ | 138 | PERF_SAMPLE_MAX = 1U << 16, /* non-ABI */ |
| 137 | }; | 139 | }; |
| 138 | 140 | ||
| 139 | /* | 141 | /* |
| @@ -443,6 +445,7 @@ struct perf_event_mmap_page { | |||
| 443 | #define PERF_RECORD_MISC_GUEST_KERNEL (4 << 0) | 445 | #define PERF_RECORD_MISC_GUEST_KERNEL (4 << 0) |
| 444 | #define PERF_RECORD_MISC_GUEST_USER (5 << 0) | 446 | #define PERF_RECORD_MISC_GUEST_USER (5 << 0) |
| 445 | 447 | ||
| 448 | #define PERF_RECORD_MISC_MMAP_DATA (1 << 13) | ||
| 446 | /* | 449 | /* |
| 447 | * Indicates that the content of PERF_SAMPLE_IP points to | 450 | * Indicates that the content of PERF_SAMPLE_IP points to |
| 448 | * the actual instruction that triggered the event. See also | 451 | * the actual instruction that triggered the event. See also |
| @@ -588,6 +591,9 @@ enum perf_event_type { | |||
| 588 | * { u64 size; | 591 | * { u64 size; |
| 589 | * char data[size]; | 592 | * char data[size]; |
| 590 | * u64 dyn_size; } && PERF_SAMPLE_STACK_USER | 593 | * u64 dyn_size; } && PERF_SAMPLE_STACK_USER |
| 594 | * | ||
| 595 | * { u64 weight; } && PERF_SAMPLE_WEIGHT | ||
| 596 | * { u64 data_src; } && PERF_SAMPLE_DATA_SRC | ||
| 591 | * }; | 597 | * }; |
| 592 | */ | 598 | */ |
| 593 | PERF_RECORD_SAMPLE = 9, | 599 | PERF_RECORD_SAMPLE = 9, |
| @@ -613,4 +619,67 @@ enum perf_callchain_context { | |||
| 613 | #define PERF_FLAG_FD_OUTPUT (1U << 1) | 619 | #define PERF_FLAG_FD_OUTPUT (1U << 1) |
| 614 | #define PERF_FLAG_PID_CGROUP (1U << 2) /* pid=cgroup id, per-cpu mode only */ | 620 | #define PERF_FLAG_PID_CGROUP (1U << 2) /* pid=cgroup id, per-cpu mode only */ |
| 615 | 621 | ||
| 622 | union perf_mem_data_src { | ||
| 623 | __u64 val; | ||
| 624 | struct { | ||
| 625 | __u64 mem_op:5, /* type of opcode */ | ||
| 626 | mem_lvl:14, /* memory hierarchy level */ | ||
| 627 | mem_snoop:5, /* snoop mode */ | ||
| 628 | mem_lock:2, /* lock instr */ | ||
| 629 | mem_dtlb:7, /* tlb access */ | ||
| 630 | mem_rsvd:31; | ||
| 631 | }; | ||
| 632 | }; | ||
| 633 | |||
| 634 | /* type of opcode (load/store/prefetch,code) */ | ||
| 635 | #define PERF_MEM_OP_NA 0x01 /* not available */ | ||
| 636 | #define PERF_MEM_OP_LOAD 0x02 /* load instruction */ | ||
| 637 | #define PERF_MEM_OP_STORE 0x04 /* store instruction */ | ||
| 638 | #define PERF_MEM_OP_PFETCH 0x08 /* prefetch */ | ||
| 639 | #define PERF_MEM_OP_EXEC 0x10 /* code (execution) */ | ||
| 640 | #define PERF_MEM_OP_SHIFT 0 | ||
| 641 | |||
| 642 | /* memory hierarchy (memory level, hit or miss) */ | ||
| 643 | #define PERF_MEM_LVL_NA 0x01 /* not available */ | ||
| 644 | #define PERF_MEM_LVL_HIT 0x02 /* hit level */ | ||
| 645 | #define PERF_MEM_LVL_MISS 0x04 /* miss level */ | ||
| 646 | #define PERF_MEM_LVL_L1 0x08 /* L1 */ | ||
| 647 | #define PERF_MEM_LVL_LFB 0x10 /* Line Fill Buffer */ | ||
| 648 | #define PERF_MEM_LVL_L2 0x20 /* L2 */ | ||
| 649 | #define PERF_MEM_LVL_L3 0x40 /* L3 */ | ||
| 650 | #define PERF_MEM_LVL_LOC_RAM 0x80 /* Local DRAM */ | ||
| 651 | #define PERF_MEM_LVL_REM_RAM1 0x100 /* Remote DRAM (1 hop) */ | ||
| 652 | #define PERF_MEM_LVL_REM_RAM2 0x200 /* Remote DRAM (2 hops) */ | ||
| 653 | #define PERF_MEM_LVL_REM_CCE1 0x400 /* Remote Cache (1 hop) */ | ||
| 654 | #define PERF_MEM_LVL_REM_CCE2 0x800 /* Remote Cache (2 hops) */ | ||
| 655 | #define PERF_MEM_LVL_IO 0x1000 /* I/O memory */ | ||
| 656 | #define PERF_MEM_LVL_UNC 0x2000 /* Uncached memory */ | ||
| 657 | #define PERF_MEM_LVL_SHIFT 5 | ||
| 658 | |||
| 659 | /* snoop mode */ | ||
| 660 | #define PERF_MEM_SNOOP_NA 0x01 /* not available */ | ||
| 661 | #define PERF_MEM_SNOOP_NONE 0x02 /* no snoop */ | ||
| 662 | #define PERF_MEM_SNOOP_HIT 0x04 /* snoop hit */ | ||
| 663 | #define PERF_MEM_SNOOP_MISS 0x08 /* snoop miss */ | ||
| 664 | #define PERF_MEM_SNOOP_HITM 0x10 /* snoop hit modified */ | ||
| 665 | #define PERF_MEM_SNOOP_SHIFT 19 | ||
| 666 | |||
| 667 | /* locked instruction */ | ||
| 668 | #define PERF_MEM_LOCK_NA 0x01 /* not available */ | ||
| 669 | #define PERF_MEM_LOCK_LOCKED 0x02 /* locked transaction */ | ||
| 670 | #define PERF_MEM_LOCK_SHIFT 24 | ||
| 671 | |||
| 672 | /* TLB access */ | ||
| 673 | #define PERF_MEM_TLB_NA 0x01 /* not available */ | ||
| 674 | #define PERF_MEM_TLB_HIT 0x02 /* hit level */ | ||
| 675 | #define PERF_MEM_TLB_MISS 0x04 /* miss level */ | ||
| 676 | #define PERF_MEM_TLB_L1 0x08 /* L1 */ | ||
| 677 | #define PERF_MEM_TLB_L2 0x10 /* L2 */ | ||
| 678 | #define PERF_MEM_TLB_WK 0x20 /* Hardware Walker*/ | ||
| 679 | #define PERF_MEM_TLB_OS 0x40 /* OS fault handler */ | ||
| 680 | #define PERF_MEM_TLB_SHIFT 26 | ||
| 681 | |||
| 682 | #define PERF_MEM_S(a, s) \ | ||
| 683 | (((u64)PERF_MEM_##a##_##s) << PERF_MEM_##a##_SHIFT) | ||
| 684 | |||
| 616 | #endif /* _UAPI_LINUX_PERF_EVENT_H */ | 685 | #endif /* _UAPI_LINUX_PERF_EVENT_H */ |
