summaryrefslogtreecommitdiff
path: root/simpleperf/record.h
diff options
context:
space:
mode:
authorYabin Cui <yabinc@google.com>2016-10-19 11:28:48 -0700
committerYabin Cui <yabinc@google.com>2016-10-20 10:44:14 -0700
commit2597ef042881f834d1bc414930f144a405dd13ca (patch)
treec9b7ead971181d85d4746e0de3e5d75f2e7bef7c /simpleperf/record.h
parented2e8624ef1afffc7973a91607515e42cbf15f03 (diff)
downloadextras-2597ef042881f834d1bc414930f144a405dd13ca.tar.gz
simpleperf: support building sample record manually.
And other small changes: add time when building comm record. move some Move*BinaryFormat to utils.h. Handle wrong symbol whoes address can be ULLONG_MAX. Bug: http://b/30974760 Test: simpleperf_unit_test. Change-Id: I2956d3c4b781c580fe93a6e5b77e0469f7f4f43f
Diffstat (limited to 'simpleperf/record.h')
-rw-r--r--simpleperf/record.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/simpleperf/record.h b/simpleperf/record.h
index 02854b44..2cbe35a0 100644
--- a/simpleperf/record.h
+++ b/simpleperf/record.h
@@ -319,7 +319,7 @@ struct CommRecord : public Record {
CommRecord(const perf_event_attr& attr, const char* p);
CommRecord(const perf_event_attr& attr, uint32_t pid, uint32_t tid,
- const std::string& comm, uint64_t event_id);
+ const std::string& comm, uint64_t event_id, uint64_t time);
protected:
void DumpData(size_t indent) const override;
@@ -385,6 +385,10 @@ struct SampleRecord : public Record {
PerfSampleStackUserType stack_user_data; // Valid if PERF_SAMPLE_STACK_USER.
SampleRecord(const perf_event_attr& attr, const char* p);
+ SampleRecord(const perf_event_attr& attr, uint64_t id, uint64_t ip,
+ uint32_t pid, uint32_t tid, uint64_t time, uint32_t cpu,
+ uint64_t period, const std::vector<uint64_t>& ips);
+
void ReplaceRegAndStackWithCallChain(const std::vector<uint64_t>& ips);
uint64_t Timestamp() const override;
uint32_t Cpu() const override;