diff options
author | Yabin Cui <yabinc@google.com> | 2017-08-14 20:51:47 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2017-08-14 20:51:47 +0000 |
commit | 78b3cc838795ec468721f896e92bba1a9967dd53 (patch) | |
tree | 3f3395d8b95c15cb731703c28fdd49f9122411af /simpleperf/cmd_record.cpp | |
parent | 504d6530084c9424abe4c0e44109b9e76995480d (diff) | |
parent | 80a1e12868bed96aaef78ce5d4abac42e56625ba (diff) | |
download | extras-78b3cc838795ec468721f896e92bba1a9967dd53.tar.gz |
Merge "simpleperf: export more info through report_lib_interface."android-o-iot-preview-5o-iot-preview-5
Diffstat (limited to 'simpleperf/cmd_record.cpp')
-rw-r--r-- | simpleperf/cmd_record.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/simpleperf/cmd_record.cpp b/simpleperf/cmd_record.cpp index 6b2be764..c22129a3 100644 --- a/simpleperf/cmd_record.cpp +++ b/simpleperf/cmd_record.cpp @@ -31,6 +31,9 @@ #include <android-base/parseint.h> #include <android-base/strings.h> #include <android-base/test_utils.h> +#if defined(__ANDROID__) +#include <android-base/properties.h> +#endif #include "command.h" #include "dwarf_unwind.h" @@ -1182,6 +1185,12 @@ bool RecordCommand::DumpMetaInfoFeature() { // By storing event types information in perf.data, the readers of perf.data have the same // understanding of event types, even if they are on another machine. info_map["event_type_info"] = ScopedEventTypes::BuildString(event_selection_set_.GetEvents()); +#if defined(__ANDROID__) + info_map["product_props"] = android::base::StringPrintf("%s:%s:%s", + android::base::GetProperty("ro.product.manufacturer", "").c_str(), + android::base::GetProperty("ro.product.model", "").c_str(), + android::base::GetProperty("ro.product.name", "").c_str()); +#endif return record_file_writer_->WriteMetaInfoFeature(info_map); } |