Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp984629yba; Thu, 18 Apr 2019 13:02:21 -0700 (PDT) X-Google-Smtp-Source: APXvYqybfKIHbc01OIJOvlVoCfAH6HYLxANRhVhys7n/d/JpK6bC7XjMf7qTYwrQpLfHUizsqm1N X-Received: by 2002:a62:ab14:: with SMTP id p20mr98062488pff.23.1555617741428; Thu, 18 Apr 2019 13:02:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555617741; cv=none; d=google.com; s=arc-20160816; b=Ps32FkoNmfcbaZ0A9yduAlaX0e8goxtmM3bJZUL4+xHtzegJo4hSIE/GR6Zig4bVIe R/oAAH3Y4KmPDraYJ2mjIXbnqeNZZN1oF4YSaAT7/AbS2Fd02/T5+Piy2X3iiSo2mda4 fGi4cqCc9JJRFcxXfvyld3Op9HZ085cWqb7Po4/j3w39ago+EV0FcK+N+aw1WdVmumY8 VoZYZ6c+dAZKBwZfaURf14ryX9tZSEB71Kdk3jrMNtaV04FBFV+2kYHg7eH6PDLJFpHj 9apCdJJO2PwIYJ61xk+Kn4G8ygpornkkeK3lN8tdOEPW3tV0Qg1aH9u9gHvj+XGTj7v+ qE+A== 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:date:cc:to:from:subject:message-id; bh=PaTEdHmSKgEr8cPfL8EUF9+pcJ0cGJs8I+CD02WscDI=; b=DFKbs/iRlHJ4vT/OIzPTwv3xekHy2gQMMxcQHe3hAh3eAc4bv0pBmT6ztt94JCPgcT V//uXogAfX2q4Nw9Z2UoS/66eoTXLZJlErR5eIRUOFT63yLGuHSNMAj2wqNJs6ihfJMr AluhaWysZf2A6pSmf7aNxuSBcK+PC3cnjLD1xDhwJYTGll3rv+uFeMDKlXcpn0s3lHpM WMexLZyD6kyRHo7V2E54mdgVrfiQHRBbRRBzbXGFpinP/eHwz0hA26Cldsa8CIdLPnCT 2Gr80oAxAnfU1u8KYO7gQVQYrcJx1nl7Y+tnu2pSCGaocu+AyRv58P8xHL9FvnWgczA+ Hx9g== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x7si2946950plr.247.2019.04.18.13.02.05; Thu, 18 Apr 2019 13:02:21 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390268AbfDRT7C (ORCPT + 99 others); Thu, 18 Apr 2019 15:59:02 -0400 Received: from mga02.intel.com ([134.134.136.20]:46205 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389754AbfDRT7B (ORCPT ); Thu, 18 Apr 2019 15:59:01 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Apr 2019 12:59:00 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,367,1549958400"; d="scan'208";a="224723852" Received: from dytagah-mobl.amr.corp.intel.com ([10.254.15.29]) by orsmga001.jf.intel.com with ESMTP; 18 Apr 2019 12:58:56 -0700 Message-ID: <014a7564d606b249a5e50bef0fedf266977a935b.camel@linux.intel.com> Subject: Re: [patch V2 20/29] tracing: Simplify stacktrace retrieval in histograms From: Tom Zanussi To: Steven Rostedt , Thomas Gleixner 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 Date: Thu, 18 Apr 2019 14:58:55 -0500 In-Reply-To: <20190418094014.7d457f29@gandalf.local.home> References: <20190418084119.056416939@linutronix.de> <20190418084254.910579307@linutronix.de> <20190418094014.7d457f29@gandalf.local.home> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5 (3.28.5-1.fc28) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2019-04-18 at 09:40 -0400, Steven Rostedt wrote: > [ 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? Looks good to me too! Acked-by: Tom Zanussi > > 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); > > > >