Re: [PATCH v3 25/33] tracing: Allow whitespace to surround hist trigger filter

2017-10-17 Thread Namhyung Kim
Hi Tom, On Wed, Oct 04, 2017 at 02:05:17PM -0500, Tom Zanussi wrote: > Hi Steve, > > On Wed, 2017-10-04 at 14:11 -0400, Steven Rostedt wrote: > > On Fri, 22 Sep 2017 15:00:05 -0500 > > Tom Zanussi wrote: > > > > > The existing code only allows for one space before and after the 'if' > > > speci

Re: [PATCH] perf tools: Fix crash on buildid-list with namespace

2017-10-17 Thread Namhyung Kim
On Tue, Oct 17, 2017 at 11:05:55AM -0300, Arnaldo Carvalho de Melo wrote: > Em Tue, Oct 17, 2017 at 10:29:00PM +0900, Namhyung Kim escreveu: > > Thomas reported that perf buildid-list gets a segfault due to NULL > > pointer when he ran it on a data with namespace events. It was

[PATCH] perf tools: Fix crash on buildid-list with namespace

2017-10-17 Thread Namhyung Kim
#10 run_argv (argcp=, argv=) at perf.c:392 #11 main (argc=, argv=0x3fff3c0) at perf.c:536 (gdb) Fix it by adding a stub event handler for namespace event. Reported-and-Tested-by: Thomas-Mich Richter Signed-off-by: Namhyung Kim --- tools/perf/util/session.c | 2 ++ 1 file changed, 2 inser

Re: [PATCH v5 16/16] perf util: use correct IP mapping to find srcline for hist entry

2017-10-12 Thread Namhyung Kim
On Thu, Oct 12, 2017 at 08:22:58PM +0200, Milian Wolff wrote: > On Dienstag, 10. Oktober 2017 06:49:54 CEST Namhyung Kim wrote: > > Hi Milian, > > > > On Mon, Oct 09, 2017 at 10:33:10PM +0200, Milian Wolff wrote: > > > diff --git a/tools/perf/util/sort.c b/tool

Re: [PATCH v3 22/33] tracing: Add support for 'field variables'

2017-10-11 Thread Namhyung Kim
On Fri, Sep 22, 2017 at 03:00:02PM -0500, Tom Zanussi wrote: > Users should be able to directly specify event fields in hist trigger > 'actions' rather than being forced to explicitly create a variable for > that purpose. > > Add support allowing fields to be used directly in actions, which > esse

Re: [PATCH v3 21/33] tracing: Add support for 'synthetic' events

