aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/kernel.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-03-31 16:34:04 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-03-31 16:34:04 -0400
commitf187e9fd68577cdd5f914659b6f7f11124e40485 (patch)
treead0e7422359724f7c7ffaaaa80dd3a7281f02a83 /include/linux/kernel.h
parentadb3b1f3fc1c6edb501808ebf80a81e81c52eb73 (diff)
parent8ebfdf2babcda5a3b06cc67523bca1f9aed46009 (diff)
Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull perf updates and fixes from Ingo Molnar: "It's mostly fixes, but there's also two late items: - preliminary GTK GUI support for perf report - PMU raw event format descriptors in sysfs, to be parsed by tooling The raw event format in sysfs is a new ABI. For example for the 'CPU' PMU we have: aldebaran:~> ll /sys/bus/event_source/devices/cpu/format/* -r--r--r--. 1 root root 4096 Mar 31 10:29 /sys/bus/event_source/devices/cpu/format/any -r--r--r--. 1 root root 4096 Mar 31 10:29 /sys/bus/event_source/devices/cpu/format/cmask -r--r--r--. 1 root root 4096 Mar 31 10:29 /sys/bus/event_source/devices/cpu/format/edge -r--r--r--. 1 root root 4096 Mar 31 10:29 /sys/bus/event_source/devices/cpu/format/event -r--r--r--. 1 root root 4096 Mar 31 10:29 /sys/bus/event_source/devices/cpu/format/inv -r--r--r--. 1 root root 4096 Mar 31 10:29 /sys/bus/event_source/devices/cpu/format/offcore_rsp -r--r--r--. 1 root root 4096 Mar 31 10:29 /sys/bus/event_source/devices/cpu/format/pc -r--r--r--. 1 root root 4096 Mar 31 10:29 /sys/bus/event_source/devices/cpu/format/umask those lists of fields contain a specific format: aldebaran:~> cat /sys/bus/event_source/devices/cpu/format/offcore_rsp config1:0-63 So, those who wish to specify raw events can now use the following event format: -e cpu/cmask=1,event=2,umask=3 Most people will not want to specify any events (let alone raw events), they'll just use whatever default event the tools use. But for more obscure PMU events that have no cross-architecture generic events the above syntax is more usable and a bit more structured than specifying hex numbers." * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (41 commits) perf tools: Remove auto-generated bison/flex files perf annotate: Fix off by one symbol hist size allocation and hit accounting perf tools: Add missing ref-cycles event back to event parser perf annotate: addr2line wants addresses in same format as objdump perf probe: Finder fails to resolve function name to address tracing: Fix ent_size in trace output perf symbols: Handle NULL dso in dso__name_len perf symbols: Do not include libgen.h perf tools: Fix bug in raw sample parsing perf tools: Fix display of first level of callchains perf tools: Switch module.h into export.h perf: Move mmap page data_head offset assertion out of header perf: Fix mmap_page capabilities and docs perf diff: Fix to work with new hists design perf tools: Fix modifier to be applied on correct events perf tools: Fix various casting issues for 32 bits perf tools: Simplify event_read_id exit path tracing: Fix ftrace stack trace entries tracing: Move the tracing_on/off() declarations into CONFIG_TRACING perf report: Add a simple GTK2-based 'perf report' browser ...
Diffstat (limited to 'include/linux/kernel.h')
-rw-r--r--include/linux/kernel.h15
1 files changed, 9 insertions, 6 deletions
diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index a5375e7f3fea..645231c373c8 100644
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -430,16 +430,10 @@ extern int __must_check hex2bin(u8 *dst, const char *src, size_t count);
430 * Most likely, you want to use tracing_on/tracing_off. 430 * Most likely, you want to use tracing_on/tracing_off.
431 */ 431 */
432#ifdef CONFIG_RING_BUFFER 432#ifdef CONFIG_RING_BUFFER
433void tracing_on(void);
434void tracing_off(void);
435/* trace_off_permanent stops recording with no way to bring it back */ 433/* trace_off_permanent stops recording with no way to bring it back */
436void tracing_off_permanent(void); 434void tracing_off_permanent(void);
437int tracing_is_on(void);
438#else 435#else
439static inline void tracing_on(void) { }
440static inline void tracing_off(void) { }
441static inline void tracing_off_permanent(void) { } 436static inline void tracing_off_permanent(void) { }
442static inline int tracing_is_on(void) { return 0; }
443#endif 437#endif
444 438
445enum ftrace_dump_mode { 439enum ftrace_dump_mode {
@@ -449,6 +443,10 @@ enum ftrace_dump_mode {
449}; 443};
450 444
451#ifdef CONFIG_TRACING 445#ifdef CONFIG_TRACING
446void tracing_on(void);
447void tracing_off(void);
448int tracing_is_on(void);
449
452extern void tracing_start(void); 450extern void tracing_start(void);
453extern void tracing_stop(void); 451extern void tracing_stop(void);
454extern void ftrace_off_permanent(void); 452extern void ftrace_off_permanent(void);
@@ -533,6 +531,11 @@ static inline void tracing_start(void) { }
533static inline void tracing_stop(void) { } 531static inline void tracing_stop(void) { }
534static inline void ftrace_off_permanent(void) { } 532static inline void ftrace_off_permanent(void) { }
535static inline void trace_dump_stack(void) { } 533static inline void trace_dump_stack(void) { }
534
535static inline void tracing_on(void) { }
536static inline void tracing_off(void) { }
537static inline int tracing_is_on(void) { return 0; }
538
536static inline int 539static inline int
537trace_printk(const char *fmt, ...) 540trace_printk(const char *fmt, ...)
538{ 541{