Re: [PATCH] perf: allow specifying proc-map-timeout in config file

2018-12-04 Thread Namhyung Kim
gt; globally increase our default value. This patch permits setting a > different default with the core.proc-map-timeout config file parameter. > > Signed-off-by: Mark Drayton Acked-by: Namhyung Kim Thanks, Namhyung > --- > tools/perf/Documentation/perf-config.txt | 6 +

Re: [PATCH 3/9] tools/lib/traceevent: Install trace-seq.h API header file

2018-12-03 Thread Namhyung Kim
On Fri, Nov 30, 2018 at 10:44:06AM -0500, Steven Rostedt wrote: > From: Tzvetomir Stoyanov > > This patch installs trace-seq.h header file on "make install". > > Signed-off-by: Tzvetomir Stoyanov > Signed-off-by: Steven Rostedt (VMware) > --- > tools/lib/traceevent/Makefile | 3 ++- > 1 file

Re: [PATCH 2/9] tools/lib/traceevent: Added support for pkg-config

2018-12-03 Thread Namhyung Kim
Hi Steve, On Fri, Nov 30, 2018 at 10:44:05AM -0500, Steven Rostedt wrote: > From: Tzvetomir Stoyanov > > This patch implements integration with pkg-config framework. > pkg-config can be used by the library users to determine > required CFLAGS and LDFLAGS in order to use the library > >

Re: [PATCH v7 05/16] tracing: Generalize hist trigger onmax and save action

2018-12-03 Thread Namhyung Kim
On Mon, Dec 03, 2018 at 04:22:02PM -0600, Tom Zanussi wrote: > Hi Namhyung, > > On Fri, 2018-11-23 at 11:50 +0900, Namhyung Kim wrote: > > Hi Tom, > > > > On Wed, Nov 14, 2018 at 02:18:02PM -0600, Tom Zanussi wrote: > > > From: Tom Zanussi > > &

Re: [RFC][PATCH 02/14] fgraph: Have set_graph_notrace only affect function_graph tracer

2018-11-25 Thread Namhyung Kim
On Sat, Nov 24, 2018 at 01:41:31PM -0500, Steven Rostedt wrote: > On Sat, 24 Nov 2018 14:49:34 +0900 > Namhyung Kim wrote: > > > On Sat, Nov 24, 2018 at 2:37 AM Steven Rostedt wrote: > > > > > > On Fri, 23 Nov 2018 09:01:18 +0900 > > > Namhyung Kim wro

Re: [RFC][PATCH 02/14] fgraph: Have set_graph_notrace only affect function_graph tracer

2018-11-23 Thread Namhyung Kim
On Sat, Nov 24, 2018 at 2:37 AM Steven Rostedt wrote: > > On Fri, 23 Nov 2018 09:01:18 +0900 > Namhyung Kim wrote: > > > Acked-by: Namhyung Kim > > Thanks Namhyung! It'd be nice if you cc me for the whole patchset (and other tracing patches) next time. Thanks, Namhyung

Re: [PATCH v7 05/16] tracing: Generalize hist trigger onmax and save action

2018-11-22 Thread Namhyung Kim
On Wed, Nov 14, 2018 at 02:18:02PM -0600, Tom Zanussi wrote: > From: Tom Zanussi > > The action refactor code allowed actions and handlers to be separated, > but the existing onmax handler and save action code is still not > flexible enough to handle arbitrary coupling. This change generalizes

Re: [PATCH v7 05/16] tracing: Generalize hist trigger onmax and save action

2018-11-22 Thread Namhyung Kim
Hi Tom, On Wed, Nov 14, 2018 at 02:18:02PM -0600, Tom Zanussi wrote: > From: Tom Zanussi > > The action refactor code allowed actions and handlers to be separated, > but the existing onmax handler and save action code is still not > flexible enough to handle arbitrary coupling. This change

Re: [RFC][PATCH 02/14] fgraph: Have set_graph_notrace only affect function_graph tracer

2018-11-22 Thread Namhyung Kim
functions_graph.c and keeps it affecting only the > tracer and not all call graph callbacks. > > Signed-off-by: Steven Rostedt (VMware) Acked-by: Namhyung Kim Thanks, Namhyung > --- > kernel/trace/fgraph.c| 21 - > kernel

[PATCH v2.1] perf ui/tui: Fix possible UI rendering breakage

2018-11-20 Thread Namhyung Kim
rf ui: Introduce struct ui_helpline") Signed-off-by: Namhyung Kim --- * use browser->helpline for display instead of helpline (format) tools/perf/ui/browser.c | 7 --- tools/perf/ui/tui/helpline.c | 17 - 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/

[PATCH v2] perf ui/tui: Fix possible UI rendering breakage

2018-11-20 Thread Namhyung Kim
rf ui: Introduce struct ui_helpline") Signed-off-by: Namhyung Kim --- tools/perf/ui/browser.c | 7 --- tools/perf/ui/tui/helpline.c | 17 - 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/tools/perf/ui/browser.c b/tools/perf/ui/browser.c index 4f

Re: [PATCH 05/12] perf top: Moving lost events warning to helpline

2018-11-20 Thread Namhyung Kim
On Tue, Nov 20, 2018 at 11:04:21AM +0900, Namhyung Kim wrote: > On Mon, Nov 19, 2018 at 01:20:09PM +0100, Jiri Olsa wrote: > > We can't display the UI box saying that we are slow in reader > > thread. That will make perf top even slower and user even more > > angry ;-) >

Re: [PATCH 00/12] perf top: Rework processing code

2018-11-19 Thread Namhyung Kim
o me. And I think we can do similar for hists->lock as well. Acked-by: Namhyung Kim Thanks, Namhyung

Re: [PATCH 05/12] perf top: Moving lost events warning to helpline