2017-10-11 Thread Namhyung Kim
On Wed, Oct 04, 2017 at 02:50:18PM -0500, Tom Zanussi wrote: > On Wed, 2017-10-04 at 14:08 -0400, Steven Rostedt wrote: > > On Fri, 22 Sep 2017 15:00:01 -0500 > > Tom Zanussi wrote: > > > > > > > > > +/* This function releases synth_event_mutex */ > > > +static int unregister_synth_event(struct

Re: [PATCH v3 12/33] tracing: Add variable support to hist triggers

2017-10-11 Thread Namhyung Kim
Hi Tom, On Wed, Oct 11, 2017 at 08:33:17AM -0500, Tom Zanussi wrote: > On Mon, 2017-10-09 at 12:27 +0900, Namhyung Kim wrote: > > On Fri, Sep 22, 2017 at 02:59:52PM -0500, Tom Zanussi wrote: > > > Variables set as above can be used by being referenced from another > > &g

Re: [PATCH v5 16/16] perf util: use correct IP mapping to find srcline for hist entry

2017-10-09 Thread Namhyung Kim
> __hypot_finite+140715545239576 > 2.50% 2.50% [.] std::generate_canonical std::linear_congruential_engine > > std::generate_canonical 2.50% 2.50% [.] std::generate_canonical std::linear_congruential_engine > > std::generate_canonical 2.50

Re: [PATCH v3 15/33] tracing: Add simple expression support to hist triggers

2017-10-09 Thread Namhyung Kim
On Fri, Sep 22, 2017 at 02:59:55PM -0500, Tom Zanussi wrote: > Add support for simple addition, subtraction, and unary expressions > (-(expr) and expr, where expr = b-a, a+b, a+b+c) to hist triggers, in > order to support a minimal set of useful inter-event calculations. > > These operations are n

Re: [PATCH v3 19/33] tracing: Add variable reference handling to hist triggers

2017-10-09 Thread Namhyung Kim
On Fri, Sep 22, 2017 at 02:59:59PM -0500, Tom Zanussi wrote: > Add the necessary infrastructure to allow the variables defined on one > event to be referenced in another. This allows variables set by a > previous event to be referenced and used in expressions combining the > variable values saved

Re: [PATCH v3 12/33] tracing: Add variable support to hist triggers

2017-10-08 Thread Namhyung Kim
Hi Tom, On Fri, Sep 22, 2017 at 02:59:52PM -0500, Tom Zanussi wrote: > Add support for saving the value of a current event's event field by > assigning it to a variable that can be read by a subsequent event. > > The basic syntax for saving a variable is to simply prefix a unique > variable name

Re: [PATCH] perf callchain: Compare dsos (as well) for CCKEY_FUNCTION

2017-10-04 Thread Namhyung Kim
Hi, On Thu, Oct 05, 2017 at 09:20:21AM +0530, Ravi Bangoria wrote: > Two functions from different binaries can have same start > address. Thus, comparing only start address in match_chain() > leads to inconsistent callchains. Fix this by adding a check > for dsos as well. > > Ex, https://www.spin

Re: [PATCH v4 14/15] perf report: use srcline from callchain for hist entries

2017-10-04 Thread Namhyung Kim
0.00% [.] > std::__detail::_Adaptor 16807ul, 0ul, 2147483647ul>, double>::operator() (inlined) > std::__detail::_Adaptor 16807ul, 0ul, 2147483647ul>, double>::operator()+57 > 18.39% 0.00% [.] > std::uniform_real_distribution::operator() long, 16807ul, 0ul, 2147483647ul> > (inlined) > std::uniform_real_distribution::operator() long, 16807

Re: [PATCH v4 12/15] perf report: cache failed lookups of inlined frames

2017-10-04 Thread Namhyung Kim
6.570 M/sec > ( +- 0.01% ) > 2,346,845 branch-misses #1.66% of all branches > ( +- 0.19% ) > >0.114222393 seconds time elapsed >( +- 1.19% ) > ~ > > Cc:

Re: [PATCH v4 05/15] perf report: create real callchain entries for inlined frames

2017-10-04 Thread Namhyung Kim
. > > Cc: Jiri Olsa > Cc: Arnaldo Carvalho de Melo > Cc: David Ahern > Cc: Namhyung Kim > Cc: Peter Zijlstra > Cc: Yao Jin > Signed-off-by: Milian Wolff > --- > tools/perf/util/dso.c | 3 +++ > tools/perf/util/dso.h | 1 + > tools/perf/util/machine

Re: [PATCH v4 03/15] perf util: refactor inline_list to operate on symbols

2017-10-04 Thread Namhyung Kim
ch is set to true. Only > those symbols are managed by the inline_list and get freed when > the inline_list is deleted from within inline_node__delete. > > Cc: Jiri Olsa > Cc: Arnaldo Carvalho de Melo > Cc: David Ahern > Cc: Namhyung Kim > Cc: Peter Zijlstra > Cc: Y

Re: [PATCH] perf sched timehist: Add pid and tid options

2017-09-07 Thread Namhyung Kim
Hi David, On Sat, Sep 2, 2017 at 2:49 AM, David Ahern wrote: > Add options to only show event for specific pid(s) and tid(s). > > Signed-off-by: David Ahern Acked-by: Namhyung Kim Thanks, Namhyung > --- > tools/perf/Documentation/perf-sched.txt | 8 > tools/pe

Re: [PATCH v2 03/14] perf report: create real callchain entries for inlined frames

2017-09-07 Thread Namhyung Kim
On Fri, Sep 8, 2017 at 12:05 AM, Milian Wolff wrote: > On Thursday, September 7, 2017 4:58:53 PM CEST Namhyung Kim wrote: >> Hi Milian, > > Hey Namhyung! > >> > > > > @@ -511,10 +563,63 @@ void inline_node__delete

Re: [PATCH v2 03/14] perf report: create real callchain entries for inlined frames

2017-09-07 Thread Namhyung Kim
Hi Milian, On Wed, Sep 06, 2017 at 03:13:35PM +0200, Milian Wolff wrote: > On Sonntag, 20. August 2017 22:57:17 CEST Milian Wolff wrote: > > On Mittwoch, 16. August 2017 09:53:13 CEST Namhyung Kim wrote: > > > Hi Milian, > > > > > > On Sun, Aug 06, 2017 at

Re: [PATCH v2 03/14] perf report: create real callchain entries for inlined frames

2017-08-28 Thread Namhyung Kim
Hi Milian, Sorry for late reply, I was on vacation. On Mon, Aug 21, 2017 at 5:57 AM, Milian Wolff wrote: > On Mittwoch, 16. August 2017 09:53:13 CEST Namhyung Kim wrote: >> Hi Milian, >> >> On Sun, Aug 06, 2017 at 11:24:35PM +0200, Milian Wolff wrote: >> > The in

Re: [PATCH v2 03/14] perf report: create real callchain entries for inlined frames

2017-08-16 Thread Namhyung Kim
ode. > > Cc: Arnaldo Carvalho de Melo > Cc: David Ahern > Cc: Namhyung Kim > Cc: Peter Zijlstra > Cc: Yao Jin > Signed-off-by: Milian Wolff > --- > tools/perf/util/callchain.c | 31 +++- > tools/perf/util/callchain.h | 6 +- > tools/perf/util/dso.c |

Re: [PATCH v2 11/14] perf report: cache srclines for callchain nodes

2017-08-10 Thread Namhyung Kim
On Thu, Aug 10, 2017 at 8:51 PM, Milian Wolff wrote: > On Donnerstag, 10. August 2017 04:13:25 CEST Namhyung Kim wrote: >> Hi Milian, >> >> On Sun, Aug 06, 2017 at 11:24:43PM +0200, Milian Wolff wrote: >> > On one hand this ensures that the memory is properly free

Re: [PATCH v2 11/14] perf report: cache srclines for callchain nodes

2017-08-09 Thread Namhyung Kim
e > would be to remove the formatting options and handle that on a > different level - i.e. print the sym/addr on demand wherever we > actually output something. And the unwind_inlines could be moved into > a separate function that does not return the srcline. Agreed. Also I gues

Re: [PATCH 29/32] tracing: Add 'last error' error facility for hist triggers

2017-07-25 Thread Namhyung Kim
On Mon, Jun 26, 2017 at 05:49:30PM -0500, Tom Zanussi wrote: > With the addition of variables and actions, it's become necessary to > provide more detailed error information to users about syntax errors. > > Add a 'last error' facility accessible via the erroring event's 'hist' > file. Reading th

Re: [PATCH 24/32] tracing: Add 'onmax' hist trigger action support

2017-07-25 Thread Namhyung Kim
On Mon, Jun 26, 2017 at 05:49:25PM -0500, Tom Zanussi wrote: > Add an 'onmax(var).save(field,...)' hist trigger action which is > invoked whenever an event exceeds the current maximum. > > The end result is that the trace event fields or variables specified > as the onmax.save() params will be sav

Re: [PATCH 23/32] tracing: Add 'onmatch' hist trigger action support

2017-07-25 Thread Namhyung Kim
Hi Tom, On Mon, Jun 26, 2017 at 05:49:24PM -0500, Tom Zanussi wrote: > Add an 'onmatch(matching.event).(param list)' > hist trigger action which is invoked with the set of variables or > event fields named in the 'param list'. The result is the generation > of a synthetic event that consists of t

Re: [PATCH 23/32] tracing: Add 'onmatch' hist trigger action support

2017-07-23 Thread Namhyung Kim
On Mon, Jun 26, 2017 at 05:49:24PM -0500, Tom Zanussi wrote: > Add an 'onmatch(matching.event).(param list)' > hist trigger action which is invoked with the set of variables or > event fields named in the 'param list'. The result is the generation > of a synthetic event that consists of the values

Re: [PATCH 22/32] tracing: Add support for 'synthetic' events

2017-07-23 Thread Namhyung Kim
Hi Tom, On Mon, Jun 26, 2017 at 05:49:23PM -0500, Tom Zanussi wrote: > Synthetic events are user-defined events generated from hist trigger > variables saved from one or more other events. > > To define a synthetic event, the user writes a simple specification > consisting of the name of the new

Re: [PATCH 4/4] perf stat: Use group read for event groups

2017-07-22 Thread Namhyung Kim
On Fri, Jul 21, 2017 at 02:12:12PM +0200, Jiri Olsa wrote: > Make perf stat use group read if there are groups > defined. The group read will get the values for all > member of groups within a single syscall instead of > calling read syscall for every event. > > We can see considerable less amou

Re: [PATCH] perf tool sort: Use default sort if evlist is empty

2017-07-22 Thread Namhyung Kim
On Fri, Jul 21, 2017 at 01:02:50PM -0700, David Carrillo-Cisneros wrote: > On Fri, Jul 21, 2017 at 12:44 AM, Jiri Olsa wrote: > > On Thu, Jul 20, 2017 at 10:11:57PM -0700, David Carrillo-Cisneros wrote: > >> Fixes bug noted by Jiri in https://lkml.org/lkml/2017/6/13/755 and caused > >> by commit d

Re: [PATCH v3 3/9] perf annotate: Fix wrong --show-total-period option showing number of samples

2017-07-22 Thread Namhyung Kim
Namhyung > > The resulting cset is below. > > - Arnaldo > > commit a935e8cd8d5d4b7936c4b4cf27c2d0e87d1a6a66 > Author: Taeung Song > Date: Fri Jul 21 11:38:48 2017 -0300 > > perf annotate: Do not overwrite sample->period > > In fixing the

Re: [PATCH 19/32] tracing: Add variable reference handling to hist triggers

2017-07-20 Thread Namhyung Kim
On Mon, Jun 26, 2017 at 05:49:20PM -0500, Tom Zanussi wrote: > Add the necessary infrastructure to allow the variables defined on one > event to be referenced in another. This allows variables set by a > previous event to be referenced and used in expressions combining the > variable values saved

Re: [PATCH 18/32] tracing: Add simple expression support to hist triggers

2017-07-20 Thread Namhyung Kim
Hi Tom, On Mon, Jun 26, 2017 at 05:49:19PM -0500, Tom Zanussi wrote: > Add support for simple addition, subtraction, and unary expressions > (-(expr) and expr, where expr = b-a, a+b, a+b+c) to hist triggers, in > order to support a minimal set of useful inter-event calculations. > > These operati

Re: [PATCH 16/32] tracing: Add variable support to hist triggers

2017-07-18 Thread Namhyung Kim
Hi Tom, On Mon, Jun 26, 2017 at 05:49:17PM -0500, Tom Zanussi wrote: > Add support for saving the value of a current event's event field by > assigning it to a variable that can be read by a subsequent event. > > The basic syntax for saving a variable is to simply prefix a unique > variable name

Re: [PATCH v2 9/9] perf annotate: Use the sample period when calculating the percentage

2017-07-18 Thread Namhyung Kim
ants the old behavior. Maybe it'd be better to honor --show-nr-samples option. > > Cc: Namhyung Kim > Cc: Jiri Olsa > Signed-off-by: Taeung Song > --- > tools/perf/util/annotate.c | 11 ++- > 1 file changed, 6 insertions(+), 5 deletions(-) > > diff --g

Re: [PATCH v2 8/9] perf annotate browser: Support the toggle number of samples with a 'e' hotkey

2017-07-18 Thread Namhyung Kim
On Fri, Jul 14, 2017 at 02:46:16AM +0900, Taeung Song wrote: > Cc: Namhyung Kim > Cc: Milian Wolff > Cc: Jiri Olsa > Signed-off-by: Taeung Song Hmm.. IIUC there're 3 modes of annotation view: percent, period and sample, right? The existing 't' hotkey seems to

Re: [PATCH v2 0/9] perf annotate: Fix --show-total-period and support --show-nr-samples

2017-07-18 Thread Namhyung Kim
Hi Taeung, On Fri, Jul 14, 2017 at 02:45:44AM +0900, Taeung Song wrote: > Hello, > > Currently the --show-total-period option of perf-annotate > is different from perf-report's. > > It has two problem like below: > (Reported by Namhyung Kim and Milian Wolff) > >

Re: [PATCH 12/32] tracing: Add hist trigger timestamp support

2017-07-16 Thread Namhyung Kim
On Mon, Jun 26, 2017 at 05:49:13PM -0500, Tom Zanussi wrote: > Add support for a timestamp event field. This is actually a 'pseudo-' > event field in that it behaves like it's part of the event record, but > is really part of the corresponding ring buffer event. > > To make use of the timestamp f

Re: [PATCH 03/32] ring-buffer: Add interface for setting absolute time stamps

2017-07-13 Thread Namhyung Kim
On Mon, Jun 26, 2017 at 05:49:04PM -0500, Tom Zanussi wrote: > Define a new function, tracing_set_time_stamp_abs(), which can be used > to enable or disable the use of absolute timestamps rather than time > deltas for a trace array. > > This resets the buffer to prevent a mix of time deltas and ab

Re: [PATCH 02/32] tracing: Reimplement log2

2017-07-13 Thread Namhyung Kim
On Mon, Jun 26, 2017 at 05:49:03PM -0500, Tom Zanussi wrote: > log2 as currently implemented applies only to u64 trace_event_field > derived fields, and assumes that anything it's applied to is a u64 > field. > > To prepare for synthetic fields like latencies, log2 should be > applicable to those

Re: [PATCH 01/32] tracing: Add hist_field_name() accessor

2017-07-13 Thread Namhyung Kim
Hi Tom, On Mon, Jun 26, 2017 at 05:49:02PM -0500, Tom Zanussi wrote: > In preparation for hist_fields that won't be strictly based on > trace_event_fields, add a new hist_field_name() accessor to allow that > flexibility and update associated users. > > Signed-off-by: Tom Zanussi > --- > kernel

Re: [QUESTION] perf annotate: how do we fix the 'total period' feature ?

2017-07-04 Thread Namhyung Kim
Hi Taeung, On Wed, Jul 5, 2017 at 2:47 PM, Taeung Song wrote: > Hi, > > Two problems of perf-annotate were mentioned in recent PATCH reviews > by Milian and Namhyung. > > Currently perf-annotate has a '--show-total-period' option > and a 't' key "Toggle total period view" on TUI browser. Hmm...

Re: [PATCH/RFC 1/4] perf annotate: Add --source-only option

2017-06-29 Thread Namhyung Kim
Resend with a proper mail address.. On Fri, Jun 30, 2017 at 12:14 AM, Namhyung Kim wrote: > Hi Taeung, > > Thanks for doing this work! > > On Wed, Jun 28, 2017 at 12:14 PM, Taeung Song wrote: >> The option can show the result of performance analysis >> based on

Re: [PATCH/RFC 0/4] perf annotate: Add --source-only option and the new source code TUI view

2017-06-29 Thread Namhyung Kim
source code per > > symbol(function). (Namhyung Kim told me this idea and it was also requested > > by others some time ago..) > > > > If someone wants to see the cause, he/she will need to dig into the asm. > > But before that, looking at the source level can give a h

Re: [PATCH/RFC 9/9] perf record: Add --module-dir option

2017-06-25 Thread Namhyung Kim
On Fri, Jun 23, 2017 at 11:45:24AM -0300, Arnaldo Carvalho de Melo wrote: > Em Fri, Jun 23, 2017 at 02:48:27PM +0900, Namhyung Kim escreveu: > > Currently perf only searches module binaries on the canonical > > directory (/lib/modules/`uname -r`). But sometimes user needs to

Re: [PATCH/RFC 5/9] perf symbols: Fixup the end address of kernel map properly

2017-06-25 Thread Namhyung Kim
On Fri, Jun 23, 2017 at 11:27:25AM -0300, Arnaldo Carvalho de Melo wrote: > Em Fri, Jun 23, 2017 at 02:48:23PM +0900, Namhyung Kim escreveu: > > When /proc/kallsyms is used for kernel address, addresses in module can > > be changed when the module is reloaded. So if one did p

Re: [PATCH/RFC 4/9] perf symbols: Load kernel module symbols ASAP

2017-06-25 Thread Namhyung Kim
On Fri, Jun 23, 2017 at 11:26:04AM -0300, Arnaldo Carvalho de Melo wrote: > Em Fri, Jun 23, 2017 at 02:48:22PM +0900, Namhyung Kim escreveu: > > When loading kernel symbols from /proc/kallsyms, it might have different > > addresses for modules. We should honor the mmap even

Re: [PATCH/RFC 6/9] perf symbols: Use already loaded module dso when loading kcore

2017-06-25 Thread Namhyung Kim
On Fri, Jun 23, 2017 at 10:55:47AM -0300, Arnaldo Carvalho de Melo wrote: > Em Fri, Jun 23, 2017 at 02:48:24PM +0900, Namhyung Kim escreveu: > > Even every module has loaded onto same addresses, some modules can be > > changed and reloaded. > > Can you rephrase the above sta

Re: [PATCH/RFC 3/9] perf symbols: Discard symbols in kallsyms for loaded modules

2017-06-25 Thread Namhyung Kim
On Fri, Jun 23, 2017 at 10:51:05AM -0300, Arnaldo Carvalho de Melo wrote: > Em Fri, Jun 23, 2017 at 02:48:21PM +0900, Namhyung Kim escreveu: > > If a module is already loaded, it should have symbols and no need to > > load new symbols from kallsyms. Actually kallsyms can

[PATCH/RFC 9/9] perf record: Add --module-dir option

2017-06-22 Thread Namhyung Kim
--module-dir option so that perf can record modules in the directory. Cc: Adrian Hunter Cc: Wang Nan Signed-off-by: Namhyung Kim --- tools/perf/Documentation/perf-record.txt | 3 +++ tools/perf/builtin-record.c | 2 ++ tools/perf/util/machine.c| 15

[PATCH/RFC 4/9] perf symbols: Load kernel module symbols ASAP

2017-06-22 Thread Namhyung Kim
Nan Signed-off-by: Namhyung Kim --- tools/perf/util/machine.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c index d838f893e639..799efe920f0c 100644 --- a/tools/perf/util/machine.c +++ b/tools/perf/util/machine.c @@ -656,6 +656,9

[PATCHSET/RFC 0/9] perf tools: Support out-of-tree modules

2017-06-22 Thread Namhyung Kim
The code is available on 'perf/kmod-dir-v1' branch at git://git.kernel.org/pub/scm/linux/kernel/git/namhyung/linux-perf.git Thanks, Namhyung Namhyung Kim (9): perf symbols: Use absolute address to fixup map address perf tools: Remove duplicate code perf symbols: Discard symbols

[PATCH/RFC 7/9] perf tools: Add symbol_conf.use_kcore

2017-06-22 Thread Namhyung Kim
The use_kcore field is to control usage of /proc/kcore when loading symbols. This patch only introduces the new field and don't change any behavior by itself. Cc: Adrian Hunter Cc: Wang Nan Signed-off-by: Namhyung Kim --- tools/perf/util/symbol.c | 3 ++- tools/perf/util/symbol.h | 3 +

[PATCH/RFC 6/9] perf symbols: Use already loaded module dso when loading kcore

2017-06-22 Thread Namhyung Kim
Even every module has loaded onto same addresses, some modules can be changed and reloaded. In that case it needs to access to the old module in the build-id cache. Cc: Adrian Hunter Cc: Wang Nan Signed-off-by: Namhyung Kim --- tools/perf/util/symbol.c | 45

[PATCH/RFC 8/9] perf record: Not use kcore by default

2017-06-22 Thread Namhyung Kim
fo and use it for build-id cache. Add --use-kcore option to request it explicitly (like in perf-with-kcore). Cc: Adrian Hunter Cc: Wang Nan Signed-off-by: Namhyung Kim --- tools/perf/Documentation/perf-record.txt | 3 +++ tools/perf/builtin-record.c | 5 + tools/perf/perf-wit

[PATCH/RFC 2/9] perf tools: Remove duplicate code

2017-06-22 Thread Namhyung Kim
The map_groups__set_module_path() is called after machine__create_module() which sets build-id and symtab type already. Also remove is_kmod_dso() as there's no user anymore. Cc: Adrian Hunter Cc: Wang Nan Signed-off-by: Namhyung Kim --- tools/perf/util/machine.c | 15 --- 1

[PATCH/RFC 3/9] perf symbols: Discard symbols in kallsyms for loaded modules

2017-06-22 Thread Namhyung Kim
the kernel doesn't set the dso->loaded bit so simply checking it would do the job IMHO. Cc: Adrian Hunter Cc: Wang Nan Signed-off-by: Namhyung Kim --- tools/perf/util/symbol.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tools/perf/util/symbol.c b/tools/p

[PATCH/RFC 1/9] perf symbols: Use absolute address to fixup map address

2017-06-22 Thread Namhyung Kim
A symbol address is relative in a map/dso, to setup modules addresses it should be converted to absolute address. Note that it only used for kernel mappings which uses identity map but theorically it should unmap the address IMHO. Cc: Adrian Hunter Cc: Wang Nan Signed-off-by: Namhyung Kim

[PATCH/RFC 5/9] perf symbols: Fixup the end address of kernel map properly

2017-06-22 Thread Namhyung Kim
ned-off-by: Namhyung Kim --- tools/perf/util/symbol.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c index 74078ba595b3..ce79a51f25bf 100644 --- a/tools/perf/util/symbol.c +++ b/tools/perf/util/symbol.c @@ -1832,7 +1832,7 @@

[tip:perf/core] perf ftrace: Add option for function filtering

2017-06-20 Thread tip-bot for Namhyung Kim
Commit-ID: 78b83e8b12b4467540ca501c7c019e9d46051957 Gitweb: http://git.kernel.org/tip/78b83e8b12b4467540ca501c7c019e9d46051957 Author: Namhyung Kim AuthorDate: Sun, 18 Jun 2017 23:23:01 +0900 Committer: Arnaldo Carvalho de Melo CommitDate: Mon, 19 Jun 2017 22:05:53 -0300 perf ftrace

[tip:perf/core] perf ftrace: Add -D option for depth filter

2017-06-20 Thread tip-bot for Namhyung Kim
Commit-ID: 1096c35aa821cc4789a64232a0e210bb87a0e5e8 Gitweb: http://git.kernel.org/tip/1096c35aa821cc4789a64232a0e210bb87a0e5e8 Author: Namhyung Kim AuthorDate: Sun, 18 Jun 2017 23:23:02 +0900 Committer: Arnaldo Carvalho de Melo CommitDate: Mon, 19 Jun 2017 22:05:54 -0300 perf ftrace

[tip:perf/core] perf ftrace: Move setup_pager before opening trace_pipe

2017-06-20 Thread tip-bot for Namhyung Kim
Commit-ID: 29681bc5bb4326c2f9eac5dc68d8fad3e88b4bb5 Gitweb: http://git.kernel.org/tip/29681bc5bb4326c2f9eac5dc68d8fad3e88b4bb5 Author: Namhyung Kim AuthorDate: Sun, 18 Jun 2017 23:23:00 +0900 Committer: Arnaldo Carvalho de Melo CommitDate: Mon, 19 Jun 2017 22:05:52 -0300 perf ftrace

[tip:perf/core] perf ftrace: Show error message when fails to set ftrace files

2017-06-20 Thread tip-bot for Namhyung Kim
Commit-ID: e7bd9ba20a9ec7024a0566a93c22b9571a48939a Gitweb: http://git.kernel.org/tip/e7bd9ba20a9ec7024a0566a93c22b9571a48939a Author: Namhyung Kim AuthorDate: Sun, 18 Jun 2017 23:22:59 +0900 Committer: Arnaldo Carvalho de Melo CommitDate: Mon, 19 Jun 2017 22:05:51 -0300 perf ftrace

[PATCH 3/4] perf ftrace: Add option for function filtering

2017-06-18 Thread Namhyung Kim
3) 0.036 us|up_read(); 3) 4.547 us| } /* __do_page_fault */ ... Cc: Steven Rostedt Cc: Frederic Weisbecker Signed-off-by: Namhyung Kim --- tools/perf/Documentation/perf-ftrace.txt | 30 tools/perf/builtin-ftrace.c

