diff options
author | Ingo Molnar <mingo@kernel.org> | 2012-04-13 03:50:21 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2012-04-13 03:50:21 -0400 |
commit | 659c36fcda403013a01b85da07cf2d9711e6d6c7 (patch) | |
tree | ece2e7d0e2c19ea5a3d0ec172ad0b81a8a19021d /include/linux/dynamic_debug.h | |
parent | 9521d830b6341d1887dcfc2aebde23fbfa5f1473 (diff) | |
parent | 5a7ed29c7572d00a75e8c4529e30c5ac2ef82271 (diff) |
Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core
Fixes and improvements for perf/core:
. Overhaul the tools/ makefiles, gluing them to the top level Makefile, from
Borislav Petkov.
. Move the UI files from tools/perf/util/ui/ to tools/perf/ui/. Also move
the GTK+ browser to tools/perf/ui/gtk/, from Namhyung Kim.
. Only fallback to sw cycles counter on ENOENT for the hw cycles, from
Robert Richter
. Trivial fixes from Robert Richter
. Handle the autogenerated bison/flex files better, from Namhyung and Jiri Olsa.
. Navigate jump instructions in the annotate browser, just press enter or ->,
still needs support for a jump navigation history, i.e. to go back.
. Search string in the annotate browser: same keys as vim:
/ forward
n next backward/forward
? backward
. Clarify number of events/samples in the report header, from Ashay Rane
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'include/linux/dynamic_debug.h')
-rw-r--r-- | include/linux/dynamic_debug.h | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/include/linux/dynamic_debug.h b/include/linux/dynamic_debug.h index 0564e3c39882..7e3c53a900d8 100644 --- a/include/linux/dynamic_debug.h +++ b/include/linux/dynamic_debug.h | |||
@@ -15,20 +15,24 @@ struct _ddebug { | |||
15 | const char *function; | 15 | const char *function; |
16 | const char *filename; | 16 | const char *filename; |
17 | const char *format; | 17 | const char *format; |
18 | unsigned int lineno:24; | 18 | unsigned int lineno:18; |
19 | /* | 19 | /* |
20 | * The flags field controls the behaviour at the callsite. | 20 | * The flags field controls the behaviour at the callsite. |
21 | * The bits here are changed dynamically when the user | 21 | * The bits here are changed dynamically when the user |
22 | * writes commands to <debugfs>/dynamic_debug/control | 22 | * writes commands to <debugfs>/dynamic_debug/control |
23 | */ | 23 | */ |
24 | #define _DPRINTK_FLAGS_PRINT (1<<0) /* printk() a message using the format */ | 24 | #define _DPRINTK_FLAGS_NONE 0 |
25 | #define _DPRINTK_FLAGS_PRINT (1<<0) /* printk() a message using the format */ | ||
25 | #define _DPRINTK_FLAGS_INCL_MODNAME (1<<1) | 26 | #define _DPRINTK_FLAGS_INCL_MODNAME (1<<1) |
26 | #define _DPRINTK_FLAGS_INCL_FUNCNAME (1<<2) | 27 | #define _DPRINTK_FLAGS_INCL_FUNCNAME (1<<2) |
27 | #define _DPRINTK_FLAGS_INCL_LINENO (1<<3) | 28 | #define _DPRINTK_FLAGS_INCL_LINENO (1<<3) |
28 | #define _DPRINTK_FLAGS_INCL_TID (1<<4) | 29 | #define _DPRINTK_FLAGS_INCL_TID (1<<4) |
30 | #if defined DEBUG | ||
31 | #define _DPRINTK_FLAGS_DEFAULT _DPRINTK_FLAGS_PRINT | ||
32 | #else | ||
29 | #define _DPRINTK_FLAGS_DEFAULT 0 | 33 | #define _DPRINTK_FLAGS_DEFAULT 0 |
34 | #endif | ||
30 | unsigned int flags:8; | 35 | unsigned int flags:8; |
31 | char enabled; | ||
32 | } __attribute__((aligned(8))); | 36 | } __attribute__((aligned(8))); |
33 | 37 | ||
34 | 38 | ||
@@ -62,21 +66,20 @@ int __dynamic_netdev_dbg(struct _ddebug *descriptor, | |||
62 | .format = (fmt), \ | 66 | .format = (fmt), \ |
63 | .lineno = __LINE__, \ | 67 | .lineno = __LINE__, \ |
64 | .flags = _DPRINTK_FLAGS_DEFAULT, \ | 68 | .flags = _DPRINTK_FLAGS_DEFAULT, \ |
65 | .enabled = false, \ | ||
66 | } | 69 | } |
67 | 70 | ||
68 | #define dynamic_pr_debug(fmt, ...) \ | 71 | #define dynamic_pr_debug(fmt, ...) \ |
69 | do { \ | 72 | do { \ |
70 | DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt); \ | 73 | DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt); \ |
71 | if (unlikely(descriptor.enabled)) \ | 74 | if (unlikely(descriptor.flags & _DPRINTK_FLAGS_PRINT)) \ |
72 | __dynamic_pr_debug(&descriptor, pr_fmt(fmt), \ | 75 | __dynamic_pr_debug(&descriptor, pr_fmt(fmt), \ |
73 | ##__VA_ARGS__); \ | 76 | ##__VA_ARGS__); \ |
74 | } while (0) | 77 | } while (0) |
75 | 78 | ||
76 | #define dynamic_dev_dbg(dev, fmt, ...) \ | 79 | #define dynamic_dev_dbg(dev, fmt, ...) \ |
77 | do { \ | 80 | do { \ |
78 | DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt); \ | 81 | DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt); \ |
79 | if (unlikely(descriptor.enabled)) \ | 82 | if (unlikely(descriptor.flags & _DPRINTK_FLAGS_PRINT)) \ |
80 | __dynamic_dev_dbg(&descriptor, dev, fmt, \ | 83 | __dynamic_dev_dbg(&descriptor, dev, fmt, \ |
81 | ##__VA_ARGS__); \ | 84 | ##__VA_ARGS__); \ |
82 | } while (0) | 85 | } while (0) |
@@ -84,7 +87,7 @@ do { \ | |||
84 | #define dynamic_netdev_dbg(dev, fmt, ...) \ | 87 | #define dynamic_netdev_dbg(dev, fmt, ...) \ |
85 | do { \ | 88 | do { \ |
86 | DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt); \ | 89 | DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt); \ |
87 | if (unlikely(descriptor.enabled)) \ | 90 | if (unlikely(descriptor.flags & _DPRINTK_FLAGS_PRINT)) \ |
88 | __dynamic_netdev_dbg(&descriptor, dev, fmt, \ | 91 | __dynamic_netdev_dbg(&descriptor, dev, fmt, \ |
89 | ##__VA_ARGS__); \ | 92 | ##__VA_ARGS__); \ |
90 | } while (0) | 93 | } while (0) |