perf evsel: Remove symbol_conf usage
tip-bot for Arnaldo Carvalho de Melo
merge botCommit-ID: de446b40d5ddb2c3f1fe453ac405543663f9ac5d Gitweb: http://git.kernel.org/tip/de446b40d5ddb2c3f1fe453ac405543663f9ac5d Author: Arnaldo Carvalho de Melo <[email protected]> AuthorDate: Thu, 14 Apr 2016 14:56:06 -0300 Committer: Arnaldo Carvalho de Melo <[email protected]> CommitDate: Thu, 14 Apr 2016 14:56:06 -0300
perf evsel: Remove symbol_conf usage
# perf test -v python
16: Try 'import perf' in python, checking link problems :
--- start ---
test child forked, pid 672
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: /tmp/build/perf/python/perf.so: undefined symbol:
symbol_conf
test child finished with -1
---- end ----
Try 'import perf' in python, checking link problems: FAILED!
#To fix it just pass a parameter to perf_evsel__fprintf_sym telling if callchains should be printed.
Cc Adrian Hunter <[email protected]>
Cc David Ahern <[email protected]>
Cc Jiri Olsa <[email protected]>
Cc Namhyung Kim <[email protected]>
Cc Wang Nan <[email protected]>
Signed-off-by Arnaldo Carvalho de Melo <[email protected]>
--- tools/perf/builtin-script.c | 2 ++ tools/perf/util/evsel.c | 6 +++--- tools/perf/util/evsel.h | 4 ++-- 3 files changed, 7 insertions(+), 5 deletions(-)
tools/perf/builtin-script.c +2 -0
@@ -580,6 +580,7 @@ static void print_sample_bts(struct perf_sample *sample, } }perf_evsel__fprintf_sym (evsel, sample, al,0 , print_opts, + symbol_conf.use_callchain, scripting_max_stack, stdout); }
@@ -790,6 +791,7 @@ static void process_event(struct perf_script *script,perf_evsel__fprintf_sym (evsel, sample, al,0 , output[attr->type].print_ip_opts, + symbol_conf.use_callchain, scripting_max_stack, stdout); }
tools/perf/util/evsel.c +3 -3
@@ -2430,8 +2430,8 @@ next:int perf_evsel__fprintf_sym (struct perf_evsel *evsel,struct perf_sample *sample,struct addr_location *al,int left_alignment, -unsigned int print_opts,unsigned int stack_depth, -FILE *fp) +unsigned int print_opts,bool print_callchain, +unsigned int stack_depth,FILE *fp) {int printed =0 ;int print_ip = print_opts &EVSEL__PRINT_IP ;
@@ -2441,7 +2441,7 @@ int perf_evsel__fprintf_sym(struct perf_evsel *evsel, struct perf_sample *sampleint print_srcline = print_opts &EVSEL__PRINT_SRCLINE ;int print_unknown_as_addr = print_opts &EVSEL__PRINT_UNKNOWN_AS_ADDR ; -if (symbol_conf.use_callchain && sample->callchain) { +if (print_callchain && sample->callchain) { printed +=perf_evsel__fprintf_callchain (evsel, sample, al, left_alignment, print_opts, stack_depth, fp); }else if (!(al->sym && al->sym->ignore)) {
tools/perf/util/evsel.h +2 -2
@@ -403,8 +403,8 @@ int perf_evsel__fprintf_callchain(struct perf_evsel *evsel,int perf_evsel__fprintf_sym (struct perf_evsel *evsel,struct perf_sample *sample,struct addr_location *al,int left_alignment, -unsigned int print_opts,unsigned int stack_depth, -FILE *fp); +unsigned int print_opts,bool print_callchain, +unsigned int stack_depth,FILE *fp);bool perf_evsel__fallback (struct perf_evsel *evsel,int err,char *msg,size_t msgsize);