[PATCH 2/4] perf ftrace: Move setup_pager before opening trace_pipe

2017-06-18 Thread Namhyung Kim
g the file. Cc: Steven Rostedt Cc: Frederic Weisbecker Fixes: 583359646fde ("perf ftrace: Use pager for displaying result") Signed-off-by: Namhyung Kim --- tools/perf/builtin-ftrace.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/perf/builtin-ftrace.c

[PATCH 4/4] perf ftrace: Add -D option for depth filter

2017-06-18 Thread Namhyung Kim
|find_vma(); 0) 5.374 us|handle_mm_fault(); 0) 0.054 us|up_read(); 0) 7.463 us| } ... Cc: Steven Rostedt Cc: Frederic Weisbecker Signed-off-by: Namhyung Kim --- tools/perf/Documentation/perf-ftrace.txt | 3 +++ tools/perf/builtin-ftrace.c | 31

[PATCH 1/4] perf ftrace: Show error message when fails to set ftrace files

2017-06-18 Thread Namhyung Kim
It'd be better for debugging to show an error message when it fails to setup ftrace for some reason. Cc: Steven Rostedt Cc: Frederic Weisbecker Signed-off-by: Namhyung Kim --- tools/perf/builtin-ftrace.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tools

Re: perf report: fix off-by-one for non-activation frames

