diff options
author | Yabin Cui <yabinc@google.com> | 2015-07-31 18:40:09 -0700 |
---|---|---|
committer | Yabin Cui <yabinc@google.com> | 2015-07-31 18:43:05 -0700 |
commit | 5872ac6f1f5b804ffea38ff59025441618802d6b (patch) | |
tree | 1ddb8c2c99b10c0847239e194918b96deeed6ad7 /simpleperf/event_selection_set.h | |
parent | 9c6eab9a5bb7c979488dcfe7ea71a039e6a369fb (diff) | |
download | extras-5872ac6f1f5b804ffea38ff59025441618802d6b.tar.gz |
Simpleperf: correct the event type name printed in stat command.
Bug: 22884977
Change-Id: I3c4f5c8dc02d5b17f5942e4e98476d1c4f3fbcad
Diffstat (limited to 'simpleperf/event_selection_set.h')
-rw-r--r-- | simpleperf/event_selection_set.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/simpleperf/event_selection_set.h b/simpleperf/event_selection_set.h index 229b4247..afde0af0 100644 --- a/simpleperf/event_selection_set.h +++ b/simpleperf/event_selection_set.h @@ -62,24 +62,25 @@ class EventSelectionSet { bool OpenEventFilesForThreads(const std::vector<pid_t>& threads); bool OpenEventFilesForThreadsOnAllCpus(const std::vector<pid_t>& threads); bool EnableEvents(); - bool ReadCounters(std::map<const EventType*, std::vector<PerfCounter>>* counters_map); + bool ReadCounters(std::map<const EventTypeAndModifier*, std::vector<PerfCounter>>* counters_map); void PreparePollForEventFiles(std::vector<pollfd>* pollfds); bool MmapEventFiles(size_t mmap_pages); bool ReadMmapEventData(std::function<bool(const char*, size_t)> callback); std::string FindEventFileNameById(uint64_t id); - const perf_event_attr& FindEventAttrByType(const EventType& event_type); - const std::vector<std::unique_ptr<EventFd>>& FindEventFdsByType(const EventType& event_type); + const perf_event_attr& FindEventAttrByType(const EventTypeAndModifier& event_type_modifier); + const std::vector<std::unique_ptr<EventFd>>& FindEventFdsByType( + const EventTypeAndModifier& event_type_modifier); private: bool OpenEventFiles(const std::vector<pid_t>& threads, const std::vector<int>& cpus); struct EventSelection { - EventType event_type; + EventTypeAndModifier event_type_modifier; perf_event_attr event_attr; std::vector<std::unique_ptr<EventFd>> event_fds; }; - EventSelection* FindSelectionByType(const EventType& event_type); + EventSelection* FindSelectionByType(const EventTypeAndModifier& event_type_modifier); std::vector<EventSelection> selections_; |