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-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1344344165-369636-3-git-send-email-avagin@openvz.org>
Date:	Tue,  7 Aug 2012 16:56:03 +0400
From:	Andrew Vagin <avagin@...nvz.org>
To:	linux-kernel@...r.kernel.org
Cc:	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Paul Mackerras <paulus@...ba.org>,
	Ingo Molnar <mingo@...hat.com>,
	Arnaldo Carvalho de Melo <acme@...stprotocols.net>
Subject: [PATCH 2/4] perf: synthesize_sample gets evsel instead of session

The same thing was done for perf_evsel__parse_sample

Signed-off-by: Andrew Vagin <avagin@...nvz.org>
---
 tools/perf/util/event.h |    4 ----
 tools/perf/util/evsel.c |    4 +++-
 tools/perf/util/evsel.h |    5 +++++
 3 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/tools/perf/util/event.h b/tools/perf/util/event.h
index d84870b..1ab3141 100644
--- a/tools/perf/util/event.h
+++ b/tools/perf/util/event.h
@@ -197,10 +197,6 @@ int perf_event__preprocess_sample(const union perf_event *self,
 
 const char *perf_event__name(unsigned int id);
 
-int perf_event__synthesize_sample(union perf_event *event, u64 type,
-				  const struct perf_sample *sample,
-				  bool swapped);
-
 size_t perf_event__fprintf_comm(union perf_event *event, FILE *fp);
 size_t perf_event__fprintf_mmap(union perf_event *event, FILE *fp);
 size_t perf_event__fprintf_task(union perf_event *event, FILE *fp);
diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
index 2eaae14..7547203 100644
--- a/tools/perf/util/evsel.c
+++ b/tools/perf/util/evsel.c
@@ -872,10 +872,12 @@ int perf_evsel__parse_sample(struct perf_evsel *evsel, union perf_event *event,
 	return 0;
 }
 
-int perf_event__synthesize_sample(union perf_event *event, u64 type,
+int perf_evsel__synthesize_sample(struct perf_evsel *evsel,
+				  union perf_event *event,
 				  const struct perf_sample *sample,
 				  bool swapped)
 {
+	u64 type = evsel->attr.sample_type;
 	u64 *array;
 
 	/*
diff --git a/tools/perf/util/evsel.h b/tools/perf/util/evsel.h
index a56c457..62cdd5d 100644
--- a/tools/perf/util/evsel.h
+++ b/tools/perf/util/evsel.h
@@ -183,4 +183,9 @@ void hists__init(struct hists *hists);
 
 int perf_evsel__parse_sample(struct perf_evsel *evsel, union perf_event *event,
 			     struct perf_sample *sample, bool swapped);
+
+int perf_evsel__synthesize_sample(struct perf_evsel *evsel,
+				  union perf_event *event,
+				  const struct perf_sample *sample,
+				  bool swapped);
 #endif /* __PERF_EVSEL_H */
-- 
1.7.1

--
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