2018-11-19 Thread Namhyung Kim
elpline__show() internally). Anyway, I found that tui_helpline__push() should use ui__lock. Otherwise it could race with display thread and break rendering. A bug from the beginning but no one reported... :) Thanks, Namhyung >From a5c3a0c88b9d13fedc65b61a45d99fc3abef0089 Mon Sep

Re: [PATCH RFC] hist lookups

2018-11-19 Thread Namhyung Kim
On Mon, Nov 19, 2018 at 10:12:57AM +0100, Jiri Olsa wrote: > On Mon, Nov 19, 2018 at 02:26:03PM +0900, Namhyung Kim wrote: > > Hi Jirka > > > > Sorry for late! > > > > On Tue, Nov 06, 2018 at 12:54:36PM +0100, Jiri Olsa wrote: > > > On Mon, Nov 05, 20

Re: [PATCH RFC] hist lookups

2018-11-18 Thread Namhyung Kim
On Sun, Nov 18, 2018 at 10:33:55PM -0800, David Miller wrote: > From: Namhyung Kim > Date: Mon, 19 Nov 2018 15:28:37 +0900 > > > Hello David, > > > > On Sun, Nov 18, 2018 at 08:52:43PM -0800, David Miller wrote: > >> From: Jiri Olsa > >> Date: T

Re: [PATCH RFC] hist lookups

2018-11-18 Thread Namhyung Kim
Hello David, On Sun, Nov 18, 2018 at 08:52:43PM -0800, David Miller wrote: > From: Jiri Olsa > Date: Tue, 13 Nov 2018 11:40:54 +0100 > > > I pushed/rebased what I have to perf/fixes branch again > > > > please note I had to change our compile changes, because > > they wouldn't compile on x86,

Re: [PATCH RFC] hist lookups

2018-11-18 Thread Namhyung Kim
Hi Jirka Sorry for late! On Tue, Nov 06, 2018 at 12:54:36PM +0100, Jiri Olsa wrote: > On Mon, Nov 05, 2018 at 08:53:42PM -0800, David Miller wrote: > > > > Jiri, > > > > Because you now run queued_events__queue() lockless with that condvar > > trick, it is possible for top->qe.in to be seen as

Re: [PATCH v15 0/3]: perf: reduce data loss when profiling highly parallel CPU bound workloads

2018-11-12 Thread Namhyung Kim
Hi, On Fri, Nov 09, 2018 at 09:22:42AM +0100, Jiri Olsa wrote: > On Tue, Nov 06, 2018 at 11:53:02AM +0300, Alexey Budankov wrote: > > > > Currently in record mode the tool implements trace writing serially. > > The algorithm loops over mapped per-cpu data buffers and stores > > ready data

Re: [PATCH v13 3/3]: perf record: extend trace writing to multi AIO

2018-10-12 Thread Namhyung Kim
> mode (default: 1, max: 4)", One question. It seems you used a very large N in your test result. Why did you limit it to 4 here? Is it something different? Maybe you'd better making it a macro constant for future changes.. Otherwise looks good to me. For the 3 patches Acked-by: Namh

Re: [PATCH v9 2/3]: perf record: enable asynchronous trace writing

2018-10-05 Thread Namhyung Kim
Hi, On Fri, Oct 05, 2018 at 12:39:10PM +0300, Alexey Budankov wrote: > Hi, > > On 05.10.2018 11:48, Namhyung Kim wrote: > > On Fri, Oct 05, 2018 at 11:31:11AM +0300, Alexey Budankov wrote: > > >> > >> Well, this could be implemented like this avoiding lsee

Re: [PATCH v9 2/3]: perf record: enable asynchronous trace writing

