diff options
| author | 2013-09-27 11:56:14 -0300 | |
|---|---|---|
| committer | 2013-09-27 11:56:14 -0300 | |
| commit | 1025c04cecd19882e28f16c4004034b475c372c5 (patch) | |
| tree | 2b7402887e86d54bff5a123228c9059eae5e32bd /tools/perf/util/python.c | |
| parent | Bluetooth: Add new mgmt_set_advertising command (diff) | |
| parent | Bluetooth: btusb: Add support for Belkin F8065bf (diff) | |
| download | linux-dev-1025c04cecd19882e28f16c4004034b475c372c5.tar.xz linux-dev-1025c04cecd19882e28f16c4004034b475c372c5.zip | |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth
Conflicts:
net/bluetooth/hci_core.c
Diffstat (limited to 'tools/perf/util/python.c')
| -rw-r--r-- | tools/perf/util/python.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tools/perf/util/python.c b/tools/perf/util/python.c index 925e0c3e6d91..71b5412bbbb9 100644 --- a/tools/perf/util/python.c +++ b/tools/perf/util/python.c @@ -8,6 +8,26 @@ #include "cpumap.h" #include "thread_map.h" +/* + * Support debug printing even though util/debug.c is not linked. That means + * implementing 'verbose' and 'eprintf'. + */ +int verbose; + +int eprintf(int level, const char *fmt, ...) +{ + va_list args; + int ret = 0; + + if (verbose >= level) { + va_start(args, fmt); + ret = vfprintf(stderr, fmt, args); + va_end(args); + } + + return ret; +} + /* Define PyVarObject_HEAD_INIT for python 2.5 */ #ifndef PyVarObject_HEAD_INIT # define PyVarObject_HEAD_INIT(type, size) PyObject_HEAD_INIT(type) size, @@ -967,6 +987,7 @@ static struct { { "COUNT_SW_PAGE_FAULTS_MAJ", PERF_COUNT_SW_PAGE_FAULTS_MAJ }, { "COUNT_SW_ALIGNMENT_FAULTS", PERF_COUNT_SW_ALIGNMENT_FAULTS }, { "COUNT_SW_EMULATION_FAULTS", PERF_COUNT_SW_EMULATION_FAULTS }, + { "COUNT_SW_DUMMY", PERF_COUNT_SW_DUMMY }, { "SAMPLE_IP", PERF_SAMPLE_IP }, { "SAMPLE_TID", PERF_SAMPLE_TID }, |
