From: Alexander Shishkin <alexander.shishkin@linux.intel.com>
To: Peter Zijlstra <a.p.zijlstra@chello.nl>,
Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Ingo Molnar <mingo@redhat.com>,
linux-kernel@vger.kernel.org, Will Deacon <will.deacon@arm.com>,
Adrian Hunter <adrian.hunter@intel.com>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>
Subject: [PATCH v1 3/4] perf tools: Add 'suppress_aux' attribute bit definition and fallback
Date: Tue, 14 Nov 2017 14:30:23 +0200 [thread overview]
Message-ID: <20171114123024.11517-4-alexander.shishkin@linux.intel.com> (raw)
In-Reply-To: <20171114123024.11517-1-alexander.shishkin@linux.intel.com>
This adds support for suppress_aux, the switch that enables suppressing
not-so-useful PERF_RECORD_AUX records. Also handle kernels where it's
not supported.
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
---
tools/perf/util/evsel.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
index f894893c203d..794e56b42c20 100644
--- a/tools/perf/util/evsel.c
+++ b/tools/perf/util/evsel.c
@@ -50,6 +50,7 @@ static struct {
bool lbr_flags;
bool write_backward;
bool group_read;
+ bool suppress_aux;
} perf_missing_features;
static clockid_t clockid;
@@ -1570,6 +1571,7 @@ int perf_event_attr__fprintf(FILE *fp, struct perf_event_attr *attr,
PRINT_ATTRf(use_clockid, p_unsigned);
PRINT_ATTRf(context_switch, p_unsigned);
PRINT_ATTRf(write_backward, p_unsigned);
+ PRINT_ATTRf(suppress_aux, p_unsigned);
PRINT_ATTRn("{ wakeup_events, wakeup_watermark }", wakeup_events, p_unsigned);
PRINT_ATTRf(bp_type, p_unsigned);
@@ -1686,6 +1688,8 @@ int perf_evsel__open(struct perf_evsel *evsel, struct cpu_map *cpus,
PERF_SAMPLE_BRANCH_NO_CYCLES);
if (perf_missing_features.group_read && evsel->attr.inherit)
evsel->attr.read_format &= ~(PERF_FORMAT_GROUP|PERF_FORMAT_ID);
+ if (perf_missing_features.suppress_aux && evsel->attr.suppress_aux)
+ evsel->attr.suppress_aux = 0;
retry_sample_id:
if (perf_missing_features.sample_id_all)
evsel->attr.sample_id_all = 0;
@@ -1847,6 +1851,11 @@ int perf_evsel__open(struct perf_evsel *evsel, struct cpu_map *cpus,
perf_missing_features.group_read = true;
pr_debug2("switching off group read\n");
goto fallback_missing_features;
+ } else if (!perf_missing_features.suppress_aux &&
+ evsel->attr.suppress_aux) {
+ perf_missing_features.suppress_aux = true;
+ pr_debug2("switching off suppress_aux\n");
+ goto fallback_missing_features;
}
out_close:
do {
--
2.15.0
next prev parent reply other threads:[~2017-11-14 12:40 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-14 12:30 [PATCH v1 0/4] perf: Allow suppressing useless AUX records Alexander Shishkin
2017-11-14 12:30 ` [PATCH v1 1/4] perf: Allow suppressing " Alexander Shishkin
2017-11-15 12:00 ` Peter Zijlstra
2018-01-15 15:00 ` [PATCH] " Alexander Shishkin
2018-03-29 11:54 ` Peter Zijlstra
2018-03-31 9:35 ` Ingo Molnar
2018-04-03 17:32 ` Will Deacon
2018-04-04 14:53 ` [PATCH v2] perf: Suppress AUX/OVERWRITE records Alexander Shishkin
2018-05-04 12:09 ` Alexander Shishkin
2018-05-04 15:35 ` Arnaldo Carvalho de Melo
2018-05-04 15:36 ` Arnaldo Carvalho de Melo
2018-09-25 9:27 ` [tip:perf/core] " tip-bot for Alexander Shishkin
2017-11-14 12:30 ` [PATCH v1 2/4] tools, perf_event.h: Synchronize Alexander Shishkin
2017-11-14 12:30 ` Alexander Shishkin [this message]
2017-11-14 12:30 ` [PATCH v1 4/4] perf intel-pt, intel-bts: Suppress useless AUX records by default Alexander Shishkin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171114123024.11517-4-alexander.shishkin@linux.intel.com \
--to=alexander.shishkin@linux.intel.com \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@redhat.com \
--cc=adrian.hunter@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=will.deacon@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).