diff options
author | Avi Kivity <avi@redhat.com> | 2010-04-23 06:49:06 -0400 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2010-05-17 05:19:15 -0400 |
commit | 8d3b9323095ae977406c7f4e73c9aa0f47682cc2 (patch) | |
tree | 43ebc414eb8401e8bde250242c9c5d2572e43e70 /arch/x86/kernel | |
parent | d14769377a247d4e7b570592a090474c8a059938 (diff) | |
parent | 6eca8cc35b50af1037bc919106dd6dd332c959c2 (diff) |
Merge remote branch 'tip/perf/core'
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86/kernel')
-rw-r--r-- | arch/x86/kernel/cpu/perf_event.c | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/arch/x86/kernel/cpu/perf_event.c b/arch/x86/kernel/cpu/perf_event.c index 2ea78abf69d9..7de70613e6c3 100644 --- a/arch/x86/kernel/cpu/perf_event.c +++ b/arch/x86/kernel/cpu/perf_event.c | |||
@@ -1752,23 +1752,31 @@ void perf_arch_fetch_caller_regs(struct pt_regs *regs, unsigned long ip, int ski | |||
1752 | unsigned long perf_instruction_pointer(struct pt_regs *regs) | 1752 | unsigned long perf_instruction_pointer(struct pt_regs *regs) |
1753 | { | 1753 | { |
1754 | unsigned long ip; | 1754 | unsigned long ip; |
1755 | |||
1755 | if (perf_guest_cbs && perf_guest_cbs->is_in_guest()) | 1756 | if (perf_guest_cbs && perf_guest_cbs->is_in_guest()) |
1756 | ip = perf_guest_cbs->get_guest_ip(); | 1757 | ip = perf_guest_cbs->get_guest_ip(); |
1757 | else | 1758 | else |
1758 | ip = instruction_pointer(regs); | 1759 | ip = instruction_pointer(regs); |
1760 | |||
1759 | return ip; | 1761 | return ip; |
1760 | } | 1762 | } |
1761 | 1763 | ||
1762 | unsigned long perf_misc_flags(struct pt_regs *regs) | 1764 | unsigned long perf_misc_flags(struct pt_regs *regs) |
1763 | { | 1765 | { |
1764 | int misc = 0; | 1766 | int misc = 0; |
1767 | |||
1765 | if (perf_guest_cbs && perf_guest_cbs->is_in_guest()) { | 1768 | if (perf_guest_cbs && perf_guest_cbs->is_in_guest()) { |
1766 | misc |= perf_guest_cbs->is_user_mode() ? | 1769 | if (perf_guest_cbs->is_user_mode()) |
1767 | PERF_RECORD_MISC_GUEST_USER : | 1770 | misc |= PERF_RECORD_MISC_GUEST_USER; |
1768 | PERF_RECORD_MISC_GUEST_KERNEL; | 1771 | else |
1769 | } else | 1772 | misc |= PERF_RECORD_MISC_GUEST_KERNEL; |
1770 | misc |= user_mode(regs) ? PERF_RECORD_MISC_USER : | 1773 | } else { |
1771 | PERF_RECORD_MISC_KERNEL; | 1774 | if (user_mode(regs)) |
1775 | misc |= PERF_RECORD_MISC_USER; | ||
1776 | else | ||
1777 | misc |= PERF_RECORD_MISC_KERNEL; | ||
1778 | } | ||
1779 | |||
1772 | if (regs->flags & PERF_EFLAGS_EXACT) | 1780 | if (regs->flags & PERF_EFLAGS_EXACT) |
1773 | misc |= PERF_RECORD_MISC_EXACT; | 1781 | misc |= PERF_RECORD_MISC_EXACT; |
1774 | 1782 | ||