summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-09-21 14:24:48 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2012-09-21 14:24:48 -0700
commit18f5600ba2629feca202a7d6387b9c32371af329 (patch)
treecd65b0d53bd0ad65bd02eddda51373a775d8f26d /include
parent789f95b788146ec27ab068103aacd546d05db266 (diff)
parent85f2a2ef1d0ab99523e0b947a2b723f5650ed6aa (diff)
downloadlinux-3.10-18f5600ba2629feca202a7d6387b9c32371af329.tar.gz
linux-3.10-18f5600ba2629feca202a7d6387b9c32371af329.tar.bz2
linux-3.10-18f5600ba2629feca202a7d6387b9c32371af329.zip
Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull perf fixes from Ingo Molnar: "Small perf fixlets" * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: tracing: Don't call page_to_pfn() if page is NULL perf/x86: Fix Intel Ivy Bridge support perf/x86/ibs: Check syscall attribute flags perf/x86: Export Sandy Bridge uncore clockticks event in sysfs
Diffstat (limited to 'include')
-rw-r--r--include/linux/perf_event.h2
-rw-r--r--include/trace/events/kmem.h4
2 files changed, 4 insertions, 2 deletions
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h
index 33ed9d605f9..bdb41612bfe 100644
--- a/include/linux/perf_event.h
+++ b/include/linux/perf_event.h
@@ -274,6 +274,8 @@ struct perf_event_attr {
__u64 branch_sample_type; /* enum branch_sample_type */
};
+#define perf_flags(attr) (*(&(attr)->read_format + 1))
+
/*
* Ioctls that can be done on a perf event fd:
*/
diff --git a/include/trace/events/kmem.h b/include/trace/events/kmem.h
index 5f889f16b0c..08fa27244da 100644
--- a/include/trace/events/kmem.h
+++ b/include/trace/events/kmem.h
@@ -214,7 +214,7 @@ TRACE_EVENT(mm_page_alloc,
TP_printk("page=%p pfn=%lu order=%d migratetype=%d gfp_flags=%s",
__entry->page,
- page_to_pfn(__entry->page),
+ __entry->page ? page_to_pfn(__entry->page) : 0,
__entry->order,
__entry->migratetype,
show_gfp_flags(__entry->gfp_flags))
@@ -240,7 +240,7 @@ DECLARE_EVENT_CLASS(mm_page,
TP_printk("page=%p pfn=%lu order=%u migratetype=%d percpu_refill=%d",
__entry->page,
- page_to_pfn(__entry->page),
+ __entry->page ? page_to_pfn(__entry->page) : 0,
__entry->order,
__entry->migratetype,
__entry->order == 0)