Commit b9fb2de0 authored by Ingo Molnar's avatar Ingo Molnar

Merge tag 'perf-urgent-for-mingo-5.5-20191223' of...

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: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
parents 46cf053e 55347ec3
......@@ -1228,8 +1228,10 @@ filter_event(struct tep_event_filter *filter, struct tep_event *event,
}
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;
}
if (filter_type->filter)
free_arg(filter_type->filter);
......
......@@ -1076,6 +1076,7 @@ int cmd_report(int argc, const char **argv)
struct stat st;
bool has_br_stack = false;
int branch_mode = -1;
int last_key = 0;
bool branch_call_mode = false;
#define CALLCHAIN_DEFAULT_OPT "graph,0.5,caller,function,percent"
static const char report_callchain_help[] = "Display call graph (stack chain/backtrace):\n\n"
......@@ -1450,7 +1451,8 @@ int cmd_report(int argc, const char **argv)
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)
parse_options_usage(report_usage, options, "s", 1);
if (field_order)
......@@ -1530,6 +1532,7 @@ int cmd_report(int argc, const char **argv)
ret = __cmd_report(&report);
if (ret == K_SWITCH_INPUT_DATA) {
perf_session__delete(session);
last_key = K_SWITCH_INPUT_DATA;
goto repeat;
} else
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)
#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) \
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[];
......
......@@ -920,6 +920,9 @@ static int dso__process_kernel_symbol(struct dso *dso, struct map *map,
if (curr_map == NULL)
return -1;
if (curr_dso->kernel)
map__kmap(curr_map)->kmaps = kmaps;
if (adjust_kernel_syms) {
curr_map->start = shdr->sh_addr + ref_reloc(kmap);
curr_map->end = curr_map->start + shdr->sh_size;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment