From: Will Deacon <will.deacon@arm.com>
To: Srinivas Ramana <sramana@codeaurora.org>
Cc: catalin.marinas@arm.com, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-arm-msm@vger.kernel.org
Subject: Re: [PATCH] trace: extend trace_clock to support arch_arm clock counter
Date: Tue, 6 Dec 2016 12:13:47 +0000 [thread overview]
Message-ID: <20161206121346.GF2498@arm.com> (raw)
In-Reply-To: <5843D587.5010407@codeaurora.org>
On Sun, Dec 04, 2016 at 02:06:23PM +0530, Srinivas Ramana wrote:
> On 12/02/2016 04:38 PM, Will Deacon wrote:
> >On Fri, Dec 02, 2016 at 01:44:55PM +0530, Srinivas Ramana wrote:
> >>Extend the trace_clock to support the arch timer cycle
> >>counter so that we can get the monotonic cycle count
> >>in the traces. This will help in correlating the traces with the
> >>timestamps/events in other subsystems in the soc which share
> >>this common counter for driving their timers.
> >
> >I'm not sure I follow this reasoning. What's wrong with nanoseconds? In
> >particular, the "perf" trace_clock hangs off sched_clock, which should
> >be backed by the architected counter anyway. What does the cycle counter in
> >isolation tell you, given that the frequency isn't architected?
> >
> >I think I'm missing something here.
> >
>
> Having cycle counter would help in the cases where we want to correlate the
> time with other subsystems which are outside cpu subsystem.
Do you have an example of these subsystems? Can they be used to generate
trace data with mainline?
> local_clock or even the perf track_clock uses sched_clock which gets
> suspended during system suspend. Yes, they are backed up by the
> architected counter but they ignore the cycles spent in suspend.i
Does mono_raw solve this (also hangs off the architected counter and is
supported in the vdso)?
> so, when comparing with monotonically increasing cycle counter, other
> clocks doesn't help. It seems X86 uses the TSC counter to help such cases.
Does this mean we need a way to expose the frequency to userspace, too?
Will
WARNING: multiple messages have this Message-ID (diff)
From: will.deacon@arm.com (Will Deacon)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] trace: extend trace_clock to support arch_arm clock counter
Date: Tue, 6 Dec 2016 12:13:47 +0000 [thread overview]
Message-ID: <20161206121346.GF2498@arm.com> (raw)
In-Reply-To: <5843D587.5010407@codeaurora.org>
On Sun, Dec 04, 2016 at 02:06:23PM +0530, Srinivas Ramana wrote:
> On 12/02/2016 04:38 PM, Will Deacon wrote:
> >On Fri, Dec 02, 2016 at 01:44:55PM +0530, Srinivas Ramana wrote:
> >>Extend the trace_clock to support the arch timer cycle
> >>counter so that we can get the monotonic cycle count
> >>in the traces. This will help in correlating the traces with the
> >>timestamps/events in other subsystems in the soc which share
> >>this common counter for driving their timers.
> >
> >I'm not sure I follow this reasoning. What's wrong with nanoseconds? In
> >particular, the "perf" trace_clock hangs off sched_clock, which should
> >be backed by the architected counter anyway. What does the cycle counter in
> >isolation tell you, given that the frequency isn't architected?
> >
> >I think I'm missing something here.
> >
>
> Having cycle counter would help in the cases where we want to correlate the
> time with other subsystems which are outside cpu subsystem.
Do you have an example of these subsystems? Can they be used to generate
trace data with mainline?
> local_clock or even the perf track_clock uses sched_clock which gets
> suspended during system suspend. Yes, they are backed up by the
> architected counter but they ignore the cycles spent in suspend.i
Does mono_raw solve this (also hangs off the architected counter and is
supported in the vdso)?
> so, when comparing with monotonically increasing cycle counter, other
> clocks doesn't help. It seems X86 uses the TSC counter to help such cases.
Does this mean we need a way to expose the frequency to userspace, too?
Will
WARNING: multiple messages have this Message-ID (diff)
From: Will Deacon <will.deacon@arm.com>
To: Srinivas Ramana <sramana@codeaurora.org>
Cc: catalin.marinas@arm.com, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org
Subject: Re: [PATCH] trace: extend trace_clock to support arch_arm clock counter
Date: Tue, 6 Dec 2016 12:13:47 +0000 [thread overview]
Message-ID: <20161206121346.GF2498@arm.com> (raw)
In-Reply-To: <5843D587.5010407@codeaurora.org>
On Sun, Dec 04, 2016 at 02:06:23PM +0530, Srinivas Ramana wrote:
> On 12/02/2016 04:38 PM, Will Deacon wrote:
> >On Fri, Dec 02, 2016 at 01:44:55PM +0530, Srinivas Ramana wrote:
> >>Extend the trace_clock to support the arch timer cycle
> >>counter so that we can get the monotonic cycle count
> >>in the traces. This will help in correlating the traces with the
> >>timestamps/events in other subsystems in the soc which share
> >>this common counter for driving their timers.
> >
> >I'm not sure I follow this reasoning. What's wrong with nanoseconds? In
> >particular, the "perf" trace_clock hangs off sched_clock, which should
> >be backed by the architected counter anyway. What does the cycle counter in
> >isolation tell you, given that the frequency isn't architected?
> >
> >I think I'm missing something here.
> >
>
> Having cycle counter would help in the cases where we want to correlate the
> time with other subsystems which are outside cpu subsystem.
Do you have an example of these subsystems? Can they be used to generate
trace data with mainline?
> local_clock or even the perf track_clock uses sched_clock which gets
> suspended during system suspend. Yes, they are backed up by the
> architected counter but they ignore the cycles spent in suspend.i
Does mono_raw solve this (also hangs off the architected counter and is
supported in the vdso)?
> so, when comparing with monotonically increasing cycle counter, other
> clocks doesn't help. It seems X86 uses the TSC counter to help such cases.
Does this mean we need a way to expose the frequency to userspace, too?
Will
next prev parent reply other threads:[~2016-12-06 12:13 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-02 8:14 [PATCH] trace: extend trace_clock to support arch_arm clock counter Srinivas Ramana
2016-12-02 8:14 ` Srinivas Ramana
2016-12-02 11:08 ` Will Deacon
2016-12-02 11:08 ` Will Deacon
2016-12-04 8:34 ` Srinivas Ramana
2016-12-04 8:36 ` Srinivas Ramana
2016-12-04 8:36 ` Srinivas Ramana
2016-12-06 12:13 ` Will Deacon [this message]
2016-12-06 12:13 ` Will Deacon
2016-12-06 12:13 ` Will Deacon
2016-12-12 5:01 ` Srinivas Ramana
2016-12-12 5:01 ` Srinivas Ramana
2016-12-12 10:42 ` Will Deacon
2016-12-12 10:42 ` Will Deacon
2016-12-15 13:16 ` Srinivas Ramana
2016-12-15 13:16 ` Srinivas Ramana
2016-12-20 17:04 ` Will Deacon
2016-12-20 17:04 ` Will Deacon
2016-12-30 19:15 ` Stephen Boyd
2016-12-30 19:15 ` Stephen Boyd
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=20161206121346.GF2498@arm.com \
--to=will.deacon@arm.com \
--cc=catalin.marinas@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sramana@codeaurora.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.