2017-06-17 Thread Namhyung Kim
On Sat, Jun 17, 2017 at 4:54 AM, Milian Wolff wrote: > On Freitag, 16. Juni 2017 13:57:44 CEST Jan Kratochvil wrote: >> On Fri, 16 Jun 2017 13:51:37 +0200, Milian Wolff wrote: >> > > perf-4.12.0-0.rc5.git0.1.fc27.x86_64 >> > > >> > > 39e32e gdb_main (/usr/libexec/gdb) >> > >

Re: Ftrace vs perf user page fault statistics differences

2017-06-13 Thread Namhyung Kim
Hello, On Wed, Jun 14, 2017 at 5:04 AM, Steven Rostedt wrote: > On Tue, 13 Jun 2017 14:02:08 -0400 > Will Hawkins wrote: > >> Thank you for pointing this out. I had been using -F for exactly the >> reason that you mentioned. I failed to include it in the command that >> I sent along. Very sorry

[tip:perf/urgent] perf symbols: Kill dso__build_id_is_kmod()

2017-06-08 Thread tip-bot for Namhyung Kim
Commit-ID: b89fe63fbafe307fb72546f7a2320380bf41bdd4 Gitweb: http://git.kernel.org/tip/b89fe63fbafe307fb72546f7a2320380bf41bdd4 Author: Namhyung Kim AuthorDate: Thu, 8 Jun 2017 16:31:09 +0900 Committer: Arnaldo Carvalho de Melo CommitDate: Thu, 8 Jun 2017 15:39:34 -0300 perf symbols

