[PATCH 17/19] perf ftrace: Add --clock option

2013-06-26 Thread Namhyung Kim
From: Namhyung Kim The --clock (-c) option is for controlling trace_clock. Default to 'perf' if exists, or 'local'. Cc: Steven Rostedt Cc: Frederic Weisbecker Signed-off-by: Namhyung Kim --- tools/perf/builtin-ftrace.c | 31 +++ 1 file ch

[PATCH 08/19] perf ftrace: Split "live" sub-command

2013-06-26 Thread Namhyung Kim
From: Namhyung Kim Separate out the default behavior to "live" subcommand. It's a preparation to support more subcommands like "record" and "report". Cc: Steven Rostedt Cc: Frederic Weisbecker Signed-off-by: Namhyung Kim ---

[PATCH 10/19] perf ftrace: Add 'show' sub-command

2013-06-26 Thread Namhyung Kim
From: Namhyung Kim The ftrace show subcommand is for viewing recorded ftrace files. It enters perf.data.dir directory and open perf.header file to find out necessary information. And then read out per-cpu trace records using kbuffer helper and print them to stdout in time order. It only shows

[PATCH 15/19] perf tools: Add document for perf-ftrace command

2013-06-26 Thread Namhyung Kim
From: Namhyung Kim Cc: Steven Rostedt Cc: Frederic Weisbecker Signed-off-by: Namhyung Kim --- tools/perf/Documentation/perf-ftrace.txt | 114 +++ 1 file changed, 114 insertions(+) create mode 100644 tools/perf/Documentation/perf-ftrace.txt diff --git a/tools

[PATCH 11/19] perf ftrace: Add 'report' sub-command

2013-06-26 Thread Namhyung Kim
From: Namhyung Kim The ftrace report command is for analyzing ftrace result as usual perf report style. Internal processing of the ftrace buffer is similar to the 'show' sub-command but it synthesizes necessary information like thread, dso, map and symbol from saved trace info. It

[PATCH 06/19] perf ftrace: Add support for --pid option

2013-06-26 Thread Namhyung Kim
From: Namhyung Kim The -p (--pid) option enables to trace existing process by its pid. Cc: Steven Rostedt Cc: Frederic Weisbecker Signed-off-by: Namhyung Kim --- tools/perf/builtin-ftrace.c | 89 - 1 file changed, 63 insertions(+), 26 deletions

[PATCH 12/19] perf evlist: Enhance perf_evlist__start_workload()

2013-06-26 Thread Namhyung Kim
From: Namhyung Kim When perf tries to start a workload, it relies on a pipe which the workload was blocked for reading. After closing the pipe on the parent, the workload (child) can start the actual work via exec(). However, if another process was forked after creating a workload, this

[PATCH 09/19] perf ftrace: Add 'record' sub-command

2013-06-26 Thread Namhyung Kim
From: Namhyung Kim The ftrace record command is for saving raw ftrace buffer contents which can be get from per_cpu/cpuX/trace_pipe_raw. Since ftrace events are generated very frequently so single thread for recording mostly resulted in buffer overruns. Thus it uses per-cpu recorder thread to

[PATCH 02/19] perf util: Use evsel->name to get tracepoint_paths

2013-06-26 Thread Namhyung Kim
From: Namhyung Kim Most tracepoint events already have their system and event name in ->name field so that searching whole event tracing directory for each evsel to match given id is suboptimal. Factor out this routine into tracepoint_name_to_path(). In case of en invalid name, it'l

[PATCH 05/19] perf tools: Introduce new 'ftrace' tool

2013-06-26 Thread Namhyung Kim
From: Namhyung Kim The ftrace command is a simple wrapper of kernel's ftrace functionality. It only supports single thread tracing currently and just reads trace_pipe in text and then write it to stdout. Cc: Steven Rostedt Cc: Frederic Weisbecker Signed-off-by: Namhyung Kim --- tools

[PATCH 01/19] perf util: Move debugfs/tracing helper functions to util.c

2013-06-26 Thread Namhyung Kim
From: Namhyung Kim Since they're generic helpers move them to util.c so that they can be used by others. Cc: Steven Rostedt Cc: Frederic Weisbecker Signed-off-by: Namhyung Kim --- tools/perf/util/trace-event-info.c | 59 -- tools/perf/util/u

[PATCH 04/19] perf util: Add more debug message on failure path

2013-06-26 Thread Namhyung Kim
From: Namhyung Kim It's helpful for debugging on tracing features. Signed-off-by: Namhyung Kim --- tools/perf/util/header.c | 4 ++- tools/perf/util/trace-event-read.c | 53 ++ 2 files changed, 39 insertions(+), 18 deletions(-) diff --

[PATCHSET 00/19] perf tools: Introduce new 'ftrace' command (v3)

2013-06-26 Thread Namhyung Kim
ote that this patchset is based on my previous work. https://lkml.org/lkml/2013/6/4/45 Any comments are welcome, thanks, Namhyung Namhyung Kim (19): perf util: Move debugfs/tracing helper functions to util.c perf util: Use evsel->name to get tracepoint_paths perf util: Save pid-cmdline

[PATCH 03/19] perf util: Save pid-cmdline mapping into tracing header

2013-06-26 Thread Namhyung Kim
From: Namhyung Kim Current trace info data lacks the saved cmdline mapping which is needed for pevent to find out the comm of a task. Add this and bump up the version number so that perf can determine its presence when reading. This is mostly corresponding to trace.dat file version 6, but

