mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Joel Fernandes <joelaf@google.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
	kernel-team@android.com, Steven Rostedt <rostedt@goodmis.org>,
	Ingo Molnar <mingo@kernel.org>
Subject: Re: [PATCH v7 2/2] tracing: Add support for preempt and irq enable/disable events
Date: Fri, 6 Oct 2017 09:07:11 +0200	[thread overview]
Message-ID: <20171006070711.czekvhnwty6bouxi@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <CAJWu+ooj=M7izmczjK8nCNdHJ5t9YQwauCk6pwaR0j8tepL=0w@mail.gmail.com>

On Thu, Oct 05, 2017 at 04:28:10PM -0700, Joel Fernandes wrote:
> > lockdep implements the trace_hardirq_*() in terms of *_caller(). Would
> > that make sense here?
> 
> In lockdep code, when trace_hardirqs_off is called,
> trace_hardirqs_off_caller would pass CALLER_ADDR0 as
> trace_hardirqs_off.
> 
> Because of this, the first argument passed to time_hardirqs_off would
> always be an offset within trace_hardirqs_off:
> time_hardirqs_off(CALLER_ADDR0, ip);
> 
> Is that intended? Seems to me that in the lockdep implementation of
> trace_hardirqs_* in terms of *_caller(), we would completely miss the
> second-last return address (CALLER_ADDR1) of trace_hardirqs_off().
> Also for the above reasons, I don't think it doesn't make sense to use
> this reuse logic for the tracer. Atleast I feel it might change the
> current behavior of the preempt/irqsoff tracer which I don't intend to
> change with my current patch set.

Hurm.. so I've no clue. I never looked at any of this. I think Ingo
wrote that before I came joined the fun. He might (although unlikely,
because its been _many_ years) still have some memories.

But given that lockdep enabled kernels never got those arguments right,
how useful are they? I mean, nobody seems to have noticed much.

  parent reply	other threads:[~2017-10-06  7:07 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-29 21:22 [PATCH v7 1/2] tracing: Prepare to add preempt and irq trace events Joel Fernandes
2017-09-29 21:22 ` [PATCH v7 2/2] tracing: Add support for preempt and irq enable/disable events Joel Fernandes
2017-10-04 16:01   ` Peter Zijlstra
2017-10-04 16:43     ` Joel Fernandes
2017-10-06  8:59       ` Joel Fernandes
2017-10-05 23:28     ` Joel Fernandes
2017-10-05 23:29       ` Joel Fernandes
2017-10-06  7:07       ` Peter Zijlstra [this message]
2017-10-06  7:28         ` Joel Fernandes
2017-10-06 13:38           ` Steven Rostedt
2017-10-06 17:27             ` Joel Fernandes
2017-10-04 16:04   ` Peter Zijlstra
2017-10-04 16:31     ` Joel Fernandes
2017-10-04 16:44     ` Steven Rostedt
2017-10-04 16:56       ` Joel Fernandes
2017-10-04 17:03         ` Steven Rostedt
2017-10-04 20:13           ` Joel Fernandes

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=20171006070711.czekvhnwty6bouxi@hirez.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=joelaf@google.com \
    --cc=kernel-team@android.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®