[tip:perf/urgent] perf tests: Decompress kernel module before objdump

2017-06-08 Thread tip-bot for Namhyung Kim
Commit-ID: 94df1040b1e6aacd8dec0ba3c61d7e77cd695f26 Gitweb: http://git.kernel.org/tip/94df1040b1e6aacd8dec0ba3c61d7e77cd695f26 Author: Namhyung Kim AuthorDate: Thu, 8 Jun 2017 16:31:07 +0900 Committer: Arnaldo Carvalho de Melo CommitDate: Thu, 8 Jun 2017 15:39:19 -0300 perf tests

[tip:perf/urgent] perf symbols: Keep DSO->symtab_type after decompress

2017-06-08 Thread tip-bot for Namhyung Kim
Commit-ID: c25ec42f846f702f8f532fbc890171e3a1f6ec85 Gitweb: http://git.kernel.org/tip/c25ec42f846f702f8f532fbc890171e3a1f6ec85 Author: Namhyung Kim AuthorDate: Thu, 8 Jun 2017 16:31:08 +0900 Committer: Arnaldo Carvalho de Melo CommitDate: Thu, 8 Jun 2017 15:39:26 -0300 perf symbols

[tip:perf/urgent] perf tools: Consolidate error path in __open_dso()

2017-06-08 Thread tip-bot for Namhyung Kim
Commit-ID: 8ba29adf9a7cdff3c7283d5fc0dcf5e777d3b40f Gitweb: http://git.kernel.org/tip/8ba29adf9a7cdff3c7283d5fc0dcf5e777d3b40f Author: Namhyung Kim AuthorDate: Thu, 8 Jun 2017 16:31:06 +0900 Committer: Arnaldo Carvalho de Melo CommitDate: Thu, 8 Jun 2017 15:39:13 -0300 perf tools

