perf/urgent fixes:
perf report/top: Arnaldo Carvalho de Melo: - Fix popup menu for entries in main kernel maps other than the main one, e.g. ".init.text", where a non-initialized pointer was causing segfaults. Jin Yao: - Fix incorrectly added dimensions when switching perf.data file to another via the popup menu. libtraceevent: Hewenliang: - Fix memory leakage in filter_event(). perf hists: Yuya Fujita: - Fix variable name's inconsistency in hists__for_each() macro. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQR2GiIUctdOfX2qHhGyPKLppCJ+JwUCXgC4qQAKCRCyPKLppCJ+ J0b+AQDzWLDAgNJ/v98nhyXv6eC31/33R14rts+S72GBAidYSAD+Ip6zaFCSgtYE XNv5a00ShOiJdUoDkBBMg4ksAqG8JQ0= =jUUg -----END PGP SIGNATURE----- Merge tag 'perf-urgent-for-mingo-5.5-20191223' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent Pull perf/urgent fixes from Arnaldo Carvalho de Melo: perf report/top: Arnaldo Carvalho de Melo: - Fix popup menu for entries in main kernel maps other than the main one, e.g. ".init.text", where a non-initialized pointer was causing segfaults. Jin Yao: - Fix incorrectly added dimensions when switching perf.data file to another via the popup menu. libtraceevent: Hewenliang: - Fix memory leakage in filter_event(). perf hists: Yuya Fujita: - Fix variable name's inconsistency in hists__for_each() macro. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: Ingo Molnar <mingo@kernel.org>
This commit is contained in:
commit
b9fb2de011
|
@ -1228,8 +1228,10 @@ filter_event(struct tep_event_filter *filter, struct tep_event *event,
|
||||||
}
|
}
|
||||||
|
|
||||||
filter_type = add_filter_type(filter, event->id);
|
filter_type = add_filter_type(filter, event->id);
|
||||||
if (filter_type == NULL)
|
if (filter_type == NULL) {
|
||||||
|
free_arg(arg);
|
||||||
return TEP_ERRNO__MEM_ALLOC_FAILED;
|
return TEP_ERRNO__MEM_ALLOC_FAILED;
|
||||||
|
}
|
||||||
|
|
||||||
if (filter_type->filter)
|
if (filter_type->filter)
|
||||||
free_arg(filter_type->filter);
|
free_arg(filter_type->filter);
|
||||||
|
|
|
@ -1076,6 +1076,7 @@ int cmd_report(int argc, const char **argv)
|
||||||
struct stat st;
|
struct stat st;
|
||||||
bool has_br_stack = false;
|
bool has_br_stack = false;
|
||||||
int branch_mode = -1;
|
int branch_mode = -1;
|
||||||
|
int last_key = 0;
|
||||||
bool branch_call_mode = false;
|
bool branch_call_mode = false;
|
||||||
#define CALLCHAIN_DEFAULT_OPT "graph,0.5,caller,function,percent"
|
#define CALLCHAIN_DEFAULT_OPT "graph,0.5,caller,function,percent"
|
||||||
static const char report_callchain_help[] = "Display call graph (stack chain/backtrace):\n\n"
|
static const char report_callchain_help[] = "Display call graph (stack chain/backtrace):\n\n"
|
||||||
|
@ -1450,7 +1451,8 @@ repeat:
|
||||||
sort_order = sort_tmp;
|
sort_order = sort_tmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (setup_sorting(session->evlist) < 0) {
|
if ((last_key != K_SWITCH_INPUT_DATA) &&
|
||||||
|
(setup_sorting(session->evlist) < 0)) {
|
||||||
if (sort_order)
|
if (sort_order)
|
||||||
parse_options_usage(report_usage, options, "s", 1);
|
parse_options_usage(report_usage, options, "s", 1);
|
||||||
if (field_order)
|
if (field_order)
|
||||||
|
@ -1530,6 +1532,7 @@ repeat:
|
||||||
ret = __cmd_report(&report);
|
ret = __cmd_report(&report);
|
||||||
if (ret == K_SWITCH_INPUT_DATA) {
|
if (ret == K_SWITCH_INPUT_DATA) {
|
||||||
perf_session__delete(session);
|
perf_session__delete(session);
|
||||||
|
last_key = K_SWITCH_INPUT_DATA;
|
||||||
goto repeat;
|
goto repeat;
|
||||||
} else
|
} else
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
|
@ -339,10 +339,10 @@ static inline void perf_hpp__prepend_sort_field(struct perf_hpp_fmt *format)
|
||||||
list_for_each_entry_safe(format, tmp, &(_list)->sorts, sort_list)
|
list_for_each_entry_safe(format, tmp, &(_list)->sorts, sort_list)
|
||||||
|
|
||||||
#define hists__for_each_format(hists, format) \
|
#define hists__for_each_format(hists, format) \
|
||||||
perf_hpp_list__for_each_format((hists)->hpp_list, fmt)
|
perf_hpp_list__for_each_format((hists)->hpp_list, format)
|
||||||
|
|
||||||
#define hists__for_each_sort_list(hists, format) \
|
#define hists__for_each_sort_list(hists, format) \
|
||||||
perf_hpp_list__for_each_sort_list((hists)->hpp_list, fmt)
|
perf_hpp_list__for_each_sort_list((hists)->hpp_list, format)
|
||||||
|
|
||||||
extern struct perf_hpp_fmt perf_hpp__format[];
|
extern struct perf_hpp_fmt perf_hpp__format[];
|
||||||
|
|
||||||
|
|
|
@ -920,6 +920,9 @@ static int dso__process_kernel_symbol(struct dso *dso, struct map *map,
|
||||||
if (curr_map == NULL)
|
if (curr_map == NULL)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
|
if (curr_dso->kernel)
|
||||||
|
map__kmap(curr_map)->kmaps = kmaps;
|
||||||
|
|
||||||
if (adjust_kernel_syms) {
|
if (adjust_kernel_syms) {
|
||||||
curr_map->start = shdr->sh_addr + ref_reloc(kmap);
|
curr_map->start = shdr->sh_addr + ref_reloc(kmap);
|
||||||
curr_map->end = curr_map->start + shdr->sh_size;
|
curr_map->end = curr_map->start + shdr->sh_size;
|
||||||
|
|
Loading…
Reference in New Issue