2018-10-05 Thread Namhyung Kim
On Fri, Oct 05, 2018 at 11:31:11AM +0300, Alexey Budankov wrote: > Hi, Hi, > > On 05.10.2018 10:16, Namhyung Kim wrote: > > On Wed, Oct 03, 2018 at 07:12:10PM +0300, Alexey Budankov wrote: > > >> +static void record__aio_sync(struct perf_mmap *md) > >> +{ &g

Re: [PATCH v9 3/3]: perf record: extend trace writing to multi AIO

2018-10-05 Thread Namhyung Kim
On Wed, Oct 03, 2018 at 07:17:01PM +0300, Alexey Budankov wrote: > > Multi AIO trace writing allows caching more kernel data into userspace > memory postponing trace writing for the sake of overall profiling data > thruput increase. It could be seen as kernel data buffer extension into >

Re: [PATCH v9 2/3]: perf record: enable asynchronous trace writing

2018-10-05 Thread Namhyung Kim
On Wed, Oct 03, 2018 at 07:12:10PM +0300, Alexey Budankov wrote: > > Trace file offset is calculated and updated linearly prior > enqueuing aio write at record__pushfn(). > > record__aio_sync() blocks till completion of started AIO operation > and then proceeds. > > record__mmap_read_sync()

Re: [PATCH v9 1/3]: perf util: map data buffer for preserving collected data

2018-10-05 Thread Namhyung Kim
On Wed, Oct 03, 2018 at 07:01:26PM +0300, Alexey Budankov wrote: > > The map->data buffer is used to preserve map->base profiling data > for writing to disk. AIO map->cblock is used to queue corresponding > map->data buffer for asynchronous writing. > > Signed-off-by: Alexey Budankov > --- >

Re: [RFCv2 00/48] perf tools: Add threads to record command

2018-10-05 Thread Namhyung Kim
Hi, Sorry for late.. On Mon, Sep 24, 2018 at 09:32:11PM +0300, Alexey Budankov wrote: > On 24.09.2018 17:29, Jiri Olsa wrote: > > On Mon, Sep 24, 2018 at 04:09:09PM +0300, Alexey Budankov wrote: > >> Command: > >> > >> /usr/bin/time ./perf.thr record --threads=T \ > >>-N -B -T -R

Re: [PATCH 47/48] perf record: Spread maps for --threads option

2018-09-28 Thread Namhyung Kim
Hi Arnaldo and Jiri, On Thu, Sep 27, 2018 at 06:01:58PM +0200, Jiri Olsa wrote: > On Wed, Sep 26, 2018 at 08:23:17AM +0200, Jiri Olsa wrote: > > SNIP > > > > I agree with Namhyung, with a slight difference: perhaps we should set > > > perf_event_attr.mmap on one of the events of the per-cpu

Re: [PATCH 47/48] perf record: Spread maps for --threads option

2018-09-17 Thread Namhyung Kim
On Thu, Sep 13, 2018 at 02:54:49PM +0200, Jiri Olsa wrote: > Currently we assign all maps to main thread. Adding > code that spreads maps for --threads option. > > For --thread option we create as many threads as there > are memory maps in evlist, which is the number of CPUs > in the system or

Re: [PATCH 44/48] perf record: Add --threads option

2018-09-17 Thread Namhyung Kim
On Thu, Sep 13, 2018 at 02:54:46PM +0200, Jiri Olsa wrote: > Allows to assign number to record::threads_cnt and thus > to create multiple threads. At this point we don't allow > to specify number of threads, instead we assign it number > of evlist's mmaps to have a single thread for each. > >

Re: [PATCH 39/48] perf record: Move waking into struct record

2018-09-17 Thread Namhyung Kim
On Thu, Sep 13, 2018 at 02:54:41PM +0200, Jiri Olsa wrote: > We need to keep global number of 'waking' now. > > TODO: make this multiple threads safe. Why not using atomic APIs? Thanks, Namhyung > > Link: http://lkml.kernel.org/n/tip-veetgk62aisdt1cxaa6fb...@git.kernel.org > Signed-off-by:

Re: [PATCH 38/48] perf record: Read record thread's mmaps

2018-09-17 Thread Namhyung Kim
On Thu, Sep 13, 2018 at 02:54:40PM +0200, Jiri Olsa wrote: > Switch the maps source from evlist into thread data. > > Link: http://lkml.kernel.org/n/tip-2r6hn6shl185j66b4vl1k...@git.kernel.org > Signed-off-by: Jiri Olsa > --- > tools/perf/builtin-record.c | 37

Re: [PATCH 37/48] perf record: Introduce struct record_thread

2018-09-17 Thread Namhyung Kim
Hi Jiri, On Thu, Sep 13, 2018 at 02:54:39PM +0200, Jiri Olsa wrote: > Adding struct record_thread to carry the single thread's maps. > > Link: http://lkml.kernel.org/n/tip-dsyi97xdc7ullvsisqmha...@git.kernel.org > Signed-off-by: Jiri Olsa > --- > tools/perf/builtin-record.c | 179

Re: [RFCv2 00/48] perf tools: Add threads to record command

2018-09-13 Thread Namhyung Kim
ptions > > perf tools: Move __perf_session__process_events args into struct > > perf ui progress: Fix index progress display > > perf tools: Add threads debug variable > > perf tools: Add perf_mmap__read_tail function > > perf record: Int

Re: [RFC] perf script: callchain handling is not useful

2018-08-29 Thread Namhyung Kim
Hi, On Wed, Aug 29, 2018 at 08:14:12AM -0700, Stephane Eranian wrote: > On Wed, Aug 29, 2018 at 6:54 AM Arnaldo Carvalho de Melo > wrote: > > > > Em Tue, Aug 28, 2018 at 07:41:31PM -0700, Stephane Eranian escreveu: > > > Hi, > > > > > > I am doing the following simple collection with callchain

Re: [PATCHv2] perf tools: Add struct ordered_events_buffer layer

2018-08-27 Thread Namhyung Kim
bject, > that holds the buffer data and frees it up properly. > > [1] - https://marc.info/?l=linux-kernel=153376761329335=2 > > Reported-by: Stephane Eranian > Link: http://lkml.kernel.org/n/tip-qrkcqm5m1sugy4q83pfn5...@git.kernel.org > Signed-off-by: Jiri Olsa

Re: [PATCH] Properly interpret indirect call in perf annotate.

2018-08-27 Thread Namhyung Kim
Hello, On Thu, Aug 23, 2018 at 02:29:34PM +0200, Martin Liška wrote: > The patch changes interpretation of: > callq *0x8(%rbx) > > from: > 0.26 │ → callq *8 > to: > 0.26 │ → callq *0x8(%rbx) > > in this can an address is followed by a register, thus > one can't parse only

Re: [PATCH v2 2/2]: perf record: enable asynchronous trace writing

2018-08-27 Thread Namhyung Kim
Hello, On Mon, Aug 27, 2018 at 12:33:07PM +0300, Alexey Budankov wrote: > Hi, > > On 27.08.2018 11:38, Jiri Olsa wrote: > > On Thu, Aug 23, 2018 at 07:47:01PM +0300, Alexey Budankov wrote: > > > > SNIP > > > >> static int record__mmap_read_evlist(struct record *rec, struct > >> perf_evlist

Re: [PATCH v3 6/7] tracing: Add snapshot action

2018-08-10 Thread Namhyung Kim
On Thu, Aug 09, 2018 at 09:34:16AM -0500, Tom Zanussi wrote: > From: Tom Zanussi > > Add support for hist:handlerXXX($var).snapshot(), which will take a > snapshot of the current trace buffer whenever handlerXXX is hit. > > As a first user, this also adds snapshot() action support for the >

Re: [PATCH v3 4/7] tracing: Add conditional snapshot

2018-08-10 Thread Namhyung Kim
On Thu, Aug 09, 2018 at 09:34:14AM -0500, Tom Zanussi wrote: > From: Tom Zanussi > > Currently, tracing snapshots are context-free - they capture the ring > buffer contents at the time the tracing_snapshot() function was > invoked, and nothing else. Additionally, they're always taken >

Re: [PATCH v3 1/7] tracing: Refactor hist trigger action code

2018-08-10 Thread Namhyung Kim
Hi Tom, On Thu, Aug 09, 2018 at 09:34:11AM -0500, Tom Zanussi wrote: > From: Tom Zanussi > > The hist trigger action code currently implements two essentially > hard-coded pairs of 'actions' - onmax(), which tracks a variable and > saves some event fields when a max is hit, and onmatch(), which

Re: [PATCH] perf tools: Check for null when copying nsinfo.

2018-08-09 Thread Namhyung Kim
CORD_MMAP event associating the '[vdso]' dso with pid 0 earlier in > the event stream will lead to a segfault. > > Since all calling code is already checking for a non-null return value, > just return NULL for this case as well. Acked-by: Namhyung Kim It seems you missed the Si

Re: [PATCH 19/20] perf annotate: Add --percent-type option

2018-08-06 Thread Namhyung Kim
On Sat, Aug 04, 2018 at 03:05:20PM +0200, Jiri Olsa wrote: > Adding --percent-type option to set annotation percent type > from following choices: > global-period, local-period, global-hits, local-hits > > Examples: > $ perf annotate --percent-type period-local --stdio | head -1 >Percent

Re: [PATCH 14/20] perf annotate: Pass struct annotation_options to map_symbol__annotation_dump

2018-08-06 Thread Namhyung Kim
Hi Jiri, On Sat, Aug 04, 2018 at 03:05:15PM +0200, Jiri Olsa wrote: > Passing struct annotation_options to map_symbol__annotation_dump, > to carry on and pass the percent_type value. > > Link: http://lkml.kernel.org/n/tip-5toohgdkgpk3vn6zebusr...@git.kernel.org > Signed-off-by: Jiri Olsa > ---

Re: [PATCH 4/4] perf tools: Fix struct comm_str removal crash

2018-07-19 Thread Namhyung Kim
rom the kernel, trying to see how this is used with __get() operations > there, if at all. Something like this? static struct comm_str *comm_str__get(struct comm_str *cs) { if (cs && refcount_inc_not_zero(>refcnt)) return cs; return NULL; } Other than that I don't have better idea, so Acked-by: Namhyung Kim Thanks, Namhyung

Re: [PATCH 1/4] perf tools: Fix struct comm_str removal crash

2018-07-16 Thread Namhyung Kim
Hi Jiri, On Mon, Jul 16, 2018 at 12:29:34PM +0200, Jiri Olsa wrote: > On Sun, Jul 15, 2018 at 10:08:27PM +0900, Namhyung Kim wrote: > > SNIP > > > > Because thread 2 first decrements the refcnt and only after then it > > > removes the struct comm_str from t

Re: [PATCH 1/4] perf tools: Fix struct comm_str removal crash

2018-07-15 Thread Namhyung Kim
Hi Jiri, On Thu, Jul 12, 2018 at 04:20:20PM +0200, Jiri Olsa wrote: > We occasionaly hit following assert failure in perf top, > when processing the /proc info in multiple threads. > > perf: ...include/linux/refcount.h:109: refcount_inc: > Assertion `!(!refcount_inc_not_zero(r))'

Re: [PATCH v2] perf script python: Fix dict reference counting

2018-07-11 Thread Namhyung Kim
ects. > > Signed-off-by: Janne Huttunen Acked-by: Namhyung Kim Thanks, Namhyung

Re: [PATCH v8 6/8] tracing: Centralize preemptirq tracepoints and unify their usage

2018-05-30 Thread Namhyung Kim
LED|FAILED| ok | > [0.00] soft-safe-A + irqs-on/21:FAILED|FAILED| ok | > [0.00] hard-safe-A + unsafe-B #1/123: ok | ok | ok | > [0.00] soft-safe-A + unsafe-B #1/123: ok | ok | ok | > > Signed-off-by: Joel Fernandes (Google) Re

Re: [PATCH v7 6/8] tracing: Centralize preemptirq tracepoints and unify their usage

2018-05-25 Thread Namhyung Kim
Hi Joel, On Wed, May 23, 2018 at 06:21:55PM -0700, Joel Fernandes wrote: > From: "Joel Fernandes (Google)" > > This patch detaches the preemptirq tracepoints from the tracers and > keeps it separate. > > Advantages: > * Lockdep and irqsoff event can now run in parallel

Re: [PATCH v3 00/14] tracing: Add triggers to trace_marker writes

2018-05-22 Thread Namhyung Kim
eset_trigger() to handle triggers with filters > tracing/selftest: Add selftests to test trace_marker histogram triggers > tracing/selftest: Add test to test hist trigger between kernel event > and trace_marker > > For the series: Reviewed-by: Namhyung Kim <n

Re: [PATCH v2 14/14] tracing/selftest: Add test to test hist trigger between kernel event and trace_marker

2018-05-16 Thread Namhyung Kim
On Mon, May 14, 2018 at 04:58:59PM -0400, Steven Rostedt wrote: > From: "Steven Rostedt (VMware)" > > Add a test that tests a trigger that is initiated by a kernel event > (sched_waking) and compared to a write to the trace_marker. > > Signed-off-by: Steven Rostedt (VMware)

Re: [PATCH v2 05/14] tracing: Do not show filter file for ftrace internal events

2018-05-16 Thread Namhyung Kim
On Mon, May 14, 2018 at 04:58:50PM -0400, Steven Rostedt wrote: > From: "Steven Rostedt (VMware)" > > The filter file in the ftrace internal events, like in > /sys/kernel/tracing/events/ftrace/function/filter is not attached to any > functionality. Do not create them as they

Re: [RFC][PATCH 06/10] tracing: Add trigger file for trace_markers tracefs/ftrace/print

2018-05-16 Thread Namhyung Kim
Hi Steve, On Mon, May 14, 2018 at 11:04:36AM -0400, Steven Rostedt wrote: > On Mon, 14 May 2018 12:13:22 +0900 > Namhyung Kim <namhy...@kernel.org> wrote: > > > On Fri, May 11, 2018 at 03:49:33PM -0400, Steven Rostedt wrote: > > > From: "Steven Ros

Re: [RFC][PATCH 06/10] tracing: Add trigger file for trace_markers tracefs/ftrace/print

2018-05-13 Thread Namhyung Kim
On Fri, May 11, 2018 at 03:49:33PM -0400, Steven Rostedt wrote: > From: "Steven Rostedt (VMware)" > > Allow writing to the trace_markers file initiate triggers defined in > tracefs/ftrace/print/trigger file. This will allow of user space to trigger > the same type of

Re: [RFC][PATCH 07/10] tracing: Have zero size length in filter logic be full string

2018-05-13 Thread Namhyung Kim
Hi, On Sat, May 12, 2018 at 08:32:18PM +0200, Yann Ylavic wrote: > On Fri, May 11, 2018 at 9:49 PM, Steven Rostedt wrote: > [] > > > > static int regex_match_front(char *str, struct regex *r, int len) > > { > > - if (len < r->len) > > + if (len && len < r->len)

[tip:perf/urgent] perf machine: Set main kernel end address properly

2018-04-25 Thread tip-bot for Namhyung Kim
Commit-ID: ee05d21791db6db954bbb7b79bb18d88b5f6b7ff Gitweb: https://git.kernel.org/tip/ee05d21791db6db954bbb7b79bb18d88b5f6b7ff Author: Namhyung Kim <namhy...@kernel.org> AuthorDate: Mon, 19 Feb 2018 19:05:45 +0900 Committer: Arnaldo Carvalho de Melo <a...@redhat.com> CommitD

Re: [PATCH] perf tools: set kernel end address properly

2018-04-19 Thread Namhyung Kim
On Thu, Apr 19, 2018 at 06:33:13PM -0500, Kim Phillips wrote: > On Thu, 19 Apr 2018 11:54:24 +0900 > Namhyung Kim <namhy...@kernel.org> wrote: > > > On Wed, Apr 18, 2018 at 07:37:59PM -0500, Kim Phillips wrote: > > > diff --git a/tools/perf/arch/arm64/util/sym-handl

Re: [PATCH] perf tools: set kernel end address properly

2018-04-19 Thread Namhyung Kim
On Thu, Apr 19, 2018 at 06:20:24PM -0500, Kim Phillips wrote: > On Thu, 19 Apr 2018 11:37:12 +0900 > Namhyung Kim <namhy...@kernel.org> wrote: > > I think the problem is perf assumes the kernel is the > > first map in the kmaps. When it calls maps_groups__insert() it use

Re: [RFC v4 3/4] irqflags: Avoid unnecessary calls to trace_ if you can

2018-04-18 Thread Namhyung Kim
On Wed, Apr 18, 2018 at 06:02:50PM +0900, Masami Hiramatsu wrote: > On Mon, 16 Apr 2018 21:07:47 -0700 > Joel Fernandes wrote: > > > With TRACE_IRQFLAGS, we call trace_ API too many times. We don't need > > to if local_irq_restore or local_irq_save didn't actually do anything.

Re: [PATCH] perf tools: set kernel end address properly

2018-04-18 Thread Namhyung Kim
On Wed, Apr 18, 2018 at 07:37:59PM -0500, Kim Phillips wrote: > diff --git a/tools/perf/arch/arm64/util/sym-handling.c > b/tools/perf/arch/arm64/util/sym-handling.c > index 0051b1ee8450..5c4a2e208bbc 100644 > --- a/tools/perf/arch/arm64/util/sym-handling.c > +++

Re: [PATCH] perf tools: set kernel end address properly

2018-04-18 Thread Namhyung Kim
On Wed, Apr 18, 2018 at 07:37:59PM -0500, Kim Phillips wrote: > On Tue, 17 Apr 2018 11:27:26 +0900 > Namhyung Kim <namhy...@kernel.org> wrote: > > On Mon, Apr 16, 2018 at 05:48:11PM -0500, Kim Phillips wrote: > > > > a perf/urgent from last week (co

Re: [PATCH 2/6] tracing: Add trace event error log

2018-04-18 Thread Namhyung Kim
Hi guys, :) On Wed, Apr 18, 2018 at 09:49:24AM -0400, Steven Rostedt wrote: > On Wed, 18 Apr 2018 18:34:34 +0900 > Masami Hiramatsu wrote: > > > On Fri, 13 Apr 2018 10:44:32 -0400 > > Steven Rostedt wrote: > > > > > On Fri, 13 Apr 2018 09:24:34 -0500

Re: [PATCH 17/17] perf annotate: Handle variables in 'sub', 'or' and many other instructions

2018-04-16 Thread Namhyung Kim
Hi, On Fri, Apr 13, 2018 at 10:39:40AM -0700, Andi Kleen wrote: > > What do I miss? Or where is it that I'm misinterpreting the calculations > > that objdump did in its output? > > The calculations are right, but these are still two different address modes. > You cannot just turn one silently

Re: [PATCH] perf tools: set kernel end address properly

2018-04-16 Thread Namhyung Kim
t; Em Mon, Apr 16, 2018 at 11:07:30AM -0500, Kim Phillips escreveu: > > > > On Mon, 16 Apr 2018 10:51:25 -0300 > > > > Arnaldo Carvalho de Melo <a...@kernel.org> wrote: > > > > > > > > > Em Mon, Apr 16, 2018 at 11:23

[PATCH] perf tools: set kernel end address properly

2018-04-15 Thread Namhyung Kim
the map_groups__fixup_end(). If there's no module after the kernel map, the end address will be ~0ULL. Reported-by: Kim Phillips <kim.phill...@arm.com> Signed-off-by: Namhyung Kim <namhy...@kernel.org> --- tools/perf/util/machine.c | 20 1 file changed, 8 insertions(+),

Re: [PATCH] Revert "perf machine: Fix paranoid check in machine__set_kernel_mmap()"

2018-04-13 Thread Namhyung Kim
On Thu, Apr 12, 2018 at 07:09:54PM -0500, Kim Phillips wrote: > On Thu, 12 Apr 2018 10:57:56 +0900 > Namhyung Kim <namhy...@kernel.org> wrote: > > > On Wed, Apr 11, 2018 at 07:29:40PM -0500, Kim Phillips wrote: > > > On Thu, 12 Apr 2018 08:31:09 +0900 > >

Re: [PATCH] Revert "perf machine: Fix paranoid check in machine__set_kernel_mmap()"

2018-04-11 Thread Namhyung Kim
On Wed, Apr 11, 2018 at 07:29:40PM -0500, Kim Phillips wrote: > On Thu, 12 Apr 2018 08:31:09 +0900 > Namhyung Kim <namhy...@kernel.org> wrote: > > > Hello, > > Hi, > > > On Wed, Apr 11, 2018 at 06:07:52PM -0500, Kim Phillips wrote: > > > --- > &

Re: [PATCH] Revert "perf machine: Fix paranoid check in machine__set_kernel_mmap()"

2018-04-11 Thread Namhyung Kim
restore_nameidata > 7.60% true [kernel.kallsyms] [k] perf_iterate_ctx.constprop.38 > 0.69% perf.go [kernel.kallsyms] [k] perf_event_exec > > Cc: Arnaldo Carvalho de Melo <a...@kernel.org> > Cc: Namhyung Kim <namhy...@kernel.org> > Cc: Jiri Olsa <jo...@kernel.org>

Re: [PATCH v2 1/2] perf sched: move thread::shortname to thread_runtime

2018-03-06 Thread Namhyung Kim
Hi, On Tue, Mar 06, 2018 at 11:37:36AM +0800, changbin...@intel.com wrote: > From: Changbin Du > > The thread::shortname only used by sched command, so move it > to sched private structure. > > Signed-off-by: Changbin Du > --- [SNIP] > diff --git

Re: [RESEND PATCH] perf sched map: re-annotate shortname if thread comm changed

2018-03-05 Thread Namhyung Kim
Hi, On Mon, Mar 05, 2018 at 11:37:54PM +0100, Jiri Olsa wrote: > On Mon, Mar 05, 2018 at 03:11:36PM +0800, Du, Changbin wrote: > > SNIP > > > > > on the other hand it's simple enough and looks > > > > like generic solution would be more tricky > > > > > > What about adding

Re: [PATCH v4 01/19] [BUGFIX] tracing: probeevent: Fix to support minus offset from symbol

2018-03-04 Thread Namhyung Kim
Hi Masami, On Fri, Mar 02, 2018 at 03:32:29PM +0900, Masami Hiramatsu wrote: > On Fri, 2 Mar 2018 13:49:51 +0900 > Namhyung Kim <namhy...@kernel.org> wrote: > > > Hi Masami, > > > > On Wed, Feb 28, 2018 at 12:19:53PM +0900, Masami Hiramatsu wrote: > > &

Re: [RESEND PATCH] perf sched map: re-annotate shortname if thread comm changed

2018-03-02 Thread Namhyung Kim
Hi, On Fri, Mar 02, 2018 at 12:38:45PM +0100, Jiri Olsa wrote: > On Fri, Mar 02, 2018 at 06:52:54PM +0800, Du, Changbin wrote: > > Hello, any comment? > > sry, overlooked this one > > SNIP > > > > diff --git a/tools/perf/util/thread.c b/tools/perf/util/thread.c > > > index 68b65b1..c660fe6

Re: [PATCH v4 18/19] selftests: ftrace: Add a testcase for $argN with kprobe_event

2018-03-01 Thread Namhyung Kim
On Wed, Feb 28, 2018 at 12:28:11PM +0900, Masami Hiramatsu wrote: > Add a testcase for array type with kprobe event. > This tests whether the traced data is correct or not. > If the kernel doesn't support array type, it skips > the test as UNSUPPORTED. This description is wrong - it's for

Re: [PATCH v4 01/19] [BUGFIX] tracing: probeevent: Fix to support minus offset from symbol

2018-03-01 Thread Namhyung Kim
Hi Masami, On Wed, Feb 28, 2018 at 12:19:53PM +0900, Masami Hiramatsu wrote: > In Documentation/trace/kprobetrace.txt, it says > > @SYM[+|-offs] : Fetch memory at SYM +|- offs (SYM should be a data symbol) > > However, the parser doesn't parse minus offset correctly, since > commit

Re: [PATCH v3 15/18] tracing: probeevent: Add array type support

2018-02-25 Thread Namhyung Kim
On Sat, Feb 24, 2018 at 02:35:40PM +0900, Masami Hiramatsu wrote: > Add array type support for probe events. > This allows user to get arraied types from memory address. > The array type syntax is > > TYPE[N] > > Where TYPE is one of types (u8/16/32/64,s8/16/32/64, > x8/16/32/64, symbol,

Re: [PATCH v3 01/18] [BUGFIX] tracing: probeevent: Fix to support minus offset from symbol

2018-02-25 Thread Namhyung Kim
Hi Masami, On Sat, Feb 24, 2018 at 02:28:52PM +0900, Masami Hiramatsu wrote: > In Documentation/trace/kprobetrace.txt, it says > > @SYM[+|-offs] : Fetch memory at SYM +|- offs (SYM should be a data symbol) > > However, the parser doesn't parse minus offset correctly, since > commit

Re: [PATCH v2 07/17] tracing: probeevent: Introduce new argument fetching code

2018-02-22 Thread Namhyung Kim
On Wed, Feb 21, 2018 at 11:57:36PM +0900, Masami Hiramatsu wrote: > Replace {k,u}probe event argument fetching framework > with switch-case based. Currently that is implemented > with structures, macros and chain of function-pointers, > which is more complicated than necessary and may get > a

Re: [BUGFIX PATCH v2.1] tracing: probeevent: Fix to support minus offset from symbol

2018-02-22 Thread Namhyung Kim
Hi Masami, On Thu, Feb 22, 2018 at 04:45:01PM +0900, Masami Hiramatsu wrote: > In Documentation/trace/kprobetrace.txt, it says > > @SYM[+|-offs] : Fetch memory at SYM +|- offs (SYM should be a data symbol) > > However, the parser doesn't parse minus offset correctly, since > commit

[tip:perf/core] perf machine: Fix paranoid check in machine__set_kernel_mmap()

2018-02-21 Thread tip-bot for Namhyung Kim
Commit-ID: 1d12cec6ce99614297e10945d917fd8a62cd2b09 Gitweb: https://git.kernel.org/tip/1d12cec6ce99614297e10945d917fd8a62cd2b09 Author: Namhyung Kim <namhy...@kernel.org> AuthorDate: Mon, 19 Feb 2018 19:00:46 +0900 Committer: Arnaldo Carvalho de Melo <a...@redhat.com> CommitD

Re: [PATCH 6/9] perf tools: Don't search for active kernel start in __machine__create_kernel_maps

2018-02-19 Thread Namhyung Kim
Hi Arnaldo, On Mon, Feb 19, 2018 at 9:21 PM, Arnaldo Carvalho de Melo <a...@kernel.org> wrote: > Em Mon, Feb 19, 2018 at 11:20:36AM +0900, Namhyung Kim escreveu: >> On Thu, Feb 15, 2018 at 01:26:32PM +0100, Jiri Olsa wrote: >> > if (!machine__get_runn

Re: [PATCH 6/9] perf tools: Don't search for active kernel start in __machine__create_kernel_maps

2018-02-19 Thread Namhyung Kim
On Mon, Feb 19, 2018 at 11:01:40AM +0100, Jiri Olsa wrote: > On Mon, Feb 19, 2018 at 11:20:36AM +0900, Namhyung Kim wrote: > > SNIP > > > > +static void machine__set_kernel_mmap(struct machine *machine, > > > + u64 start, u

Re: [PATCH v4] perf ftrace: Append an EOL when write tracing files

2018-02-18 Thread Namhyung Kim
ed error is hidden. > > The original fix is to make the kernel support '\0' as end of string: > https://lkml.org/lkml/2018/1/16/116 > > But above fix cannot be compatible with old kernels. Then Namhyung Kim > suggest adding a space after function name. > > This patch will

Re: [PATCH 6/9] perf tools: Don't search for active kernel start in __machine__create_kernel_maps

2018-02-18 Thread Namhyung Kim
Hi Jiri and Arnaldo, On Thu, Feb 15, 2018 at 01:26:32PM +0100, Jiri Olsa wrote: > We should not search for kernel start address in > __machine__create_kernel_maps function, because it's being > used in 'report' code path, where we are interested in kernel > MMAP data address instead of in current

Re: [PATCH v3] perf ftrace: Append an EOL when write tracing files

2018-02-18 Thread Namhyung Kim
The expected error is hidden. > > The original fix is to make the kernel support '\0' as end of string: > https://lkml.org/lkml/2018/1/16/116 > > But above fix cannot be compatible with old kernels. Then Namhyung Kim > suggest adding a space after function name. > > This pa

Re: [PATCH 17/18] tracing: Add indirect to indirect access for function based events

2018-02-13 Thread Namhyung Kim
Hi Steve, On Mon, Feb 12, 2018 at 12:23:54PM -0500, Steven Rostedt wrote: > On Mon, 12 Feb 2018 11:15:34 +0900 > Namhyung Kim <namhy...@kernel.org> wrote: > > > > It should have been: > > > > > > return process_redirects(arg, val, buf); >

Re: [PATCH v2] perf ftrace: Fix the buffer size in __write_tracing_file

2018-02-11 Thread Namhyung Kim
On Mon, Feb 12, 2018 at 12:48:15PM +0800, Du, Changbin wrote: > Hi, > > On Mon, Feb 12, 2018 at 10:55:27AM +0900, Namhyung Kim wrote: > > Hello, > > > > On Thu, Feb 08, 2018 at 04:13:20PM +0800, changbin...@intel.com wrote: > > > From

Re: [PATCH 17/18] tracing: Add indirect to indirect access for function based events

2018-02-11 Thread Namhyung Kim
On Fri, Feb 09, 2018 at 10:47:58AM -0500, Steven Rostedt wrote: > On Fri, 9 Feb 2018 14:13:01 +0900 > Namhyung Kim <namhy...@kernel.org> wrote: > > > On Fri, Feb 02, 2018 at 06:05:15PM -0500, Steven Rostedt wrote: > > > From: "Steven Rostedt (VMware)"

Re: [PATCH 12/18] tracing: Add accessing direct address from function based events

2018-02-11 Thread Namhyung Kim
Hi Steve, On Fri, Feb 09, 2018 at 05:07:37PM -0500, Steven Rostedt wrote: > On Fri, 9 Feb 2018 09:34:36 +0900 > Namhyung Kim <namhy...@kernel.org> wrote: > > > Couldn't we use the symbol name directly? Maybe it needs a syntax to > > indicate global variable. L

Re: [PATCH v2] perf ftrace: Fix the buffer size in __write_tracing_file

2018-02-11 Thread Namhyung Kim
Hello, On Thu, Feb 08, 2018 at 04:13:20PM +0800, changbin...@intel.com wrote: > From: Changbin Du > > The terminal character '\0' should take into account into size of the > string buffer. Without this fix, the '--graph-funcs', '--nograph-funcs' > and '--trace-funcs'

Re: [PATCH] tracing/fgraph: Missed irq return mark for leaf entry

2018-02-11 Thread Namhyung Kim
smp_apic_timer_interrupt(); > 0) <== | > 0) + 36.507 us | } /* __vfs_write */ > 0) 0.049 us| __fsnotify_parent(); > 0) 0.066 us| fsnotify(); > 0) + 50.064 us |} > 0) + 50.952 us | } > > Signed-off-by: Changbin Du <changb

Re: [PATCH 2/2] perf mem: Document a missing option

2018-02-11 Thread Namhyung Kim
On Mon, Feb 12, 2018 at 05:38:37AM +0900, Sangwon Hong wrote: > Add the missing --force option on the man page. > > Cc: Jiri Olsa <jo...@kernel.org> > Cc: Namhyung Kim <namhy...@kernel.org> > Cc: Taeung Song <treeze.tae...@gmail.com> > Signed-off-by: Sa

Re: [PATCH 1/2] perf kmem: Document a missing option & an argument

2018-02-11 Thread Namhyung Kim
tion's argument. > > Cc: Jiri Olsa <jo...@kernel.org> > Cc: Namhyung Kim <namhy...@kernel.org> > Cc: Taeung Song <treeze.tae...@gmail.com> > Signed-off-by: Sangwon Hong <qpa...@gmail.com> Acked-by: Namhyung Kim <namhy...@kernel.org> A nit below th

Re: [PATCH] perf kallsyms: Fix the usage on the man page

2018-02-11 Thread Namhyung Kim
, so add square > brackets between . > > Cc: Jiri Olsa <jo...@kernel.org> > Cc: Namhyung Kim <namhy...@kernel.org> > Cc: Taeung Song <treeze.tae...@gmail.com> > Signed-off-by: Sangwon Hong <qpa...@gmail.com> Acked-by: Namhyung Kim <namhy...@kernel.org

Re: [PATCH 17/18] tracing: Add indirect to indirect access for function based events

2018-02-08 Thread Namhyung Kim
On Fri, Feb 02, 2018 at 06:05:15PM -0500, Steven Rostedt wrote: > From: "Steven Rostedt (VMware)" > > Allow the function based events to retrieve not only the parameters offsets, > but also get data from a pointer within a parameter structure. Something > like: > > # echo

Re: [PATCH 15/18] tracing: Add string type for dynamic strings in function based events

2018-02-08 Thread Namhyung Kim
On Fri, Feb 02, 2018 at 06:05:13PM -0500, Steven Rostedt wrote: > From: "Steven Rostedt (VMware)" > > Add a "string" type that will create a dynamic length string for the > event, this is the same as the __string() field in normal TRACE_EVENTS. > > [ missing 'static' found

Re: [PATCH 13/18] tracing: Add array type to function based events

2018-02-08 Thread Namhyung Kim
On Fri, Feb 02, 2018 at 06:05:11PM -0500, Steven Rostedt wrote: > From: "Steven Rostedt (VMware)" > > Add syntex to allow the user to create an array type. Brackets after the > type field will denote that this is an array type. For example: > > # echo 'SyS_open(x8[32] buf,

Re: [PATCH 12/18] tracing: Add accessing direct address from function based events

2018-02-08 Thread Namhyung Kim
On Fri, Feb 02, 2018 at 06:05:10PM -0500, Steven Rostedt wrote: > From: "Steven Rostedt (VMware)" > > Allow referencing any address during the function based event. The syntax is > to use = For example: > > # echo 'do_IRQ(long total_forks=0xa2a4b4c0)' >

Re: [PATCH 09/18] tracing: Add indexing of arguments for function based events

2018-02-08 Thread Namhyung Kim
On Thu, Feb 08, 2018 at 10:43:43AM -0500, Steven Rostedt wrote: > On Thu, 8 Feb 2018 19:59:24 +0900 > Namhyung Kim <namhy...@kernel.org> wrote: > > > > @@ -347,6 +361,8 @@ static long long get_arg(struct func_arg *arg, > > > unsigned long val) >

Re: [PATCH 11/18] tracing: Add symbol type to function based events

2018-02-08 Thread Namhyung Kim
On Fri, Feb 02, 2018 at 06:05:09PM -0500, Steven Rostedt wrote: > From: "Steven Rostedt (VMware)" > > Add a special type "symbol" that will use %pS to display the field of a > function based event. > > Signed-off-by: Steven Rostedt (VMware) > --- >

Re: [PATCH 09/18] tracing: Add indexing of arguments for function based events

2018-02-08 Thread Namhyung Kim
On Fri, Feb 02, 2018 at 06:05:07PM -0500, Steven Rostedt wrote: > From: "Steven Rostedt (VMware)" > > Currently reading of 8 byte words can only happen 8 bytes aligned from the > argument. But there may be cases that they are 4 bytes aligned. To make the > capturing of

  1   2   3   4   5   6   7   8   9   10   >