From 5872ac6f1f5b804ffea38ff59025441618802d6b Mon Sep 17 00:00:00 2001 From: Yabin Cui Date: Fri, 31 Jul 2015 18:40:09 -0700 Subject: Simpleperf: correct the event type name printed in stat command. Bug: 22884977 Change-Id: I3c4f5c8dc02d5b17f5942e4e98476d1c4f3fbcad --- simpleperf/event_selection_set.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'simpleperf/event_selection_set.h') 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& threads); bool OpenEventFilesForThreadsOnAllCpus(const std::vector& threads); bool EnableEvents(); - bool ReadCounters(std::map>* counters_map); + bool ReadCounters(std::map>* counters_map); void PreparePollForEventFiles(std::vector* pollfds); bool MmapEventFiles(size_t mmap_pages); bool ReadMmapEventData(std::function callback); std::string FindEventFileNameById(uint64_t id); - const perf_event_attr& FindEventAttrByType(const EventType& event_type); - const std::vector>& FindEventFdsByType(const EventType& event_type); + const perf_event_attr& FindEventAttrByType(const EventTypeAndModifier& event_type_modifier); + const std::vector>& FindEventFdsByType( + const EventTypeAndModifier& event_type_modifier); private: bool OpenEventFiles(const std::vector& threads, const std::vector& cpus); struct EventSelection { - EventType event_type; + EventTypeAndModifier event_type_modifier; perf_event_attr event_attr; std::vector> event_fds; }; - EventSelection* FindSelectionByType(const EventType& event_type); + EventSelection* FindSelectionByType(const EventTypeAndModifier& event_type_modifier); std::vector selections_; -- cgit v1.2.3