perf fixes for 3.1
Linus,
Please pull the latest perf-fixes-for-linus git tree from:
git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip.git perf-fixes-for-linus
Thanks,
tglx
------------------>
Arnaldo Carvalho de Melo (1):
perf top browser: Remove spurious helpline update
Jiri Olsa (1):
perf report: Use properly build_id kernel binaries
Masami Hiramatsu (9):
perf probe: Fix a memory leak for scopes array
perf probe: Fix line walker to check CU correctly perf probe: Fix to search nested inlined functions in CU perf probe: Fix to walk all inline instances
perf probe: Warn when more than one line are given perf probe: Fix to search local variables in appropriate scope perf probe: Avoid searching variables in intermediate scopes perf probe: Search concrete out-of-line instances perf probe: Filter out redundant inline-instances
Vasiliy Kulikov (1):
perf: fix temporary file ownership check
tools/perf/builtin-probe.c | 14 ++- tools/perf/util/dwarf-aux.c | 210 +++++++++++++++++++++++++++++++--- tools/perf/util/dwarf-aux.h | 11 ++ tools/perf/util/header.c | 11 ++- tools/perf/util/probe-finder.c | 231 +++++++++++++++++++++++-------------- tools/perf/util/probe-finder.h | 2 +- tools/perf/util/symbol.c | 59 ++++++---- tools/perf/util/symbol.h | 1 - tools/perf/util/ui/browsers/top.c | 1 - 9 files changed, 403 insertions(+), 137 deletions(-)
tools/perf/builtin-probe.c +11 -3
@@ -134,10 +134,18 @@ static int opt_show_lines(const struct option *opt __used, {int ret =0 ; -if (str) - ret =parse_line_range_desc (str, ¶ms.line_range); -INIT_LIST_HEAD (¶ms.line_range.line_list); +if (!str) +return 0 ; + +if (params.show_lines) { +pr_warning ("Warning: more than one --line options are" +" detected. Only the first one is valid.\n" ); +return 0 ; + } + params.show_lines = true; + ret =parse_line_range_desc (str, ¶ms.line_range); +INIT_LIST_HEAD (¶ms.line_range.line_list);return ret; }
tools/perf/util/dwarf-aux.c +195 -15
294 lines not on this page · raw message
tools/perf/util/dwarf-aux.h +11 -0
@@ -34,12 +34,19 @@ extern const char *cu_get_comp_dir(Dwarf_Die *cu_die);extern int cu_find_lineinfo (Dwarf_Die *cudie,unsigned long addr,const char **fname,int *lineno); +/* Walk on funcitons at given address */ +extern int cu_walk_functions_at (Dwarf_Die *cu_die,Dwarf_Addr addr, +int (*callback)(Dwarf_Die *,void *),void *data); +/* Compare diename and tname */ extern bool die_compare_name (Dwarf_Die *dw_die,const char *tname);/* Get callsite line number of inline-function instance */ extern int die_get_call_lineno (Dwarf_Die *in_die); +/* Get callsite file name of inlined function instance */ +extern const char *die_get_call_file (Dwarf_Die *in_die); +/* Get type die */ extern Dwarf_Die *die_get_type (Dwarf_Die *vr_die,Dwarf_Die *die_mem);
@@ -73,6 +80,10 @@ extern Dwarf_Die *die_find_realfunc(Dwarf_Die *cu_die, Dwarf_Addr addr,extern Dwarf_Die *die_find_inlinefunc (Dwarf_Die *sp_die,Dwarf_Addr addr,Dwarf_Die *die_mem); +/* Walk on the instances of given DIE */ +extern int die_walk_instances (Dwarf_Die *in_die, +int (*callback)(Dwarf_Die *,void *),void *data); +/* Walker on lines (Note: line number will not be sorted) */ typedef int (*line_walk_callback_t ) (const char *fname,int lineno,Dwarf_Addr addr,void *data);
tools/perf/util/header.c +10 -1
@@ -726,7 +726,16 @@ static int perf_header__read_build_ids_abi_quirk(struct perf_header *header,return -1 ; bev.header = old_bev.header; - bev.pid =0 ; + +/* +* As the pid is the missing value, we need to fill +* it properly. The header.misc value give us nice hint. +*/ + bev.pid =HOST_KERNEL_ID ; +if (bev.header.misc ==PERF_RECORD_MISC_GUEST_USER || + bev.header.misc ==PERF_RECORD_MISC_GUEST_KERNEL ) + bev.pid =DEFAULT_GUEST_KERNEL_ID ; +memcpy (bev.build_id, old_bev.build_id,sizeof (bev.build_id));__event_process_build_id (&bev, filename, session);
tools/perf/util/probe-finder.c +142 -89
390 lines not on this page · raw message
tools/perf/util/probe-finder.h +1 -1
@@ -57,7 +57,7 @@ struct probe_finder {struct perf_probe_event *pev;/* Target probe event */ /* Callback when a probe point is found */ -int (*callback)(Dwarf_Die *sp_die,struct probe_finder *pf); +int (*callback)(Dwarf_Die *sc_die,struct probe_finder *pf);/* For function searching */ int lno;/* Line number */
tools/perf/util/symbol.c +33 -26
98 lines not on this page · raw message
tools/perf/util/symbol.h +0 -1
@@ -155,7 +155,6 @@ struct dso { };struct dso *dso__new (const char *name); -struct dso *dso__new_kernel (const char *name);void dso__delete (struct dso *dso);int dso__name_len (const struct dso *dso);
tools/perf/util/ui/browsers/top.c +0 -1
@@ -208,6 +208,5 @@ int perf_top__tui_browser(struct perf_top *top) }, }; -ui_helpline__push ("Press <- or ESC to exit" );return perf_top_browser__run (&browser); }