[PATCH 06/12] tracing/kprobes: Move common functions to trace_probe.c

2013-07-03 Thread Namhyung Kim
From: Namhyung Kim The __get_data_size() and store_trace_args() will be used by uprobes too. Move them to a common location. Cc: Masami Hiramatsu Cc: Srikar Dronamraju Cc: Oleg Nesterov Cc: Arnaldo Carvalho de Melo Signed-off-by: Namhyung Kim --- kernel/trace/trace_kprobe.c | 48

[PATCH 12/12] tracing/uprobes: Add support for full argument access methods

2013-07-03 Thread Namhyung Kim
From: Namhyung Kim Enable to fetch other types of argument for the uprobes. IOW, we can access stack, memory, deref, bitfield and retval from uprobes now. Original-patch-by: Hyeoncheol Lee Cc: Masami Hiramatsu Cc: Srikar Dronamraju Cc: Oleg Nesterov Cc: Arnaldo Carvalho de Melo Signed-off

[PATCH 10/12] tracing/kprobes: Add priv argument to fetch functions

2013-07-03 Thread Namhyung Kim
From: Namhyung Kim This argument is for passing private data structure to each fetch function and will be used by uprobes. Cc: Masami Hiramatsu Cc: Srikar Dronamraju Cc: Oleg Nesterov Cc: Arnaldo Carvalho de Melo Signed-off-by: Namhyung Kim --- kernel/trace/trace_kprobe.c | 28

[PATCH 05/12] tracing/uprobes: Convert to struct trace_probe

2013-07-03 Thread Namhyung Kim
From: Namhyung Kim Convert struct trace_uprobe to make use of the common trace_probe structure. Cc: Masami Hiramatsu Cc: Srikar Dronamraju Cc: Oleg Nesterov Cc: Arnaldo Carvalho de Melo Signed-off-by: Namhyung Kim --- kernel/trace/trace_uprobe.c | 151

[PATCH 11/12] tracing/uprobes: Add more fetch functions

2013-07-03 Thread Namhyung Kim
From: Namhyung Kim Implement uprobe-specific stack and memory fetch functions and add them to the uprobes_fetch_type_table. Other fetch fucntions will be shared with kprobes. Original-patch-by: Hyeoncheol Lee Cc: Masami Hiramatsu Cc: Srikar Dronamraju Cc: Oleg Nesterov Cc: Arnaldo Carvalho

[PATCH 09/12] tracing/uprobes: Fix a comment for uprobe registration syntax

2013-07-03 Thread Namhyung Kim
From: Namhyung Kim The uprobe syntax requires an offset after a file path not a symbol. Cc: Masami Hiramatsu Cc: Srikar Dronamraju Cc: Oleg Nesterov Cc: Arnaldo Carvalho de Melo Signed-off-by: Namhyung Kim --- kernel/trace/trace_uprobe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[PATCH 07/12] tracing/kprobes: Remove duplicate set_print_fmt()

2013-07-03 Thread Namhyung Kim
From: Namhyung Kim The set_print_fmt() functions are implemented almost same for [ku]probes. Move it to a common place and get rid of the duplication. Cc: Masami Hiramatsu Cc: Srikar Dronamraju Cc: Oleg Nesterov Cc: Arnaldo Carvalho de Melo Signed-off-by: Namhyung Kim --- kernel/trace

[PATCH 08/12] tracing/uprobes: Fetch args before reserving a ring buffer

2013-07-03 Thread Namhyung Kim
From: Namhyung Kim Fetching from user space should be done in a non-atomic context. So use a temporary buffer and copy its content to the ring buffer atomically. While at it, use __get_data_size() and store_trace_args() to reduce code duplication. Cc: Masami Hiramatsu Cc: Srikar Dronamraju

[PATCH 02/12] tracing/kprobes: Add fetch{,_size} member into symbol and deref fetch method

2013-07-03 Thread Namhyung Kim
Cc: Srikar Dronamraju Cc: Oleg Nesterov Cc: Arnaldo Carvalho de Melo Signed-off-by: Hyeoncheol Lee [namhy...@kernel.org: Split original patch into pieces as requested] Signed-off-by: Namhyung Kim --- kernel/trace/trace_probe.c | 48 -- 1 file

[PATCH 03/12] tracing/kprobes: Make stack and memory fetch functions static

2013-07-03 Thread Namhyung Kim
From: Namhyung Kim Those fetch functions need to be implemented differently for kprobes and uprobes. Since the symbol and deref fetch functions don't call those directly anymore, we can make them static and implement them separately. Cc: Masami Hiramatsu Cc: Srikar Dronamraju Cc:

[PATCH 01/12] tracing/kprobes: Move fetch functions to trace_kprobe.c

2013-07-03 Thread Namhyung Kim
functions to uprobes and no functional changes are intended. Cc: Masami Hiramatsu Cc: Srikar Dronamraju Cc: Oleg Nesterov Cc: Arnaldo Carvalho de Melo Signed-off-by: Hyeoncheol Lee [namhy...@kernel.org: Split original patch into pieces as requested] Signed-off-by: Namhyung Kim --- kernel/trace

[PATCHSET 00/12] tracing/uprobes: Add support for more fetch methods