[tip:perf/urgent] perf tools: Decompress kernel module when reading DSO data

2017-06-08 Thread tip-bot for Namhyung Kim
Commit-ID: 1d6b3c9ba756a5134fd7ad1959acac776d17404b Gitweb: http://git.kernel.org/tip/1d6b3c9ba756a5134fd7ad1959acac776d17404b Author: Namhyung Kim AuthorDate: Thu, 8 Jun 2017 16:31:05 +0900 Committer: Arnaldo Carvalho de Melo CommitDate: Thu, 8 Jun 2017 15:39:07 -0300 perf tools

[tip:perf/urgent] perf annotate: Use dso__decompress_kmodule_path()

2017-06-08 Thread tip-bot for Namhyung Kim
Commit-ID: 3c84fd53044f98017271101b59a21ddb20fb312b Gitweb: http://git.kernel.org/tip/3c84fd53044f98017271101b59a21ddb20fb312b Author: Namhyung Kim AuthorDate: Thu, 8 Jun 2017 16:31:04 +0900 Committer: Arnaldo Carvalho de Melo CommitDate: Thu, 8 Jun 2017 15:39:02 -0300 perf annotate

[tip:perf/urgent] perf tools: Introduce dso__decompress_kmodule_{fd,path}

2017-06-08 Thread tip-bot for Namhyung Kim
Commit-ID: 42b3fa670825983fc8bd0ac7b80cc84ae3abb75b Gitweb: http://git.kernel.org/tip/42b3fa670825983fc8bd0ac7b80cc84ae3abb75b Author: Namhyung Kim AuthorDate: Thu, 8 Jun 2017 16:31:03 +0900 Committer: Arnaldo Carvalho de Melo CommitDate: Thu, 8 Jun 2017 15:38:55 -0300 perf tools

