lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1336695468-5464-1-git-send-email-andi@firstfloor.org>
Date:	Thu, 10 May 2012 17:17:48 -0700
From:	Andi Kleen <andi@...stfloor.org>
To:	acme@...hat.com
Cc:	jolsa@...hat.com, linux-kernel@...r.kernel.org,
	Andi Kleen <ak@...ux.intel.com>
Subject: [PATCH] perf, utils: Print the original modifiers in event_name

From: Andi Kleen <ak@...ux.intel.com>

We need to save the original string for perf stat output,
otherwise :t and :c are invisible.

This used to work, but broke with the parser refactoring.

Not sure if this is the best fix.

Signed-off-by: Andi Kleen <ak@...ux.intel.com>
---
 tools/perf/util/parse-events.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c
index 14fa682..cc561c2 100644
--- a/tools/perf/util/parse-events.c
+++ b/tools/perf/util/parse-events.c
@@ -810,6 +810,7 @@ int parse_events(struct perf_evlist *evlist, const char *str, int unset __used)
 	LIST_HEAD(list_tmp);
 	YY_BUFFER_STATE buffer;
 	int ret, idx = evlist->nr_entries;
+	struct perf_evsel *evsel;
 
 	buffer = parse_events__scan_string(str);
 
@@ -818,6 +819,10 @@ int parse_events(struct perf_evlist *evlist, const char *str, int unset __used)
 	parse_events__flush_buffer(buffer);
 	parse_events__delete_buffer(buffer);
 
+	/* XXX right thing for multiple events? Do all callers free? */
+	list_for_each_entry(evsel, &list, node)
+		evsel->name = strdup(str);
+
 	if (!ret) {
 		int entries = idx - evlist->nr_entries;
 		perf_evlist__splice_list_tail(evlist, &list, entries);
-- 
1.7.7.6

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