2013-07-03 Thread Namhyung Kim
l.org/pub/scm/linux/kernel/git/namhyung/linux-perf.git Any comments are welcome, thanks. Namhyung Cc: Masami Hiramatsu Cc: Srikar Dronamraju Cc: Oleg Nesterov Cc: Arnaldo Carvalho de Melo Hyeoncheol Lee (2): tracing/kprobes: Move fetch functions to trace_kprobe.c tracing/kprobes: Add fetc

[PATCH 04/12] tracing/kprobes: Factor out struct trace_probe

2013-07-03 Thread Namhyung Kim
From: Namhyung Kim There are functions that can be shared to both of kprobes and uprobes. Separate common data structure to struct trace_probe and use it from the shared functions. Cc: Masami Hiramatsu Cc: Srikar Dronamraju Cc: Oleg Nesterov Cc: Arnaldo Carvalho de Melo Signed-off-by

Re: [PATCHSET 00/12] tracing/uprobes: Add support for more fetch methods

2013-07-03 Thread Namhyung Kim
Hi Steve, On Wed, 03 Jul 2013 10:22:30 -0400, Steven Rostedt wrote: > On Wed, 2013-07-03 at 21:35 +0900, Namhyung Kim wrote: >> Hello, >> >> This patchset implements memory (address), stack[N], deference, >> bitfield and retval (it needs uretprobe tho) fetch methods

Re: [PATCHSET 00/12] tracing/uprobes: Add support for more fetch methods

2013-07-04 Thread Namhyung Kim
Hi Masami, On Thu, 04 Jul 2013 15:51:52 +0900, Masami Hiramatsu wrote: > (2013/07/03 21:35), Namhyung Kim wrote: >> Hello, >> >> This patchset implements memory (address), stack[N], deference, >> bitfield and retval (it needs uretprobe tho) fetch methods for >

Re: [PATCH 1/2 v5 typo updated] tracing/uprobes: Support ftrace_event_file base multibuffer

2013-07-04 Thread Namhyung Kim
Hi Jovi, Just a few of dummy questions.. On Thu, 4 Jul 2013 15:01:10 +0800, zhangwei wrote: > Support multi-buffer on uprobe-based dynamic events by > using ftrace_event_file. > > This patch is based kprobe-based dynamic events multibuffer > support work initially, commited by Masami(commit 41a7

Re: [PATCH v2 1/4] perf util: Add parse_nsec_time() function

2013-07-04 Thread Namhyung Kim
Hi Arnaldo, Could you pick these up or give a comment? Thanks, Namhyung On Mon, 3 Jun 2013 13:44:10 +0900, Namhyung Kim wrote: > From: Namhyung Kim > > The parse_nsec_time() function is for parsing a string of time into > 64-bit nsec value. It's a preparation of time fil

Re: [PATCHSET 0/6] perf report: Add support for callchains on GTK browser (v2)

2013-07-04 Thread Namhyung Kim
Ping! On Tue, 4 Jun 2013 18:22:11 +0900, Namhyung Kim wrote: > Hi, > > This patchset implements callchain support in GTK report browser as > Pekka requested. Please take a look and give me comments. > > v2 changes) > * fix a bug on percent calculation of children nodes >

Re: [PATCHSET 00/16] perf tools: Cleanups on tracepoint handling

2013-07-04 Thread Namhyung Kim
Ping! On Tue, 4 Jun 2013 14:20:15 +0900, Namhyung Kim wrote: > Hello, > > This patchset is a resend version of previous work and basis of > upcoming perf ftrace patchset. Although I saw no issue on this series > when I posted earlier, it'd be great if Steve or others take

Re: [PATCH 2/2] perf: squelch warnings from perl.h to compile-pass

2013-07-04 Thread Namhyung Kim
warnings are emitted by perl.h (perl 5.18.0): > > -Wundef and -Wswitch-default IIRC there's a floating patch for this, but I cannot find it now. > > Use #pragma statements to squelch exactly those warnings, and get perf > to compile-pass by default. > > Cc: Arnaldo Car

Re: [PATCH 0/7] Minor perf completion improvements

2013-07-04 Thread Namhyung Kim
On Thu, 4 Jul 2013 18:11:24 +0530, Ramkumar Ramachandra wrote: > Hi, > > So I just started using perf, and noticed the accompanying completion > script. Having dabbled with git.git's completion script a bit, I > thought I should contribute what I learnt from it. > > [6/7] is the meat of the series

Re: [PATCH V4 20/21] perf: make events stream always parsable

2013-07-05 Thread Namhyung Kim
Hi Adrian, On Thu, Jul 4, 2013 at 10:20 PM, Adrian Hunter wrote: > The event stream is not always parsable because the format of a sample > is dependent on the sample_type of the selected event. When there > is more than one selected event and the sample_types are not the > same then parsing bec

Re: [PATCHSET 00/16] perf tools: Cleanups on tracepoint handling

2013-07-05 Thread Namhyung Kim
On Fri, Jul 5, 2013 at 10:16 PM, Arnaldo Carvalho de Melo wrote: > Em Thu, Jul 04, 2013 at 05:39:06PM +0900, Namhyung Kim escreveu: >> Ping! > > Pong, should be processing these today, Great! Thanks, Namhyung -- To unsubscribe from this list: send the line "unsubscribe linux

[PATCH] perf tools: Fixup for removing -f option in perf record