[tip:perf/urgent] perf tools: Fix a memory leak in __open_dso()

2017-06-08 Thread tip-bot for Namhyung Kim
Commit-ID: 44ad6b8852529eb39066edbedc027a6901da6803 Gitweb: http://git.kernel.org/tip/44ad6b8852529eb39066edbedc027a6901da6803 Author: Namhyung Kim AuthorDate: Thu, 8 Jun 2017 16:31:02 +0900 Committer: Arnaldo Carvalho de Melo CommitDate: Thu, 8 Jun 2017 15:38:47 -0300 perf tools: Fix

[tip:perf/urgent] perf annotate: Fix symbolic link of build-id cache

2017-06-08 Thread tip-bot for Namhyung Kim
Commit-ID: 3619ef76b37d4803bc9daee9d03d82c8526db378 Gitweb: http://git.kernel.org/tip/3619ef76b37d4803bc9daee9d03d82c8526db378 Author: Namhyung Kim AuthorDate: Thu, 8 Jun 2017 16:31:01 +0900 Committer: Arnaldo Carvalho de Melo CommitDate: Thu, 8 Jun 2017 15:38:41 -0300 perf annotate

[PATCH v4 1/9] perf annotate: Fix symbolic link of build-id cache

2017-06-08 Thread Namhyung Kim
Cc: Taeung Song Signed-off-by: Namhyung Kim --- tools/perf/util/annotate.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c index 1367d7e35242..df4486c3a2fa 100644 --- a/tools/perf/util/annotate.c +++ b/tools

[PATCH v4 7/9] perf test: Decompress kernel module before objdump

2017-06-08 Thread Namhyung Kim
If a kernel modules is compressed, it should be decompressed before running objdump to parse binary data correctly. This fixes a failure of object code reading test for me. Signed-off-by: Namhyung Kim --- tools/perf/tests/code-reading.c | 20 +++- 1 file changed, 19 insertions

[PATCH v4 3/9] perf tools: Introduce dso__decompress_kmodule_{fd,path}

2017-06-08 Thread Namhyung Kim
Move decompress_kmodule() to util/dso.c and split it to two functions returning fd and (decompressed) file path. Existing user only wants the fd version but the path version will be used soon. Signed-off-by: Namhyung Kim --- tools/perf/util/dso.c| 58

[PATCH v4 8/9] perf symbols: Keep DSO->symtab_type after decompress

2017-06-08 Thread Namhyung Kim
off-by: Namhyung Kim --- tools/perf/util/symbol-elf.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/perf/util/symbol-elf.c b/tools/perf/util/symbol-elf.c index d342e771dbad..502505cf236a 100644 --- a/tools/perf/util/symbol-elf.c +++ b/tools/perf/util/symbol-elf.c @@ -671,6 +671,8

[PATCH v4 2/9] perf tools: Fix a memory leak in __open_dso()

2017-06-08 Thread Namhyung Kim
The name should be freed on error path. Signed-off-by: Namhyung Kim --- tools/perf/util/dso.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/perf/util/dso.c b/tools/perf/util/dso.c index b27d127cdf68..1f29e4fe7af0 100644 --- a/tools/perf/util/dso.c +++ b/tools/perf

[PATCH v4 4/9] perf annotate: Use dso__decompress_kmodule_path()

2017-06-08 Thread Namhyung Kim
Convert open-coded decompress routine to use the function. Signed-off-by: Namhyung Kim --- tools/perf/util/annotate.c | 27 +++ 1 file changed, 3 insertions(+), 24 deletions(-) diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c index df4486c3a2fa

[PATCH v4 6/9] perf tools: Consolidate error path in __open_dso()

2017-06-08 Thread Namhyung Kim
On failure, it should free the 'name', so clean up the error path using goto. Signed-off-by: Namhyung Kim --- tools/perf/util/dso.c | 19 --- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/tools/perf/util/dso.c b/tools/perf/util/dso.c index c6

[PATCH v4 9/9] perf symbols: Kill dso__build_id_is_kmod()

2017-06-08 Thread Namhyung Kim
e file and find ".ko" suffix. But this does not work for compressed kernel modules and now such DSOs have correct symtab_type now. So no need to check it anymore. This patch essentially reverts the commit. Cc: Wang Nan Signed-off-by: Namhyung Kim --- tools/

[PATCH v4 5/9] perf tools: Decompress kernel module when reading DSO data

2017-06-08 Thread Namhyung Kim
Currently perf decompresses kernel modules when loading symbol table but it missed to do it when reading raw data. Signed-off-by: Namhyung Kim --- tools/perf/util/dso.c | 16 1 file changed, 16 insertions(+) diff --git a/tools/perf/util/dso.c b/tools/perf/util/dso.c index

[PATCHSET 0/9] perf tools: Fix for compressed kernel modules (v4)

2017-06-08 Thread Namhyung Kim
code is avaiable at 'perf/kmod-decomp-v4' branch in my tree: git://git.kernel.org/pub/scm/linux/kernel/git/namhyung/linux-perf.git Thanks, Namhyung Namhyung Kim (9): perf annotate: Fix symbolic link of build-id cache perf tools: Fix a memory leak in __open_dso() perf tools:

