diff options
author | Samip Garg <samgarg@google.com> | 2022-11-17 11:29:02 -0800 |
---|---|---|
committer | Samip Garg <samgarg@google.com> | 2022-12-08 18:09:55 +0000 |
commit | e65f708054668046d09560bb13943373b6b5a274 (patch) | |
tree | 1dd5c9a3b955c541c00b4621fa3e02051606f028 /simpleperf/event_type.h | |
parent | df142880e86418dad6b40fddb001ebd897919595 (diff) | |
parent | dd4402341ecff9c89e60b739b62dfde4f3002370 (diff) | |
download | extras-e65f708054668046d09560bb13943373b6b5a274.tar.gz |
Snap tm-dev to android13-tests-dev
Bug:259849956
Merge ab/9299233
Merged-In: Ib4c566b0bd0e5c761d9c78620caa13703c10589c
Change-Id: If320111be77cb6d02307b8442148140a0c494169
Diffstat (limited to 'simpleperf/event_type.h')
-rw-r--r-- | simpleperf/event_type.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/simpleperf/event_type.h b/simpleperf/event_type.h index d2cd0c15..14863caa 100644 --- a/simpleperf/event_type.h +++ b/simpleperf/event_type.h @@ -24,6 +24,8 @@ #include <string> #include <vector> +#include "perf_event.h" + namespace simpleperf { inline const std::string kETMEventName = "cs-etm"; @@ -50,6 +52,9 @@ struct EventType { bool IsPmuEvent() const { return name.find('/') != std::string::npos; } bool IsEtmEvent() const { return name == kETMEventName; } + bool IsHardwareEvent() const { + return type == PERF_TYPE_HARDWARE || type == PERF_TYPE_HW_CACHE || type == PERF_TYPE_RAW; + } std::vector<int> GetPmuCpumask(); |