Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Linux: Kernel

[PATCH 2/4] perf: synthesize_sample gets evsel instead of session

 

 

Linux kernel RSS feed   Index | Next | Previous | View Threaded


avagin at openvz

Aug 7, 2012, 5:56 AM

Post #1 of 1 (24 views)
Permalink
[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 [at] openvz>
---
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 [at] vger
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

Linux kernel RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.