TraceProcessor: add support for complete JSON events
Will require some follow-up clean ups, but in the meanwhile
brings us into a nice state w.r.t. digesting legacy traces.
This CL:
- Extracts thread and process names from metadata events.
- Creates a full stack of slice using both duration and complete events
(TRACE_EVENT_BEGIN/END(...) and TRACE_EVENT(...))
- Exposes pids and tid in the process and thread vtables.
- Refactors the ProcessTracker to support identifying threads.
by the pid+tid tuple.
- Improves the hashing of the string pool using 32-bit FNV-1a.
See https://ghostbin.com/paste/bpvq7 for a sample SQL query.
Change-Id: I567b102e14770e521f60650bcab45cb0f24fb76c
diff --git a/src/trace_processor/trace_processor_shell.cc b/src/trace_processor/trace_processor_shell.cc
index eda0116..5b535a0 100644
--- a/src/trace_processor/trace_processor_shell.cc
+++ b/src/trace_processor/trace_processor_shell.cc
@@ -67,14 +67,17 @@
for (int c = 0; c < res.columns_size(); c++) {
switch (res.column_descriptors(c).type()) {
case protos::RawQueryResult_ColumnDesc_Type_STRING:
- printf("%20s ", res.columns(c).string_values(r).c_str());
+ printf("%-20.20s ", res.columns(c).string_values(r).c_str());
break;
case protos::RawQueryResult_ColumnDesc_Type_DOUBLE:
printf("%20f ", res.columns(c).double_values(r));
break;
- case protos::RawQueryResult_ColumnDesc_Type_LONG:
- printf("%20lld ", res.columns(c).long_values(r));
+ case protos::RawQueryResult_ColumnDesc_Type_LONG: {
+ auto value = res.columns(c).long_values(r);
+ printf((value < 0xffffffll) ? "%20lld " : "%20llx ", value);
+
break;
+ }
}
}
printf("\n");