From: Jiri Olsa <jolsa@kernel.org>
To: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: lkml <linux-kernel@vger.kernel.org>,
Ingo Molnar <mingo@kernel.org>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
David Ahern <dsahern@gmail.com>,
Namhyung Kim <namhyung@kernel.org>,
Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Subject: [PATCH 2/6] perf header: Display missing features
Date: Tue, 11 Oct 2016 14:14:08 +0200 [thread overview]
Message-ID: <1476188052-32316-3-git-send-email-jolsa@kernel.org> (raw)
In-Reply-To: <1476188052-32316-1-git-send-email-jolsa@kernel.org>
Display missing features in header info, like:
$ perf report --header-only
# ========
# captured on: Mon Oct 10 09:39:47 2016
...
# missing features: HEADER_TRACING_DATA HEADER_CPU_TOPOLOGY ...
Link: http://lkml.kernel.org/n/tip-bh5gp84gobdmyl345dcp64se@git.kernel.org
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
---
| 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
--git a/tools/perf/util/header.c b/tools/perf/util/header.c
index b227dfab56c3..59b67aefa8b2 100644
--- a/tools/perf/util/header.c
+++ b/tools/perf/util/header.c
@@ -2251,7 +2251,7 @@ int perf_header__fprintf_info(struct perf_session *session, FILE *fp, bool full)
struct perf_header *header = &session->header;
int fd = perf_data_file__fd(session->file);
struct stat st;
- int ret;
+ int ret, bit;
hd.fp = fp;
hd.full = full;
@@ -2264,6 +2264,14 @@ int perf_header__fprintf_info(struct perf_session *session, FILE *fp, bool full)
perf_header__process_sections(header, fd, &hd,
perf_file_section__fprintf_info);
+
+ fprintf(fp, "# missing features: ");
+ for_each_clear_bit(bit, header->adds_features, HEADER_LAST_FEATURE) {
+ if (bit)
+ fprintf(fp, "%s ", feat_ops[bit].name);
+ }
+
+ fprintf(fp, "\n");
return 0;
}
--
2.7.4
next prev parent reply other threads:[~2016-10-11 12:14 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-11 12:14 [PATCH 0/6] perf tools: Header and c2c fixes Jiri Olsa
2016-10-11 12:14 ` [PATCH 1/6] perf report: Move captured info to generic header info Jiri Olsa
2016-10-11 12:14 ` Jiri Olsa [this message]
2016-10-11 12:14 ` [PATCH 3/6] perf header: Display feature name on write failure Jiri Olsa
2016-10-11 12:14 ` [PATCH 4/6] perf header: Set nr_numa_nodes only when we parsed all the data Jiri Olsa
2016-10-11 12:14 ` [PATCH 5/6] perf c2c report: Add --no-source option Jiri Olsa
2016-10-11 12:14 ` [PATCH 6/6] perf c2c report: Add --show-all option Jiri Olsa
2016-10-11 12:59 ` [PATCH 0/6] tools lib: Add for_each_clear_bit macro Jiri Olsa
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=1476188052-32316-3-git-send-email-jolsa@kernel.org \
--to=jolsa@kernel.org \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@redhat.com \
--cc=dsahern@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung@kernel.org \
--cc=sukadev@linux.vnet.ibm.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