trace_processor: fix parsing of kernel LMK events
Bug: 122721587
Change-Id: I610ecacf31b1df34930c48e4a170be5c89b2f422
diff --git a/src/trace_processor/trace_storage.h b/src/trace_processor/trace_storage.h
index e98a285..c022806 100644
--- a/src/trace_processor/trace_storage.h
+++ b/src/trace_processor/trace_storage.h
@@ -51,6 +51,7 @@
// invalid row id.
kCounters = 1,
kRawEvents = 2,
+ kInstants = 3,
};
// The top 8 bits are set to the TableId and the bottom 32 to the row of the
@@ -317,17 +318,17 @@
class Instants {
public:
- inline size_t AddInstantEvent(int64_t timestamp,
- StringId name_id,
- double value,
- int64_t ref,
- RefType type) {
+ inline uint32_t AddInstantEvent(int64_t timestamp,
+ StringId name_id,
+ double value,
+ int64_t ref,
+ RefType type) {
timestamps_.emplace_back(timestamp);
name_ids_.emplace_back(name_id);
values_.emplace_back(value);
refs_.emplace_back(ref);
types_.emplace_back(type);
- return instant_count() - 1;
+ return static_cast<uint32_t>(instant_count() - 1);
}
size_t instant_count() const { return timestamps_.size(); }