Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp607858yba; Thu, 18 Apr 2019 06:46:07 -0700 (PDT) X-Google-Smtp-Source: APXvYqx3W3i0A4kJfd456JWpNDW8mOW/sN1L62XHXzfnBRL5+0lHO0CmwT2GwkyplyHi8GGwBL8M X-Received: by 2002:a17:902:47c2:: with SMTP id d2mr95015339plh.277.1555595167220; Thu, 18 Apr 2019 06:46:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555595167; cv=none; d=google.com; s=arc-20160816; b=JMZFUG1WBgFo5LXc0I90Rozd1Cv77H95hLbCs9bwOKEGymvlkibB99mjElp3LUnao6 G4ohnMg7FQBsqnz8QOl5Al/QUgBc9c0xotoj3B0kY5u94vPs/FP+o93WGPk7jDKbUOrU lZkcPNh1bcNMH+T3AUlDpE+LGsq2WvILKbSKpJgtEPtJJ6ivggTe/nHZBdAR5EMZrtJP 7IkZHknzVKm/NuJ83tpVMcuzI8kY500kBWnXaFRiIqwEeqI+wING5gQAiAzE7XdNzawG xYwEph4uExJl1++YBM9FM/zpNG5U/nV0eeMO6vzyu+Rc3apK28GxEXY+X9Kz+nBNmyo5 jpCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=EhGohp98dajYydgt0W68QLMG3WNkyvoG32dk/didwEw=; b=wGUYXMY8d9naTaEtrkZawLVfGGdewjND9x2xZSb3dk1S/z4wuwlo8y2IAfl7zVBNHq LjV2ewgTKzcNLGOOzigTGXmXZEaUC4bQZpUCiJDDJt+4wPiqj7V5RMB3ZQo66J9MOqYK tA43SsrCk1mUStb06B8mmImkc8KXLQ6WYLPI5k32/LsYQ/joA5mqLevivRMhH4pKvxOk gRMm6oQqeGgpbIK31OlkvtGthbUHGcxOweeWYmFWBMvvetul1A0H3y8xxPtxVIj706Uj NMnjUpi5RM9EvzerZpNECSh1oRWGLIo05doWDc2X0fnCI7sb0zc6lqSpIJf1CcMOTlUV Qpdg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id bj7si2152966plb.408.2019.04.18.06.45.51; Thu, 18 Apr 2019 06:46:07 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389079AbfDRNkW (ORCPT + 99 others); Thu, 18 Apr 2019 09:40:22 -0400 Received: from mail.kernel.org ([198.145.29.99]:44522 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388535AbfDRNkT (ORCPT ); Thu, 18 Apr 2019 09:40:19 -0400 Received: from gandalf.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 77CD12083D; Thu, 18 Apr 2019 13:40:15 +0000 (UTC) Date: Thu, 18 Apr 2019 09:40:14 -0400 From: Steven Rostedt To: Thomas Gleixner , Tom Zanussi Cc: LKML , Josh Poimboeuf , x86@kernel.org, Andy Lutomirski , Alexander Potapenko , Alexey Dobriyan , Andrew Morton , Pekka Enberg , linux-mm@kvack.org, David Rientjes , Christoph Lameter , Catalin Marinas , Dmitry Vyukov , Andrey Ryabinin , kasan-dev@googlegroups.com, Mike Rapoport , Akinobu Mita , iommu@lists.linux-foundation.org, Robin Murphy , Christoph Hellwig , Marek Szyprowski , Johannes Thumshirn , David Sterba , Chris Mason , Josef Bacik , linux-btrfs@vger.kernel.org, dm-devel@redhat.com, Mike Snitzer , Alasdair Kergon , intel-gfx@lists.freedesktop.org, Joonas Lahtinen , Maarten Lankhorst , dri-devel@lists.freedesktop.org, David Airlie , Jani Nikula , Daniel Vetter , Rodrigo Vivi , linux-arch@vger.kernel.org Subject: Re: [patch V2 20/29] tracing: Simplify stacktrace retrieval in histograms Message-ID: <20190418094014.7d457f29@gandalf.local.home> In-Reply-To: <20190418084254.910579307@linutronix.de> References: <20190418084119.056416939@linutronix.de> <20190418084254.910579307@linutronix.de> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [ Added Tom Zanussi ] On Thu, 18 Apr 2019 10:41:39 +0200 Thomas Gleixner wrote: > The indirection through struct stack_trace is not necessary at all. Use the > storage array based interface. > > Signed-off-by: Thomas Gleixner > Cc: Steven Rostedt Looks fine to me Acked-by: Steven Rostedt (VMware) But... Tom, Can you review this too? Patch series starts here: http://lkml.kernel.org/r/20190418084119.056416939@linutronix.de Thanks, -- Steve > --- > kernel/trace/trace_events_hist.c | 12 +++--------- > 1 file changed, 3 insertions(+), 9 deletions(-) > > --- a/kernel/trace/trace_events_hist.c > +++ b/kernel/trace/trace_events_hist.c > @@ -5186,7 +5186,6 @@ static void event_hist_trigger(struct ev > u64 var_ref_vals[TRACING_MAP_VARS_MAX]; > char compound_key[HIST_KEY_SIZE_MAX]; > struct tracing_map_elt *elt = NULL; > - struct stack_trace stacktrace; > struct hist_field *key_field; > u64 field_contents; > void *key = NULL; > @@ -5198,14 +5197,9 @@ static void event_hist_trigger(struct ev > key_field = hist_data->fields[i]; > > if (key_field->flags & HIST_FIELD_FL_STACKTRACE) { > - stacktrace.max_entries = HIST_STACKTRACE_DEPTH; > - stacktrace.entries = entries; > - stacktrace.nr_entries = 0; > - stacktrace.skip = HIST_STACKTRACE_SKIP; > - > - memset(stacktrace.entries, 0, HIST_STACKTRACE_SIZE); > - save_stack_trace(&stacktrace); > - > + memset(entries, 0, HIST_STACKTRACE_SIZE); > + stack_trace_save(entries, HIST_STACKTRACE_DEPTH, > + HIST_STACKTRACE_SKIP); > key = entries; > } else { > field_contents = key_field->fn(key_field, elt, rbe, rec); >