2013-06-26 Thread Namhyung Kim
From: Namhyung Kim The commit bf3da4014a0c ("perf record: Remove -f/--force option") got rid of -f option from perf record. But this option was used internally by various sub-commands so they wouldn't work anymore. Also update the example document not to use -f option. Cc: Ji

Re: [PATCH] perf report: Add option to collapse undesired parts of call graph

2013-06-26 Thread Namhyung Kim
On Wed, 26 Jun 2013 18:25:01 -0400, Greg Price wrote: > Hi Namhyung, > > Thanks for the detailed review! > > > On Wed, Jun 26, 2013 at 10:28:56AM +0900, Namhyung Kim wrote: >> On Sat, 22 Jun 2013 23:17:20 -0400, Greg Price wrote: >> > For example, in an appli

Re: [PATCH 05/19] perf tools: Introduce new 'ftrace' tool

2013-06-26 Thread Namhyung Kim
Hi David, On Wed, 26 Jun 2013 11:10:34 -0600, David Ahern wrote: > On 6/26/13 1:14 AM, Namhyung Kim wrote: >> +const char * const ftrace_usage[] = { >> +"perf ftrace [] []", >> +"perf ftrace [] -- []", >> +

Re: [PATCH 06/19] perf ftrace: Add support for --pid option

2013-06-26 Thread Namhyung Kim
On Wed, 26 Jun 2013 11:12:19 -0600, David Ahern wrote: > On 6/26/13 1:14 AM, Namhyung Kim wrote: >> @@ -196,6 +222,8 @@ int cmd_ftrace(int argc, const char **argv, const char >> *prefix __maybe_unused) >> const struct option ftrace_options[] = { >>

Re: perf tools: Introduce new -P/--parent-deep report option

2013-06-26 Thread Namhyung Kim
Hi Arnaldo, On Wed, 26 Jun 2013 11:58:53 -0300, Arnaldo Carvalho de Melo wrote: > Hi Jiri, > > About the patch below, can't this be solved by using a regex > instead of a simple substring search instead of adding a new command > line option? ??? IIUC he reused parent_regex for this. And I

Re: [PATCH v2 00/14] perf, persistent: Kernel updates for perf tool integration

2013-06-26 Thread Namhyung Kim
Hi Robert, On Wed, 26 Jun 2013 14:44:24 +0200, Robert Richter wrote: > On 26.06.13 13:45:38, Ingo Molnar wrote: >> [ How about to additional logic: attr.persistent=1 && attr.config==0 means >> a new persistent event is created straight away - no ioctl is needed to >> detach it explicitly. ]

Re: [PATCH 06/19] perf ftrace: Add support for --pid option

2013-06-27 Thread Namhyung Kim
2013-06-27 (목), 07:56 -0600, David Ahern: > On 6/26/13 11:23 PM, Namhyung Kim wrote: > > The pid filtering in ftrace is done via set_ftrace_pid file under the > > tracing debugfs directory. IIRC It only supports process filtering not > > thread filtering by iterating all

Re: [PATCH 05/19] perf tools: Introduce new 'ftrace' tool

2013-06-27 Thread Namhyung Kim
2013-06-27 (목), 07:51 -0600, David Ahern: > On 6/26/13 11:04 PM, Namhyung Kim wrote: > > Hi David, > > > > On Wed, 26 Jun 2013 11:10:34 -0600, David Ahern wrote: > >> On 6/26/13 1:14 AM, Namhyung Kim wrote: > >>> + const char * const ftrac

[PATCH] perf evsel: Fix format string in perf_evsel__open_strerror()

2013-03-21 Thread Namhyung Kim
From: Namhyung Kim In case of EPERM or EACCESS, there was a debious "%s" before actual string so that an user would see "You may not have permission to collect %sstats." instead of "You may not ... system-wide stats.". Signed-off-by: Namhyung Kim --- tools/pe

[PATCH] perf report: Add --no-demangle option

2013-03-25 Thread Namhyung Kim
From: Namhyung Kim It's sometimes useful to see undemangled raw symbol name for example other tools using the perf output to do manipulation of binaries. Suggested-by: William Cohen Signed-off-by: Namhyung Kim --- tools/perf/builtin-report.c | 2 ++ tools/perf/util/symbol-elf.

[PATCH v2] perf report: Add --no-demangle option

2013-03-25 Thread Namhyung Kim
From: Namhyung Kim It's sometimes useful to see undemangled raw symbol name for example other tools using the perf output to do manipulation of binaries. Suggested-by: William Cohen Signed-off-by: Namhyung Kim --- Forgot to update the doc. Resending.. tools/perf/Documentation

[PATCH 1/3] perf sort: Add 'addr' sort key

2013-03-26 Thread Namhyung Kim
From: Namhyung Kim New addr sort key provides a way to sort the entries by the symbol addresses. Suggested-by: Arnaldo Carvalho de Melo Signed-off-by: Namhyung Kim --- tools/perf/util/hist.c | 2 ++ tools/perf/util/hist.h | 1 + tools/perf/util/sort.c | 23 +++ tools

[PATCH 3/3] perf report: Fix alignment of symbol column when -v is given

2013-03-26 Thread Namhyung Kim
From: Namhyung Kim When -v option is given, the symbol sort key prints its address also but it wasn't properly aligned since hists__calc_col_len() misses the additional part. Also it missed 2 spaces for 0x prefix when printing. $ perf report --stdio -v -s sym # Samples: 133 of

[PATCH 2/3] perf sort: Add 'addr_to/from' sort key

2013-03-26 Thread Namhyung Kim
From: Namhyung Kim New addr_{to,from} sort keys provide a way to sort the entries by the source/target symbol addresses. Cc: Stephane Eranian Signed-off-by: Namhyung Kim --- tools/perf/util/hist.c | 2 ++ tools/perf/util/hist.h | 2 ++ tools/perf/util/sort.c | 50

[PATCH] perf symbol: Do not apply symfs for an absolute vmlinux path

2013-07-17 Thread Namhyung Kim
From: Namhyung Kim If an user gives both of --symfs and --vmlinux option, the vmlinux will be searched under the symfs directory. This is somewhat confusing since vmlinux often lives in kernel build directory or somewhere other than user space binaries. So it'd be better not adding

Re: [PATCH 06/19] perf ftrace: Add support for --pid option

2013-07-17 Thread Namhyung Kim
Hi Jiri, On Thu, 11 Jul 2013 16:56:54 +0900, Namhyung Kim wrote: > On Wed, 10 Jul 2013 16:18:20 +0200, Jiri Olsa wrote: >> On Wed, Jun 26, 2013 at 04:14:09PM +0900, Namhyung Kim wrote: >>> From: Namhyung Kim >>> >>> The -p (--pid) option enables to trace e

Re: [PATCH 02/23] perf tools: Remove data_offset seek as it's not needed

2013-07-18 Thread Namhyung Kim
On Wed, 17 Jul 2013 19:49:42 +0200, Jiri Olsa wrote: > Removing data_offset seek as it's not needed, because > data are not read by syscall but mmaped instead. Yes we do, but it's not mandatory, right? I'd rather expect the file offset remains at the beginning of data after calling perf_session__

Re: [PATCH 05/23] perf tests: Add simple session read/write test

2013-07-18 Thread Namhyung Kim
On Wed, 17 Jul 2013 19:49:45 +0200, Jiri Olsa wrote: > Adding simple session read/write test to keep up > with file format changes. > [SNIP] > + session = perf_session__new(file, O_RDONLY, false, false, &tool); > + TEST_ASSERT_VAL("failed to create session", session); > + > + TEST_ASSE

Re: [PATCH 1/9] perf tools: add test for reading object code

2013-07-28 Thread Namhyung Kim
Hi Adrian, Just a few nitpicks below.. On Thu, 25 Jul 2013 17:01:22 +0300, Adrian Hunter wrote: > Using the information in mmap events, perf tools can read object > code associated with sampled addresses. A test is added that > compares bytes read by perf with the same bytes read using > objdum

Re: [PATCH 7/9] perf tools: add support for reading from /proc/kcore

2013-07-29 Thread Namhyung Kim
Hi, On Thu, 25 Jul 2013 17:01:28 +0300, Adrian Hunter wrote: > In the absence of vmlinux, perf tools uses kallsyms > for symbols. If the user has access, now also map to > /proc/kcore. > > The dso data_type is now set to either > DSO_BINARY_TYPE__KCORE or DSO_BINARY_TYPE__GUEST_KCORE > as appropr

Re: [PATCH 8/9] perf tools: add kcore to the object code reading test

2013-07-29 Thread Namhyung Kim
On Thu, 25 Jul 2013 17:01:29 +0300, Adrian Hunter wrote: > Make the "object code reading" test attempt to read from > kcore. > > The test uses objdump which struggles with kcore. i.e. > doesn't always work, sometimes takes a long time. > The test has been made to work around those issues. > [SNIP]

[PATCH 02/17] perf util: Add more debug message on failure path

2013-07-30 Thread Namhyung Kim
From: Namhyung Kim It's helpful for debugging on tracing features. Signed-off-by: Namhyung Kim --- tools/perf/util/header.c | 4 ++- tools/perf/util/trace-event-read.c | 53 ++ 2 files changed, 39 insertions(+), 18 deletions(-) diff --

[PATCHSET 00/17] perf tools: Introduce new 'ftrace' command (v4)

2013-07-30 Thread Namhyung Kim
/git.kernel.org/pub/scm/linux/kernel/git/namhyung/linux-perf.git Any comments are welcome, thanks, Namhyung Namhyung Kim (17): perf util: Save pid-cmdline mapping into tracing header perf util: Add more debug message on failure path perf tools: Introduce new 'ftrace' tool per

[PATCH 16/17] perf ftrace: Show leaf-functions as oneliner

2013-07-30 Thread Namhyung Kim
From: Namhyung Kim Detect leaf functions and print them in a same line. Note that it only converts leaf-functions that doesn't have any other records between entry and exit even in other cpus. I left other leaf functions as is. Signed-off-by: Namhyung Kim --- tools/perf/builtin-ftr

[PATCH 17/17] perf ftrace: Tidy up the function graph output of 'show' subcommand

2013-07-30 Thread Namhyung Kim
From: Namhyung Kim Now it doesn't call pevent_print_event() but prints context info in itself using print_graph_duration(). Make it compact by only print cpu number and duration: # perf ftrace show ... 10) 0.065 us | __fsnotify_parent(); 10)| fsnotify() {

[PATCH 06/17] perf ftrace: Split "live" sub-command

2013-07-30 Thread Namhyung Kim
From: Namhyung Kim Separate out the default behavior to "live" subcommand. It's a preparation to support more subcommands like "record" and "report". Cc: Steven Rostedt Cc: Frederic Weisbecker Signed-off-by: Namhyung Kim ---

[PATCH 10/17] perf ftrace: Add dump_printf() for low-level debugging

2013-07-30 Thread Namhyung Kim
From: Namhyung Kim For reusability, rename trace_event() to dump_raw_event() and pass size as an argument. And use it in do_ftrace_report() to show raw data of ftrace entries. Signed-off-by: Namhyung Kim --- tools/perf/builtin-ftrace.c | 6 ++ tools/perf/util/debug.c | 8

[PATCH 15/17] perf ftrace: Add --clock option

2013-07-30 Thread Namhyung Kim
From: Namhyung Kim The --clock (-c) option is for controlling trace_clock. Default to 'perf' if exists, or 'local'. Cc: Steven Rostedt Cc: Frederic Weisbecker Signed-off-by: Namhyung Kim --- tools/perf/builtin-ftrace.c | 31 +++ 1 file ch

[PATCH 14/17] perf ftrace: Add a signal handler for SIGSEGV

2013-07-30 Thread Namhyung Kim
From: Namhyung Kim It's for debugging purpose. Cc: Steven Rostedt Cc: Frederic Weisbecker Signed-off-by: Namhyung Kim --- tools/perf/builtin-ftrace.c | 13 + 1 file changed, 13 insertions(+) diff --git a/tools/perf/builtin-ftrace.c b/tools/perf/builtin-ftrace.c

[PATCH 11/17] perf ftrace: Use pager for displaying result

2013-07-30 Thread Namhyung Kim
From: Namhyung Kim It's convenient to use pager when seeing many lines of result. Note that setup_pager() should be called after perf_evlist__ prepare_workload() since they can interfere each other regarding shared stdio streams. Cc: Steven Rostedt Cc: Frederic Weisbecker Signed-o

[PATCH 12/17] perf ftrace: Cleanup using ftrace_setup/teardown()

2013-07-30 Thread Namhyung Kim
From: Namhyung Kim The ftrace sub-commands share some common code so that factor it out to ftrace_setup() and ftrace_teardown() helpers. Cc: Steven Rostedt Cc: Frederic Weisbecker Signed-off-by: Namhyung Kim --- tools/perf/builtin-ftrace.c | 168

[PATCH 13/17] perf tools: Add document for perf-ftrace command

2013-07-30 Thread Namhyung Kim
From: Namhyung Kim Cc: Steven Rostedt Cc: Frederic Weisbecker Signed-off-by: Namhyung Kim --- tools/perf/Documentation/perf-ftrace.txt | 116 +++ 1 file changed, 116 insertions(+) create mode 100644 tools/perf/Documentation/perf-ftrace.txt diff --git a/tools

[PATCH 09/17] perf ftrace: Add 'report' sub-command

2013-07-30 Thread Namhyung Kim
From: Namhyung Kim The ftrace report command is for analyzing ftrace result as usual perf report style. Internal processing of the ftrace buffer is similar to the 'show' sub-command but it synthesizes necessary information like thread, dso, map and symbol from saved trace info. It

[PATCH 07/17] perf ftrace: Add 'record' sub-command

2013-07-30 Thread Namhyung Kim
From: Namhyung Kim The ftrace record command is for saving raw ftrace buffer contents which can be get from per_cpu/cpuX/trace_pipe_raw. Since ftrace events are generated very frequently so single thread for recording mostly resulted in buffer overruns. Thus it uses per-cpu recorder thread to

[PATCH 08/17] perf ftrace: Add 'show' sub-command

2013-07-30 Thread Namhyung Kim
From: Namhyung Kim The ftrace show subcommand is for viewing recorded ftrace files. It enters perf.data.dir directory and open perf.header file to find out necessary information. And then read out per-cpu trace records using kbuffer helper and print them to stdout in time order. It only shows

[PATCH 05/17] perf ftrace: Add support for -a and -C option

2013-07-30 Thread Namhyung Kim
From: Namhyung Kim The -a/--all-cpus and -C/--cpu option is for controlling tracing cpus. To do that, add and use cpu_map__sprintf() function. Cc: Steven Rostedt Cc: Frederic Weisbecker Signed-off-by: Namhyung Kim --- tools/perf/builtin-ftrace.c | 69

[PATCH 04/17] perf ftrace: Add support for --pid option

2013-07-30 Thread Namhyung Kim
From: Namhyung Kim The -p (--pid) option enables to trace existing process by its pid. Cc: Steven Rostedt Cc: Frederic Weisbecker Signed-off-by: Namhyung Kim --- tools/perf/builtin-ftrace.c | 89 - 1 file changed, 63 insertions(+), 26 deletions

[PATCH 01/17] perf util: Save pid-cmdline mapping into tracing header

2013-07-30 Thread Namhyung Kim
From: Namhyung Kim Current trace info data lacks the saved cmdline mapping which is needed for pevent to find out the comm of a task. Add this and bump up the version number so that perf can determine its presence when reading. This is mostly corresponding to trace.dat file version 6, but

[PATCH 03/17] perf tools: Introduce new 'ftrace' tool

2013-07-30 Thread Namhyung Kim
From: Namhyung Kim The ftrace command is a simple wrapper of kernel's ftrace functionality. It only supports single thread tracing currently and just reads trace_pipe in text and then write it to stdout. Cc: Steven Rostedt Cc: Frederic Weisbecker Signed-off-by: Namhyung Kim --- tools

Re: [PATCH 01/17] perf util: Save pid-cmdline mapping into tracing header

2013-07-30 Thread Namhyung Kim
Hi Arnaldo, 2013-07-30 오후 10:28, Arnaldo Carvalho de Melo 쓴 글: Em Tue, Jul 30, 2013 at 06:18:58PM +0900, Namhyung Kim escreveu: From: Namhyung Kim Current trace info data lacks the saved cmdline mapping which is needed for pevent to find out the comm of a task. Add this and bump up the

[PATCH 03/13] tracing/kprobes: Make stack and memory fetch functions static

2013-07-31 Thread Namhyung Kim
From: Namhyung Kim Those fetch functions need to be implemented differently for kprobes and uprobes. Since the symbol and deref fetch functions don't call those directly anymore, we can make them static and implement them separately. Cc: Masami Hiramatsu Cc: Srikar Dronamraju Cc:

[PATCH 09/13] tracing/uprobes: Fix a comment for uprobe registration syntax

2013-07-31 Thread Namhyung Kim
From: Namhyung Kim The uprobe syntax requires an offset after a file path not a symbol. Cc: Masami Hiramatsu Cc: Srikar Dronamraju Cc: Oleg Nesterov Cc: zhangwei(Jovi) Cc: Arnaldo Carvalho de Melo Signed-off-by: Namhyung Kim --- kernel/trace/trace_uprobe.c | 2 +- 1 file changed, 1

[PATCH 11/13] tracing/uprobes: Add more fetch functions

2013-07-31 Thread Namhyung Kim
From: Namhyung Kim Implement uprobe-specific stack and memory fetch functions and add them to the uprobes_fetch_type_table. Other fetch fucntions will be shared with kprobes. Original-patch-by: Hyeoncheol Lee Cc: Masami Hiramatsu Cc: Srikar Dronamraju Cc: Oleg Nesterov Cc: zhangwei(Jovi

[PATCH 10/13] tracing/kprobes: Add priv argument to fetch functions

2013-07-31 Thread Namhyung Kim
From: Namhyung Kim This argument is for passing private data structure to each fetch function and will be used by uprobes. Cc: Masami Hiramatsu Cc: Srikar Dronamraju Cc: Oleg Nesterov Cc: zhangwei(Jovi) Cc: Arnaldo Carvalho de Melo Signed-off-by: Namhyung Kim --- kernel/trace

[PATCH 13/13] tracing/probes: Fix basic print type functions

2013-07-31 Thread Namhyung Kim
From: Namhyung Kim The print format of s32 type was "ld" and it's casted to "long". So it turned out to print 4294967295 for "-1" on 64-bit systems. Not sure whether it worked well on 32-bit systems. Anyway, it'd be better if we have exact format an

[PATCH 12/13] tracing/uprobes: Add support for full argument access methods

2013-07-31 Thread Namhyung Kim
From: Namhyung Kim Enable to fetch other types of argument for the uprobes. IOW, we can access stack, memory, deref, bitfield and retval from uprobes now. Original-patch-by: Hyeoncheol Lee Cc: Masami Hiramatsu Cc: Srikar Dronamraju Cc: Oleg Nesterov Cc: zhangwei(Jovi) Cc: Arnaldo Carvalho

[PATCH 02/13] tracing/kprobes: Add fetch{,_size} member into symbol and deref fetch method

2013-07-31 Thread Namhyung Kim
Cc: Srikar Dronamraju Cc: Oleg Nesterov Cc: zhangwei(Jovi) Cc: Arnaldo Carvalho de Melo Signed-off-by: Hyeoncheol Lee [namhy...@kernel.org: Split original patch into pieces as requested] Signed-off-by: Namhyung Kim --- kernel/trace/trace_probe.c | 48 ---

[PATCH 07/13] tracing/kprobes: Remove duplicate set_print_fmt()

2013-07-31 Thread Namhyung Kim
From: Namhyung Kim The set_print_fmt() functions are implemented almost same for [ku]probes. Move it to a common place and get rid of the duplication. Cc: Masami Hiramatsu Cc: Srikar Dronamraju Cc: Oleg Nesterov Cc: zhangwei(Jovi) Cc: Arnaldo Carvalho de Melo Signed-off-by: Namhyung Kim

[PATCH 08/13] tracing/uprobes: Fetch args before reserving a ring buffer

2013-07-31 Thread Namhyung Kim
From: Namhyung Kim Fetching from user space should be done in a non-atomic context. So use a temporary buffer and copy its content to the ring buffer atomically. While at it, use __get_data_size() and store_trace_args() to reduce code duplication. Cc: Masami Hiramatsu Cc: Srikar Dronamraju

[PATCH 04/13] tracing/kprobes: Factor out struct trace_probe

2013-07-31 Thread Namhyung Kim
From: Namhyung Kim There are functions that can be shared to both of kprobes and uprobes. Separate common data structure to struct trace_probe and use it from the shared functions. Cc: Masami Hiramatsu Cc: Srikar Dronamraju Cc: Oleg Nesterov Cc: zhangwei(Jovi) Cc: Arnaldo Carvalho de Melo

[PATCHSET 00/13] tracing/uprobes: Add support for more fetch methods (v2)

2013-07-31 Thread Namhyung Kim
thanks. Namhyung Cc: Masami Hiramatsu Cc: Srikar Dronamraju Cc: Oleg Nesterov Cc: zhangwei(Jovi) Cc: Arnaldo Carvalho de Melo Hyeoncheol Lee (2): tracing/kprobes: Move fetch functions to trace_kprobe.c tracing/kprobes: Add fetch{,_size} member into symbol and deref fetch method Na

[PATCH 05/13] tracing/uprobes: Convert to struct trace_probe

2013-07-31 Thread Namhyung Kim
From: Namhyung Kim Convert struct trace_uprobe to make use of the common trace_probe structure. Cc: Masami Hiramatsu Cc: Srikar Dronamraju Cc: Oleg Nesterov Cc: zhangwei(Jovi) Cc: Arnaldo Carvalho de Melo Signed-off-by: Namhyung Kim --- kernel/trace/trace_uprobe.c | 151

[PATCH 01/13] tracing/kprobes: Move fetch functions to trace_kprobe.c

2013-07-31 Thread Namhyung Kim
functions to uprobes and no functional changes are intended. Cc: Masami Hiramatsu Cc: Srikar Dronamraju Cc: Oleg Nesterov Cc: zhangwei(Jovi) Cc: Arnaldo Carvalho de Melo Signed-off-by: Hyeoncheol Lee [namhy...@kernel.org: Split original patch into pieces as requested] Signed-off-by: Namhyung Kim

[PATCH 06/13] tracing/kprobes: Move common functions to trace_probe.c

2013-07-31 Thread Namhyung Kim
From: Namhyung Kim The __get_data_size() and store_trace_args() will be used by uprobes too. Move them to a common location. Cc: Masami Hiramatsu Cc: Srikar Dronamraju Cc: Oleg Nesterov Cc: zhangwei(Jovi) Cc: Arnaldo Carvalho de Melo Signed-off-by: Namhyung Kim --- kernel/trace

Re: [PATCH V2 1/9] perf tools: add test for reading object code

2013-07-31 Thread Namhyung Kim
ually worked > and we wanted to have something quick. I have similar patch for getting srcline info (using addr2line) based on Roberto Vitillo's patch. I'll send the series soon and then look at the objdump too. -- Thanks, Namhyung Kim -- To unsubscribe from this list: send the

[PATCH 6/9] perf tools: Pass dso instead of dso_name to get_srcline()

2013-07-31 Thread Namhyung Kim
From: Namhyung Kim This is a preparation of next change. No functional changes are intended. Signed-off-by: Namhyung Kim --- tools/perf/util/annotate.c | 11 --- tools/perf/util/dso.h | 1 + tools/perf/util/sort.c | 2 +- tools/perf/util/srcline.c | 4 +++- tools/perf

[PATCH 5/9] perf tools: Do not try to call addr2line for non-binary files

2013-07-31 Thread Namhyung Kim
From: Namhyung Kim No need to call addr2line since they don't have such information. Signed-off-by: Namhyung Kim --- tools/perf/util/sort.c| 3 --- tools/perf/util/srcline.c | 11 +-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/tools/perf/util/sort.c b/

[PATCH 4/9] perf tools: Factor out get/free_srcline()

2013-07-31 Thread Namhyung Kim
From: Namhyung Kim Currently external addr2line tool is used for srcline sort key and annotate with srcline info. Separate the common code to prepare upcoming enhancements. Signed-off-by: Namhyung Kim --- tools/perf/Makefile| 1 + tools/perf/util/annotate.c | 20 ++- tools

[PATCH 9/9] perf tools: Fix srcline sort key behavior

2013-07-31 Thread Namhyung Kim
From: Namhyung Kim Currently the srcline sort key compares ip rather than srcline info. I guess this was due to a performance reason to run external addr2line utility. Now we have implemented the functionality inside, use the srcline info when comparing hist entries. Also constantly print

[PATCH 8/9] perf tools: Implement addr2line directly using libbfd

2013-07-31 Thread Namhyung Kim
call it. We can do it since we've linked with libbfd already. Signed-off-by: Roberto Agostino Vitillo [namhy...@kernel.org: Use a2l_data struct instead of static globals] Signed-off-by: Namhyung Kim --- tools/perf/config/Makefile | 4 ++ tools/perf/util/srcline.c

[PATCH 2/9] perf annotate: Reuse path from the result of addr2line

2013-07-31 Thread Namhyung Kim
From: Namhyung Kim In the symbol__get_source_line(), path and src_line->path will have same value, but they were allocated separately, and leaks one. Just share path to src_line->path. Signed-off-by: Namhyung Kim --- tools/perf/util/annotate.c | 6 +- 1 file changed, 1 insertion

[PATCH 0/9] perf tools: Enhance and correct srcline behavior

2013-07-31 Thread Namhyung Kim
t, I found some bugs/leaks in srcline handling. Patch 1-3 are fixes for those and can be merged separately. You can get this series on my 'perf/srcline-v1' branch in my tree at: git://git.kernel.org/pub/scm/linux/kernel/git/namhyung/linux-perf.git Any comments are welcome, thanks. N

[PATCH 7/9] perf tools: Save failed result of get_srcline()

2013-07-31 Thread Namhyung Kim
From: Namhyung Kim Some dso's lack srcline info, so there's no point to keep trying on them. Just save failture status and skip them. Signed-off-by: Namhyung Kim --- tools/perf/util/dso.c | 1 + tools/perf/util/dso.h | 1 + tools/perf/util/srcline.c | 10 -- 3 fil

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