diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-01-11 14:47:45 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-01-11 14:47:45 -0500 |
| commit | ddb321a8dd158520d97ed1cbade1d4ac36b6af31 (patch) | |
| tree | 842f5550c5947d4aebff56dcd1091950b0cc0f82 /include/linux | |
| parent | 1e6c3e8f8fb94a8914a380e02a7e8ad81d47273e (diff) | |
| parent | 5306c31c5733cb4a79cc002e0c3ad256fd439614 (diff) | |
Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull perf fixes from Ingo Molnar:
"Mostly tooling fixes, but also some kernel side fixes: uncore PMU
driver fix, user regs sampling fix and an instruction decoder fix that
unbreaks PEBS precise sampling"
* 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
perf/x86/uncore/hsw-ep: Handle systems with only two SBOXes
perf/x86_64: Improve user regs sampling
perf: Move task_pt_regs sampling into arch code
x86: Fix off-by-one in instruction decoder
perf hists browser: Fix segfault when showing callchain
perf callchain: Free callchains when hist entries are deleted
perf hists: Fix children sort key behavior
perf diff: Fix to sort by baseline field by default
perf list: Fix --raw-dump option
perf probe: Fix crash in dwarf_getcfi_elf
perf probe: Fix to fall back to find probe point in symbols
perf callchain: Append callchains only when requested
perf ui/tui: Print backtrace symbols when segfault occurs
perf report: Show progress bar for output resorting
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/perf_event.h | 12 | ||||
| -rw-r--r-- | include/linux/perf_regs.h | 16 |
2 files changed, 23 insertions, 5 deletions
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h index 486e84ccb1f9..4f7a61ca4b39 100644 --- a/include/linux/perf_event.h +++ b/include/linux/perf_event.h | |||
| @@ -79,11 +79,6 @@ struct perf_branch_stack { | |||
| 79 | struct perf_branch_entry entries[0]; | 79 | struct perf_branch_entry entries[0]; |
| 80 | }; | 80 | }; |
| 81 | 81 | ||
| 82 | struct perf_regs { | ||
| 83 | __u64 abi; | ||
| 84 | struct pt_regs *regs; | ||
| 85 | }; | ||
| 86 | |||
| 87 | struct task_struct; | 82 | struct task_struct; |
| 88 | 83 | ||
| 89 | /* | 84 | /* |
| @@ -610,7 +605,14 @@ struct perf_sample_data { | |||
| 610 | u32 reserved; | 605 | u32 reserved; |
| 611 | } cpu_entry; | 606 | } cpu_entry; |
| 612 | struct perf_callchain_entry *callchain; | 607 | struct perf_callchain_entry *callchain; |
| 608 | |||
| 609 | /* | ||
| 610 | * regs_user may point to task_pt_regs or to regs_user_copy, depending | ||
| 611 | * on arch details. | ||
| 612 | */ | ||
| 613 | struct perf_regs regs_user; | 613 | struct perf_regs regs_user; |
| 614 | struct pt_regs regs_user_copy; | ||
| 615 | |||
| 614 | struct perf_regs regs_intr; | 616 | struct perf_regs regs_intr; |
| 615 | u64 stack_user_size; | 617 | u64 stack_user_size; |
| 616 | } ____cacheline_aligned; | 618 | } ____cacheline_aligned; |
diff --git a/include/linux/perf_regs.h b/include/linux/perf_regs.h index 3c73d5fe18be..a5f98d53d732 100644 --- a/include/linux/perf_regs.h +++ b/include/linux/perf_regs.h | |||
| @@ -1,11 +1,19 @@ | |||
| 1 | #ifndef _LINUX_PERF_REGS_H | 1 | #ifndef _LINUX_PERF_REGS_H |
| 2 | #define _LINUX_PERF_REGS_H | 2 | #define _LINUX_PERF_REGS_H |
| 3 | 3 | ||
| 4 | struct perf_regs { | ||
| 5 | __u64 abi; | ||
| 6 | struct pt_regs *regs; | ||
| 7 | }; | ||
| 8 | |||
| 4 | #ifdef CONFIG_HAVE_PERF_REGS | 9 | #ifdef CONFIG_HAVE_PERF_REGS |
| 5 | #include <asm/perf_regs.h> | 10 | #include <asm/perf_regs.h> |
| 6 | u64 perf_reg_value(struct pt_regs *regs, int idx); | 11 | u64 perf_reg_value(struct pt_regs *regs, int idx); |
| 7 | int perf_reg_validate(u64 mask); | 12 | int perf_reg_validate(u64 mask); |
| 8 | u64 perf_reg_abi(struct task_struct *task); | 13 | u64 perf_reg_abi(struct task_struct *task); |
| 14 | void perf_get_regs_user(struct perf_regs *regs_user, | ||
| 15 | struct pt_regs *regs, | ||
| 16 | struct pt_regs *regs_user_copy); | ||
| 9 | #else | 17 | #else |
| 10 | static inline u64 perf_reg_value(struct pt_regs *regs, int idx) | 18 | static inline u64 perf_reg_value(struct pt_regs *regs, int idx) |
| 11 | { | 19 | { |
| @@ -21,5 +29,13 @@ static inline u64 perf_reg_abi(struct task_struct *task) | |||
| 21 | { | 29 | { |
| 22 | return PERF_SAMPLE_REGS_ABI_NONE; | 30 | return PERF_SAMPLE_REGS_ABI_NONE; |
| 23 | } | 31 | } |
| 32 | |||
| 33 | static inline void perf_get_regs_user(struct perf_regs *regs_user, | ||
| 34 | struct pt_regs *regs, | ||
| 35 | struct pt_regs *regs_user_copy) | ||
| 36 | { | ||
| 37 | regs_user->regs = task_pt_regs(current); | ||
| 38 | regs_user->abi = perf_reg_abi(current); | ||
| 39 | } | ||
| 24 | #endif /* CONFIG_HAVE_PERF_REGS */ | 40 | #endif /* CONFIG_HAVE_PERF_REGS */ |
| 25 | #endif /* _LINUX_PERF_REGS_H */ | 41 | #endif /* _LINUX_PERF_REGS_H */ |
