Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp848497ybi; Fri, 12 Jul 2019 05:39:38 -0700 (PDT) X-Google-Smtp-Source: APXvYqzXaaI86vwQCHjJwMB2QhL+ixA1AVQL2wHhTAovgIZ8ztWtyIvB8iR012NqXotRBmx7XYsr X-Received: by 2002:a17:90a:26ef:: with SMTP id m102mr11440569pje.50.1562935178762; Fri, 12 Jul 2019 05:39:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562935178; cv=none; d=google.com; s=arc-20160816; b=gkMatTSzCefOfTLTT+CMLXpO5+QAj/nklp+2CbDGl4yI8fCaTzOZET5Cn4qx0LmyCq 1irveRYSLzCdJM+NKcz0cuKsUGnOp0ZG1E0CBxKSO3LHST0c57mx4VfCbI+jMJF3C2lq ovnUrsSbquSeV2iTIlwiQ1B3EdUexQV++syTpTpfNUx4fwgSfFMq+vEcn60UO4u4Qhdt OgJVDM5eFhFi/dTIpobDy0RL8m1DE8qmp1sXRQRwvveohV32WkDv2OZxOPfNSl98e4if IYI0DYquM8Sc7APQu+iyGx/+CXAN4UPuGyyQWB+ykx3C+vqu9gcKcwJAPZDBRblNnehV 2Gng== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=k42m5dnPvmvLEl9ATGX3qvtPKWIdaUVmThzXPDTDC8I=; b=l+SIBLiNBw2cCjKP3l+/iGI8NUcnOGTx00DcUNEj7cZceqXpI5Px3aprSdoK3MoBDt Pq+5Iv0NymBDSbK0gN4TTDaKw/3MxZ9CR2gmgB3OhfeB9JNxcYGwjOu8bK2wZJLai03n 9oqun/OJkaE1/ghZw3IzqC9lkbip5cowvK+ISKyWJsQ60B6mjtt37x7hx2DsDLlWEq9B kVyMijY2VyeC3RYo6/uK7QM4MVZRyKzzdjUk9hI/dp9Yn9BLTPcudXO1pcJLlY+hRutc y8Qg6sonn5c+A4xNWjU2rFKFq0HBeOvJ4zdmPEX4q4NdqxBRESfXbN23fPreUA9Efoqt U5Qg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=I8LqdU4y; 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 x8si7346353pln.298.2019.07.12.05.39.23; Fri, 12 Jul 2019 05:39:38 -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; dkim=pass header.i=@kernel.org header.s=default header.b=I8LqdU4y; 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 S1727580AbfGLM3a (ORCPT + 99 others); Fri, 12 Jul 2019 08:29:30 -0400 Received: from mail.kernel.org ([198.145.29.99]:44272 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728972AbfGLM30 (ORCPT ); Fri, 12 Jul 2019 08:29:26 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (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 8A8362084B; Fri, 12 Jul 2019 12:29:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1562934565; bh=AZv/LQrXr3RW25gjxyCOzDhCvmEvZEzY/2T/JakO7UU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=I8LqdU4ypbp4439+ZE8LeM+iifADzmouoMjTOvBJdft2vMbdrw8Sjoo8qWtnYPjNy 4gwum3J7liR5w71CJ54smDy4PI9m6Gx8H45j+j71opJGdkSGypZi8LjwA19gPqRdV0 x/0pjd6ysSQ3vxkP3U4X7yA3SFkPkdSI7wXZ6ZrU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Adrian Hunter , Arnaldo Carvalho de Melo , Jiri Olsa Subject: [PATCH 5.1 097/138] perf auxtrace: Fix itrace defaults for perf script Date: Fri, 12 Jul 2019 14:19:21 +0200 Message-Id: <20190712121632.487972616@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190712121628.731888964@linuxfoundation.org> References: <20190712121628.731888964@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Adrian Hunter commit 355200e0f6a9ce14771625014aa469f5ecbd8977 upstream. Commit 4eb068157121 ("perf script: Make itrace script default to all calls") does not work for the case when '--itrace' only is used, because default_no_sample is not being passed. Example: Before: $ perf record -e intel_pt/cyc/u ls $ perf script --itrace > cmp1.txt $ perf script --itrace=cepwx > cmp2.txt $ diff -sq cmp1.txt cmp2.txt Files cmp1.txt and cmp2.txt differ After: $ perf script --itrace > cmp1.txt $ perf script --itrace=cepwx > cmp2.txt $ diff -sq cmp1.txt cmp2.txt Files cmp1.txt and cmp2.txt are identical Signed-off-by: Adrian Hunter Tested-by: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: stable@vger.kernel.org Fixes: 4eb068157121 ("perf script: Make itrace script default to all calls") Link: http://lkml.kernel.org/r/20190520113728.14389-3-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Greg Kroah-Hartman --- tools/perf/util/auxtrace.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/tools/perf/util/auxtrace.c +++ b/tools/perf/util/auxtrace.c @@ -1010,7 +1010,8 @@ int itrace_parse_synth_opts(const struct } if (!str) { - itrace_synth_opts__set_default(synth_opts, false); + itrace_synth_opts__set_default(synth_opts, + synth_opts->default_no_sample); return 0; }