diff options
author | H. Peter Anvin <hpa@linux.intel.com> | 2014-01-29 18:07:00 +0100 |
---|---|---|
committer | H. Peter Anvin <hpa@linux.intel.com> | 2014-01-29 18:07:00 +0100 |
commit | 4064e0ea3c0e9427e6c22392c4b69b4bfa1b7125 (patch) | |
tree | 888b52771f540552a9dc85521d8dddf66eba9aeb /tools/perf/util/debug.c | |
parent | x86, boot: Use __attribute__((used)) to ensure videocard structs are emitted (diff) | |
parent | Merge branch 'x86-kaslr-for-linus' of git://git.kernel.org/pub/scm/linux/kern... (diff) | |
download | linux-4064e0ea3c0e9427e6c22392c4b69b4bfa1b7125.tar.xz linux-4064e0ea3c0e9427e6c22392c4b69b4bfa1b7125.zip |
Merge commit 'f4bcd8ccddb02833340652e9f46f5127828eb79d' into x86/build
Bring in upstream merge of x86/kaslr for future patches.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'tools/perf/util/debug.c')
-rw-r--r-- | tools/perf/util/debug.c | 31 |
1 files changed, 27 insertions, 4 deletions
diff --git a/tools/perf/util/debug.c b/tools/perf/util/debug.c index 399e74c34c1a..299b55586502 100644 --- a/tools/perf/util/debug.c +++ b/tools/perf/util/debug.c @@ -16,23 +16,46 @@ int verbose; bool dump_trace = false, quiet = false; -int eprintf(int level, const char *fmt, ...) +static int _eprintf(int level, const char *fmt, va_list args) { - va_list args; int ret = 0; if (verbose >= level) { - va_start(args, fmt); if (use_browser >= 1) ui_helpline__vshow(fmt, args); else ret = vfprintf(stderr, fmt, args); - va_end(args); } return ret; } +int eprintf(int level, const char *fmt, ...) +{ + va_list args; + int ret; + + va_start(args, fmt); + ret = _eprintf(level, fmt, args); + va_end(args); + + return ret; +} + +/* + * Overloading libtraceevent standard info print + * function, display with -v in perf. + */ +void pr_stat(const char *fmt, ...) +{ + va_list args; + + va_start(args, fmt); + _eprintf(1, fmt, args); + va_end(args); + eprintf(1, "\n"); +} + int dump_printf(const char *fmt, ...) { va_list args; |