Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1599633ybt; Thu, 9 Jul 2020 10:40:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy8L+CbStdLW6cGWgMc5z/nhKzjjUnK6ulaJZibwchVTY5WMvKA+BF5wKWfmOxWZS84Umvr X-Received: by 2002:a50:eac5:: with SMTP id u5mr8714950edp.6.1594316403632; Thu, 09 Jul 2020 10:40:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594316403; cv=none; d=google.com; s=arc-20160816; b=wZmL6uN1Ae1wRP06jSdbrkokQyt62uJ7jbS2s6tsmylPoiFwkp6lyVil6i50I+yyzw Qt1Jdzja2lXukavRK770DA6vvaTTFfxNy/P8WRLRmkF0qOm2m24yqkl0R7JK0Jg/ef0+ b1MXrG1s+IrKVkyo75AUsJZjxsfnLszz7lHRRpPnpttUzl6c8MM2Pkg02qehUsSTPWL0 ea93Vm75WIXh4L7aDBzfVVXjSsNjibtpk6bsNx9s53jLAl7TQ3WONjGog53hW4TPSlmE yxr88ZCiFzgCCDYxsL78dPfMos0bRf4ASwLcnGdAbwmNqD6xb9iW4e3kYD0Q9kUI8FMs KrhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:organization:references:in-reply-to :message-id:date:subject:cc:to:from:ironport-sdr:ironport-sdr; bh=CcDqLZOkgKK9cVsEaO6T7y8HdzOAG3UO9pZDdtvskdg=; b=n/UNZfZh13GM+tvEPBZjFMyIF2DGuOH8JSuX5iw9xxgusb1bDOSPJqKr1ssF4fGQQl Vub9EHKc5qTNJmbMI+xa4H3d/lrft3gInrtUGUpkZcu6JH9bdes4Gio0Q90Qq+Zaz588 s00vvJgcNGoU8mrrTx7YbF+jMmaL4/kuJgaEb6iXoS2AHg433vDGwqbi13gc1Zwl4xYC C35d6gF6R49d/AUNF3zJRNeVNRJh6DpAwJvTwm+O9PtsnKvHS+4bAJs32KsxLBJGXhbd 394wpMwzrZTWs7PCjTYE7iAcYvW7hIeKdqfbfloeNB2H/luzyJ6tVz8d4ZjC/YMrWsfG mSLg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id b15si2622848edx.0.2020.07.09.10.39.41; Thu, 09 Jul 2020 10:40:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1728499AbgGIRhZ (ORCPT + 99 others); Thu, 9 Jul 2020 13:37:25 -0400 Received: from mga09.intel.com ([134.134.136.24]:35028 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728485AbgGIRhV (ORCPT ); Thu, 9 Jul 2020 13:37:21 -0400 IronPort-SDR: NaBNvyy9SJw/p94hOmx7DJnP9Ze/nzoy0n45xvbSoM+eLpaCanLGU7DoVvMLtuyDZKVs8yZdf0 tXd2y1KCz12g== X-IronPort-AV: E=McAfee;i="6000,8403,9677"; a="149537118" X-IronPort-AV: E=Sophos;i="5.75,332,1589266800"; d="scan'208";a="149537118" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Jul 2020 10:37:21 -0700 IronPort-SDR: VVZjKTB7Khs3H5RS1BMHr+63/B0NwTPHJHvZVFy5QmpQAKa4gogC/OGRZsAayi1eFXxtNcXFPf JQOlMndslzqQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,332,1589266800"; d="scan'208";a="324292526" Received: from ahunter-desktop.fi.intel.com ([10.237.72.73]) by orsmga007.jf.intel.com with ESMTP; 09 Jul 2020 10:37:20 -0700 From: Adrian Hunter To: Arnaldo Carvalho de Melo Cc: Jiri Olsa , Andi Kleen , linux-kernel@vger.kernel.org Subject: [PATCH 06/11] perf auxtrace: Add optional log flags to the itrace 'd' option Date: Thu, 9 Jul 2020 20:36:23 +0300 Message-Id: <20200709173628.5613-7-adrian.hunter@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200709173628.5613-1-adrian.hunter@intel.com> References: <20200709173628.5613-1-adrian.hunter@intel.com> Organization: Intel Finland Oy, Registered Address: PL 281, 00181 Helsinki, Business Identity Code: 0357606 - 4, Domiciled in Helsinki Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Allow the 'd' option to be followed by an architecture-specific number which flags what kind of debug messages will or will not be logged. Signed-off-by: Adrian Hunter --- tools/perf/Documentation/itrace.txt | 3 +++ tools/perf/util/auxtrace.c | 2 ++ tools/perf/util/auxtrace.h | 2 ++ 3 files changed, 7 insertions(+) diff --git a/tools/perf/Documentation/itrace.txt b/tools/perf/Documentation/itrace.txt index 34864b4047ed..3dd8fddb8b1b 100644 --- a/tools/perf/Documentation/itrace.txt +++ b/tools/perf/Documentation/itrace.txt @@ -50,3 +50,6 @@ The 'e' option may be followed by an architecture-specific number which flags what kind of errors will or will not be reported. + + If supported, The 'd' option may be followed by an architecture-specific + number which flags what kind of debug messages will or will not be logged. diff --git a/tools/perf/util/auxtrace.c b/tools/perf/util/auxtrace.c index 5cfc0b12b2b3..3f806c2881c9 100644 --- a/tools/perf/util/auxtrace.c +++ b/tools/perf/util/auxtrace.c @@ -1441,6 +1441,8 @@ int itrace_parse_synth_opts(const struct option *opt, const char *str, break; case 'd': synth_opts->log = true; + synth_opts->log_flags = strtoul(p, &endptr, 0); + p = endptr; break; case 'c': synth_opts->branches = true; diff --git a/tools/perf/util/auxtrace.h b/tools/perf/util/auxtrace.h index a04475f41f28..f41dbdc98175 100644 --- a/tools/perf/util/auxtrace.h +++ b/tools/perf/util/auxtrace.h @@ -92,6 +92,7 @@ enum itrace_period_type { * @ptime_range: time intervals to trace or NULL * @range_num: number of time intervals to trace * @error_flags: arch-specific flags to affect what errors are reported + * @log_flags: arch-specific flags to affect what is logged */ struct itrace_synth_opts { bool set; @@ -126,6 +127,7 @@ struct itrace_synth_opts { struct perf_time_interval *ptime_range; int range_num; unsigned int error_flags; + unsigned int log_flags; }; /** -- 2.25.1