From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933139Ab3EOVV3 (ORCPT ); Wed, 15 May 2013 17:21:29 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49262 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932698Ab3EOVV2 (ORCPT ); Wed, 15 May 2013 17:21:28 -0400 Date: Wed, 15 May 2013 23:21:08 +0200 From: Jiri Olsa To: Namhyung Kim Cc: Arnaldo Carvalho de Melo , Peter Zijlstra , Paul Mackerras , Ingo Molnar , Namhyung Kim , LKML , Steven Rostedt , Frederic Weisbecker , David Ahern , Stephane Eranian Subject: Re: [PATCH 10/15] perf ftrace: Add 'show' sub-command Message-ID: <20130515212108.GB5814@krava.redhat.com> References: <1368526439-31966-1-git-send-email-namhyung@kernel.org> <1368526439-31966-11-git-send-email-namhyung@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1368526439-31966-11-git-send-email-namhyung@kernel.org> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 14, 2013 at 07:13:54PM +0900, Namhyung Kim wrote: > From: Namhyung Kim > SNIP > + > +static LIST_HEAD(ftrace_cpu_buffers); > + > +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? jirka