From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752187AbdJFNir (ORCPT ); Fri, 6 Oct 2017 09:38:47 -0400 Received: from mail.kernel.org ([198.145.29.99]:37244 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751875AbdJFNiq (ORCPT ); Fri, 6 Oct 2017 09:38:46 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 36633218BB Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=goodmis.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=rostedt@goodmis.org Date: Fri, 6 Oct 2017 09:38:43 -0400 From: Steven Rostedt To: Joel Fernandes Cc: Peter Zijlstra , LKML , kernel-team@android.com, Ingo Molnar Subject: Re: [PATCH v7 2/2] tracing: Add support for preempt and irq enable/disable events Message-ID: <20171006093843.3ef9937a@gandalf.local.home> In-Reply-To: References: <20170929212245.24168-1-joelaf@google.com> <20170929212245.24168-2-joelaf@google.com> <20171004160151.noficzcd4ef5ydml@hirez.programming.kicks-ass.net> <20171006070711.czekvhnwty6bouxi@hirez.programming.kicks-ass.net> X-Mailer: Claws Mail 3.14.0 (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 6 Oct 2017 00:28:21 -0700 Joel Fernandes wrote: > Oh ok. So I traced this down to the original patch that added > time_hardirqs_off to lockdep. I *think* it was added just to keep the > irqsoff tracer working while lockdep is enabled, so that both lockdep > and the tracer would work at the same time. So I guess nobody noticed > any issues because nobody noticed or cared to check if irqsoff tracer > showed the same results with lockdep enabled vs disabled. As one of the main users of preemptirqsoff tracer, I can tell you that we didn't care ;-) Yes, it was added to keep them both working. It's dangerous to use CALLER_ADDR1, as lockdep can be called by the top frame, and ADDR1 would go off the stack frame and cause a fault. I just put in ADDR0 as filler as it required something to be added. We added a stack dump on new max latencies to figure out where the problem occurred. -- Steve > > I think the correct way this should be rewritten is lockdep should use > register_trace_* to register callbacks onto the new tracepoints I'm > adding. I am working on a patch that does something like this and gets > rid of the time_* functions. I will try to have an RFC out by the > weekend if I hopefully don't hit any roadblocks. > > thanks! > > - Joel