Re: [PATCH v3 4/6] perf test: Decompress kernel module before objdump

2017-06-07 Thread Namhyung Kim
On Wed, Jun 07, 2017 at 07:25:20PM -0300, Arnaldo Carvalho de Melo wrote: > Em Thu, Jun 08, 2017 at 12:39:01AM +0900, Namhyung Kim escreveu: > > If a kernel modules is compressed, it should be decompressed before > > running objdump to parse binary data correctly. This fix

Re: [PATCH v3 4/6] perf test: Decompress kernel module before objdump

2017-06-07 Thread Namhyung Kim
On Wed, Jun 07, 2017 at 07:25:20PM -0300, Arnaldo Carvalho de Melo wrote: > Em Thu, Jun 08, 2017 at 12:39:01AM +0900, Namhyung Kim escreveu: > > If a kernel modules is compressed, it should be decompressed before > > running objdump to parse binary data correctly. This fix

Re: [PATCH v3 3/6] perf tools: Decompress kernel module when reading DSO data

2017-06-07 Thread Namhyung Kim
Hi Arnaldo, On Wed, Jun 07, 2017 at 07:23:05PM -0300, Arnaldo Carvalho de Melo wrote: > Em Thu, Jun 08, 2017 at 12:39:00AM +0900, Namhyung Kim escreveu: > > Currently perf decompresses kernel modules when loading symbol table but > > it missed to do it when reading raw data. >

[tip:perf/urgent] perf symbols: Use correct filename for compressed modules in build-id cache

2017-06-07 Thread tip-bot for Namhyung Kim
Commit-ID: a09935b878dc8efd4b030ed1ffa0553fc9011fb8 Gitweb: http://git.kernel.org/tip/a09935b878dc8efd4b030ed1ffa0553fc9011fb8 Author: Namhyung Kim AuthorDate: Wed, 31 May 2017 21:01:05 +0900 Committer: Arnaldo Carvalho de Melo CommitDate: Mon, 5 Jun 2017 14:17:59 -0300 perf symbols

[tip:perf/urgent] perf symbols: Set module info when build-id event found

2017-06-07 Thread tip-bot for Namhyung Kim
Commit-ID: 6b335e8f545591c07df0f34231bd7ff7506c98c1 Gitweb: http://git.kernel.org/tip/6b335e8f545591c07df0f34231bd7ff7506c98c1 Author: Namhyung Kim AuthorDate: Wed, 31 May 2017 21:01:04 +0900 Committer: Arnaldo Carvalho de Melo CommitDate: Mon, 5 Jun 2017 14:17:58 -0300 perf symbols

[tip:perf/urgent] perf header: Set proper module name when build-id event found

2017-06-07 Thread tip-bot for Namhyung Kim
Commit-ID: 1deec1bd96ccd8beb04d2112a6d12fe20505c3a6 Gitweb: http://git.kernel.org/tip/1deec1bd96ccd8beb04d2112a6d12fe20505c3a6 Author: Namhyung Kim AuthorDate: Wed, 31 May 2017 21:01:03 +0900 Committer: Arnaldo Carvalho de Melo CommitDate: Mon, 5 Jun 2017 14:16:49 -0300 perf header

[PATCH v3 2/6] perf annotate: Use dso__decompress_kmodule_path()

2017-06-07 Thread Namhyung Kim
Convert open-coded decompress routine to use the function. Signed-off-by: Namhyung Kim --- tools/perf/util/annotate.c | 27 +++ 1 file changed, 3 insertions(+), 24 deletions(-) diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c index 1367d7e35242

[PATCH v3 5/6] perf symbols: Keep DSO->symtab_type after decompress

2017-06-07 Thread Namhyung Kim
off-by: Namhyung Kim --- tools/perf/util/symbol-elf.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/perf/util/symbol-elf.c b/tools/perf/util/symbol-elf.c index d342e771dbad..502505cf236a 100644 --- a/tools/perf/util/symbol-elf.c +++ b/tools/perf/util/symbol-elf.c @@ -671,6 +671,8

[PATCH v3 6/6] perf symbols: Kill dso__build_id_is_kmod()

2017-06-07 Thread Namhyung Kim
e file and find ".ko" suffix. But this does not work for compressed kernel modules and now such DSOs have correct symtab_type now. So no need to check it anymore. This patch essentially reverts the commit. Cc: Wang Nan Signed-off-by: Namhyung Kim --- tools/

[PATCH v3 4/6] perf test: Decompress kernel module before objdump

2017-06-07 Thread Namhyung Kim
If a kernel modules is compressed, it should be decompressed before running objdump to parse binary data correctly. This fixes a failure of object code reading test for me. Signed-off-by: Namhyung Kim --- tools/perf/tests/code-reading.c | 20 +++- 1 file changed, 19 insertions

[PATCH v3 1/6] perf tools: Introduce dso__decompress_kmodule_{fd,path}

2017-06-07 Thread Namhyung Kim
Move decompress_kmodule() to util/dso.c and split it to two functions returning fd and (decompressed) file path. Existing user only wants the fd version but the path version will be used soon. Signed-off-by: Namhyung Kim --- tools/perf/util/dso.c| 51

[PATCHSET v3 0/6] perf tools: Fix for Compressed kernel modules

2017-06-07 Thread Namhyung Kim
cm/linux/kernel/git/namhyung/linux-perf.git Thanks, Namhyung Namhyung Kim (6): perf tools: Introduce dso__decompress_kmodule_{fd,path} perf annotate: Use dso__decompress_kmodule_path() perf tools: Decompress kernel module when reading DSO data perf test: Decompress kernel module before

<    4   5   6   7   8   9   10   11   12   13   >