mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: linux-kernel@vger.kernel.org, linux-rt-users@vger.kernel.org,
	Ingo Molnar <mingo@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Clark Williams <williams@redhat.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Jon Masters <jcm@redhat.com>, Daniel Wagner <wagi@monom.org>,
	Carsten Emde <C.Emde@osadl.org>
Subject: Re: [RFC][PATCH 1/3] tracing: Added hardware latency tracer
Date: Fri, 5 Aug 2016 17:28:33 +0200	[thread overview]
Message-ID: <866492b0-182c-4810-e738-6d19605c858f@linutronix.de> (raw)
In-Reply-To: <20160805104413.781611b5@gandalf.local.home>

On 08/05/2016 04:44 PM, Steven Rostedt wrote:
> On Fri, 5 Aug 2016 16:25:21 +0200
> Sebastian Andrzej Siewior <bigeasy@linutronix.de> wrote:
> 
>> * Steven Rostedt | 2016-08-04 10:57:09 [-0400]:
>>
>>> diff --git a/kernel/trace/trace_hwlat.c b/kernel/trace/trace_hwlat.c
>>> new file mode 100644
>>> index 000000000000..08dfabe4e862
>>> --- /dev/null
>>> +++ b/kernel/trace/trace_hwlat.c  
>> …
>>> +/* Macros to encapsulate the time capturing infrastructure */
>>> +#define time_type	u64
>>> +#define time_get()	trace_clock_local()
>>> +#define time_to_us(x)	div_u64(x, 1000)
>>> +#define time_sub(a, b)	((a) - (b))
>>> +#define init_time(a, b)	(a = b)
>>> +#define time_u64(a)	a  
>>
>> Do we need a macro for this? In the old code we could choose between
>> CONFIG_TRACING but now we don't.
>>
> 
> Probably not, I kept it for two reasons. 1) to keep the same logic as
> what was in PREEMPT_RT, and 2) in case we can come up with a better
> clock.

I assumed it was a leftover.

> But it's not that important. Should it be nuked? They do somewhat make
> the code easier to read.

that time_get() is close to ktime_get() which is almost u64 nowadays.
So it might not be that cool for upstream. A hwlat prefix makes the
whole thing not prettier.

1. PREEMPT_RT. Do I need any changes? I assumed I could keep this 1:1
   (once it is merged) and throw the current hwlat out.
2. a better clock is an argument. But why would you have a better clock
   for hwlat and not for the whole tracing infrastructure?

If you want to keep it, keep it. I just assumed it was a leftover.
> 
> -- Steve

Sebastian

  reply	other threads:[~2016-08-05 15:28 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-04 14:57 [RFC][PATCH 0/3] tracing: Add Hardware Latency detector tracer Steven Rostedt
2016-08-04 14:57 ` [RFC][PATCH 1/3] tracing: Added hardware latency tracer Steven Rostedt
2016-08-05 14:25   ` Sebastian Andrzej Siewior
2016-08-05 14:44     ` Steven Rostedt
2016-08-05 15:28       ` Sebastian Andrzej Siewior [this message]
2016-08-05 15:36         ` Steven Rostedt
2016-08-04 14:57 ` [RFC][PATCH 2/3] tracing: Add documentation for hwlat_detector tracer Steven Rostedt
2016-08-10 14:12   ` Jon Masters
2016-08-04 14:57 ` [RFC][PATCH 3/3] tracing: Have hwlat trace migrate across tracing_cpumask CPUs Steven Rostedt
2016-08-04 15:30 ` [RFC][PATCH 0/3] tracing: Add Hardware Latency detector tracer Steven Rostedt
2016-08-09 18:15   ` Clark Williams
2016-08-09 18:30     ` Steven Rostedt
2016-08-04 16:56 ` [RFC][PATCH 4/3] tracing: Add NMI tracing in hwlat detector Steven Rostedt
2016-08-04 17:16   ` Steven Rostedt
2016-08-05 14:35     ` Sebastian Andrzej Siewior
2016-08-05 14:52       ` Steven Rostedt
2016-08-05 15:40         ` Sebastian Andrzej Siewior
2016-08-05 16:17           ` Steven Rostedt
2016-08-09 17:22           ` Steven Rostedt
2016-08-10 14:10         ` Jon Masters
2016-08-09 18:05 ` [RFC][PATCH 5/3] tracing: Add smi counting to HWLAT Steven Rostedt
2016-08-09 18:28   ` Daniel Bristot de Oliveira
2016-08-09 18:35     ` Steven Rostedt
2016-08-09 21:25   ` Peter Zijlstra

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=866492b0-182c-4810-e738-6d19605c858f@linutronix.de \
    --to=bigeasy@linutronix.de \
    --cc=C.Emde@osadl.org \
    --cc=akpm@linux-foundation.org \
    --cc=jcm@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rt-users@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    --cc=wagi@monom.org \
    --cc=williams@redhat.com \
    /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®