lkml.org 
[lkml]   [2013]   [Jul]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH V7 01/14] perf tools: add debug prints
On 17/07/13 23:10, Arnaldo Carvalho de Melo wrote:
> Em Wed, Jul 17, 2013 at 03:43:01PM +0300, Adrian Hunter escreveu:
>> It is useful to see the arguments to perf_event_open
>> and whether the perf events ring buffer was mmapped
>> per-cpu or per-thread. That information will now be
>> displayed when verbose is 2 i.e option -vv
>>
>> Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
>> Acked-by: Jiri Olsa <jolsa@redhat.com>
>
> Please use 'perf test' before sending patchkits:

Sorry. I was running it but in the wrong directory, so it always failed -
being unable to find python/perf.so. I just assumed it was because I did
not have Python configured correctly and did not look further.

>
> [root@zoo ~]# perf test
> <SNIP>
> 14: Test matching and linking multiple hists : Ok
> 15: Try 'use perf' in python, checking link problems : FAILED!
> 16: Test breakpoint overflow signal handler : FAILED!
> 17: Test breakpoint overflow sampling : FAILED!
> 18: Test number of exit event of a simple workload : Ok
> 19: Test software clock events have valid period values : Ok
> [root@zoo ~]#
> [root@zoo ~]# perf test 15
> 15: Try 'use perf' in python, checking link problems : FAILED!
> [root@zoo ~]# set -o vi
> [root@zoo ~]# perf test -v 15
> 15: Try 'use perf' in python, checking link problems :
> --- start ---
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> ImportError: /tmp/build/perf/python/perf.so: undefined symbol: verbose
> ---- end ----
> Try 'use perf' in python, checking link problems: FAILED!
> [root@zoo ~]#
>
>
> The python binding only links a subset of the tools/perf/util/ objects
> and is an exercise in trying to modularize the functions so that we don't
> drag the whole world into it or in any other libraries we come up with.
>
> Perhaps in this case we need to make the 'verbose' variable
> available in one of the object files already in the link kit for the
> python binding or plain pass verbose as a parameter to this function. I
> tend to prefer the later, to avoid having a tools/utils wide global.

It is not just 'verbose'. It is also 'eprintf' due to 'pr_debug'.
Providing an alternative implementation seemed the best approach
- see V8 of the patchset.



\
 
 \ /
  Last update: 2013-07-18 13:21    [W:0.315 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site