[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87bo8b4p4w.fsf@sejong.aot.lge.com>
Date: Thu, 16 May 2013 11:47:27 +0900
From: Namhyung Kim <namhyung@...nel.org>
To: Jiri Olsa <jolsa@...hat.com>
Cc: Arnaldo Carvalho de Melo <acme@...stprotocols.net>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Paul Mackerras <paulus@...ba.org>,
Ingo Molnar <mingo@...nel.org>,
Namhyung Kim <namhyung.kim@....com>,
LKML <linux-kernel@...r.kernel.org>,
Steven Rostedt <rostedt@...dmis.org>,
Frederic Weisbecker <fweisbec@...il.com>,
David Ahern <dsahern@...il.com>,
Stephane Eranian <eranian@...gle.com>
Subject: Re: [PATCH 10/15] perf ftrace: Add 'show' sub-command
On Wed, 15 May 2013 23:21:08 +0200, Jiri Olsa wrote:
> On Tue, May 14, 2013 at 07:13:54PM +0900, Namhyung Kim wrote:
>> +static int process_sample_show(struct perf_tool *tool,
>> + union perf_event * event __maybe_unused,
>> + struct perf_sample *sample,
>> + struct perf_evsel *evsel __maybe_unused,
>> + struct machine *machine __maybe_unused)
>> +{
>> + struct perf_ftrace *ftrace;
>> + struct perf_ftrace_report *show;
>> + struct ftrace_report_arg *fra;
>> + struct stat statbuf;
>> + enum kbuffer_long_size long_size;
>> + enum kbuffer_endian endian;
>> + char buf[PATH_MAX];
>> +
>> + show = container_of(tool, struct perf_ftrace_report, tool);
>> + ftrace = show->ftrace;
>
> this seems to be exactly same routine as process_sample_report
> with exception of above 2 lines.. maybe the rest of it could be
> common function?
Hmm.. indeed. I'd rather use just one of them as only thing they do is
to get the ftrace pointer.
Thanks for pointing this out,
Namhyung
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists