From: Namhyung Kim <namhyung@kernel.org>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
Ingo Molnar <mingo@kernel.org>,
Josh Poimboeuf <jpoimboe@redhat.com>
Subject: Re: [PATCH] ftrace: Access ret_stack->subtime only in the function profiler
Date: Wed, 31 Aug 2016 11:35:00 +0900 [thread overview]
Message-ID: <20160831023500.GB26190@danjae.aot.lge.com> (raw)
In-Reply-To: <20160830221647.6a9716cc@gandalf.local.home>
On Tue, Aug 30, 2016 at 10:16:47PM -0400, Steven Rostedt wrote:
> On Wed, 31 Aug 2016 11:11:38 +0900
> Namhyung Kim <namhyung@kernel.org> wrote:
>
> > On Tue, Aug 30, 2016 at 10:34:41AM +0900, Namhyung Kim wrote:
> > > Hi Steve,
> > >
> > > On Mon, Aug 29, 2016 at 04:07:00PM -0400, Steven Rostedt wrote:
> > > > On Mon, 29 Aug 2016 12:05:18 +0900
> > > > Namhyung Kim <namhyung@kernel.org> wrote:
> > > >
> > > > > The subtime is used only for function profiler with function graph
> > > > > tracer enabled. Move the definition of subtime under
> > > > > CONFIG_FUNCTION_PROFILER to reduce the memory usage. Also move the
> > > > > initialization of subtime into the graph entry callback.
> > > >
> > > > Hmm, I think documentation needs to be updated. Although it was never
> > > > implemented, I believe I added the subtime to not only work with the
> > > > profiler, but also with the normal tracing (to have the time of the
> > > > internal functions subtracted from the upper level functions). But it
> > > > appears that part was never implemented.
> > > >
> > > > I'm fine with the patch, or actually implementing what graph-time
> > > > states in Documentation/ftrace.txt. If we take this patch, that comment
> > > > needs to be made to only mention the profiler (and the option should
> > > > only be shown when the profiler is enabled).
> > >
> > > Ah, missed the documentation part. To implement it in the normal
> > > tracing, I think we need to add 'subtime' field to struct
> > > ftrace_graph_ret which will increase disk size. Are you ok with this?
> >
> > On second thought, I think I can do it by just adding value of subtime
> > to ftrace_graph_ret.calltime when graph-time is off. Then the
> > calltime would not be the timestamp at function entry, but it seems
> > not guaranteed due to the sleep-time anyway. Now I wonder why it
> > doesn't have 'duration' in the ftrace_graph_ret instead of having
> > calltime and rettime.
> >
>
> As it hasn't worked, like forever, I'm thinking of nuking it. Nobody
> seemed to have noticed. I haven't needed to use it, and apparently
> nobody else has either. Why support a feature that nobody uses?
>
> I have used it for profiling, but not normal function graph tracing.
> You can see the function times inside and do the logic post processing.
>
> Best bet is to just update the documentation to what the current code
> does.
Ok, will send v2.
Thanks,
Namhyung
prev parent reply other threads:[~2016-08-31 2:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-29 3:05 Namhyung Kim
2016-08-29 20:07 ` Steven Rostedt
2016-08-30 1:34 ` Namhyung Kim
2016-08-31 2:11 ` Namhyung Kim
2016-08-31 2:16 ` Steven Rostedt
2016-08-31 2:35 ` Namhyung Kim [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160831023500.GB26190@danjae.aot.lge.com \
--to=namhyung@kernel.org \
--cc=jpoimboe@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=rostedt@goodmis.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®