Merge "[ui] Fix base_slice_track.ts formatting." into main
diff --git a/Android.bp b/Android.bp
index 9ceeed2..328fc3d 100644
--- a/Android.bp
+++ b/Android.bp
@@ -5944,6 +5944,7 @@
"protos/perfetto/trace/ftrace/net.proto",
"protos/perfetto/trace/ftrace/oom.proto",
"protos/perfetto/trace/ftrace/panel.proto",
+ "protos/perfetto/trace/ftrace/perf_trace_counters.proto",
"protos/perfetto/trace/ftrace/power.proto",
"protos/perfetto/trace/ftrace/printk.proto",
"protos/perfetto/trace/ftrace/raw_syscalls.proto",
@@ -6362,6 +6363,7 @@
"protos/perfetto/trace/ftrace/net.proto",
"protos/perfetto/trace/ftrace/oom.proto",
"protos/perfetto/trace/ftrace/panel.proto",
+ "protos/perfetto/trace/ftrace/perf_trace_counters.proto",
"protos/perfetto/trace/ftrace/power.proto",
"protos/perfetto/trace/ftrace/printk.proto",
"protos/perfetto/trace/ftrace/raw_syscalls.proto",
@@ -6443,6 +6445,7 @@
"external/perfetto/protos/perfetto/trace/ftrace/net.gen.cc",
"external/perfetto/protos/perfetto/trace/ftrace/oom.gen.cc",
"external/perfetto/protos/perfetto/trace/ftrace/panel.gen.cc",
+ "external/perfetto/protos/perfetto/trace/ftrace/perf_trace_counters.gen.cc",
"external/perfetto/protos/perfetto/trace/ftrace/power.gen.cc",
"external/perfetto/protos/perfetto/trace/ftrace/printk.gen.cc",
"external/perfetto/protos/perfetto/trace/ftrace/raw_syscalls.gen.cc",
@@ -6524,6 +6527,7 @@
"external/perfetto/protos/perfetto/trace/ftrace/net.gen.h",
"external/perfetto/protos/perfetto/trace/ftrace/oom.gen.h",
"external/perfetto/protos/perfetto/trace/ftrace/panel.gen.h",
+ "external/perfetto/protos/perfetto/trace/ftrace/perf_trace_counters.gen.h",
"external/perfetto/protos/perfetto/trace/ftrace/power.gen.h",
"external/perfetto/protos/perfetto/trace/ftrace/printk.gen.h",
"external/perfetto/protos/perfetto/trace/ftrace/raw_syscalls.gen.h",
@@ -6601,6 +6605,7 @@
"protos/perfetto/trace/ftrace/net.proto",
"protos/perfetto/trace/ftrace/oom.proto",
"protos/perfetto/trace/ftrace/panel.proto",
+ "protos/perfetto/trace/ftrace/perf_trace_counters.proto",
"protos/perfetto/trace/ftrace/power.proto",
"protos/perfetto/trace/ftrace/printk.proto",
"protos/perfetto/trace/ftrace/raw_syscalls.proto",
@@ -6681,6 +6686,7 @@
"external/perfetto/protos/perfetto/trace/ftrace/net.pb.cc",
"external/perfetto/protos/perfetto/trace/ftrace/oom.pb.cc",
"external/perfetto/protos/perfetto/trace/ftrace/panel.pb.cc",
+ "external/perfetto/protos/perfetto/trace/ftrace/perf_trace_counters.pb.cc",
"external/perfetto/protos/perfetto/trace/ftrace/power.pb.cc",
"external/perfetto/protos/perfetto/trace/ftrace/printk.pb.cc",
"external/perfetto/protos/perfetto/trace/ftrace/raw_syscalls.pb.cc",
@@ -6761,6 +6767,7 @@
"external/perfetto/protos/perfetto/trace/ftrace/net.pb.h",
"external/perfetto/protos/perfetto/trace/ftrace/oom.pb.h",
"external/perfetto/protos/perfetto/trace/ftrace/panel.pb.h",
+ "external/perfetto/protos/perfetto/trace/ftrace/perf_trace_counters.pb.h",
"external/perfetto/protos/perfetto/trace/ftrace/power.pb.h",
"external/perfetto/protos/perfetto/trace/ftrace/printk.pb.h",
"external/perfetto/protos/perfetto/trace/ftrace/raw_syscalls.pb.h",
@@ -6838,6 +6845,7 @@
"protos/perfetto/trace/ftrace/net.proto",
"protos/perfetto/trace/ftrace/oom.proto",
"protos/perfetto/trace/ftrace/panel.proto",
+ "protos/perfetto/trace/ftrace/perf_trace_counters.proto",
"protos/perfetto/trace/ftrace/power.proto",
"protos/perfetto/trace/ftrace/printk.proto",
"protos/perfetto/trace/ftrace/raw_syscalls.proto",
@@ -6919,6 +6927,7 @@
"external/perfetto/protos/perfetto/trace/ftrace/net.pbzero.cc",
"external/perfetto/protos/perfetto/trace/ftrace/oom.pbzero.cc",
"external/perfetto/protos/perfetto/trace/ftrace/panel.pbzero.cc",
+ "external/perfetto/protos/perfetto/trace/ftrace/perf_trace_counters.pbzero.cc",
"external/perfetto/protos/perfetto/trace/ftrace/power.pbzero.cc",
"external/perfetto/protos/perfetto/trace/ftrace/printk.pbzero.cc",
"external/perfetto/protos/perfetto/trace/ftrace/raw_syscalls.pbzero.cc",
@@ -7000,6 +7009,7 @@
"external/perfetto/protos/perfetto/trace/ftrace/net.pbzero.h",
"external/perfetto/protos/perfetto/trace/ftrace/oom.pbzero.h",
"external/perfetto/protos/perfetto/trace/ftrace/panel.pbzero.h",
+ "external/perfetto/protos/perfetto/trace/ftrace/perf_trace_counters.pbzero.h",
"external/perfetto/protos/perfetto/trace/ftrace/power.pbzero.h",
"external/perfetto/protos/perfetto/trace/ftrace/printk.pbzero.h",
"external/perfetto/protos/perfetto/trace/ftrace/raw_syscalls.pbzero.h",
@@ -13367,6 +13377,7 @@
"protos/perfetto/trace/ftrace/net.proto",
"protos/perfetto/trace/ftrace/oom.proto",
"protos/perfetto/trace/ftrace/panel.proto",
+ "protos/perfetto/trace/ftrace/perf_trace_counters.proto",
"protos/perfetto/trace/ftrace/power.proto",
"protos/perfetto/trace/ftrace/printk.proto",
"protos/perfetto/trace/ftrace/raw_syscalls.proto",
diff --git a/BUILD b/BUILD
index eada055..cddab6b 100644
--- a/BUILD
+++ b/BUILD
@@ -4460,6 +4460,7 @@
"protos/perfetto/trace/ftrace/net.proto",
"protos/perfetto/trace/ftrace/oom.proto",
"protos/perfetto/trace/ftrace/panel.proto",
+ "protos/perfetto/trace/ftrace/perf_trace_counters.proto",
"protos/perfetto/trace/ftrace/power.proto",
"protos/perfetto/trace/ftrace/printk.proto",
"protos/perfetto/trace/ftrace/raw_syscalls.proto",
diff --git a/include/perfetto/ext/base/thread_annotations.h b/include/perfetto/ext/base/thread_annotations.h
index aaf291f..6aee16a 100644
--- a/include/perfetto/ext/base/thread_annotations.h
+++ b/include/perfetto/ext/base/thread_annotations.h
@@ -29,10 +29,8 @@
const char* description);
}
-#define PERFETTO_ANNOTATE_BENIGN_RACE_SIZED(pointer, size, description) \
- AnnotateBenignRaceSized(__FILE__, __LINE__, \
- reinterpret_cast<unsigned long>(pointer), size, \
- description);
+#define PERFETTO_ANNOTATE_BENIGN_RACE_SIZED(pointer, size, description) \
+ AnnotateBenignRaceSized(__FILE__, __LINE__, pointer, size, description);
#else // defined(ADDRESS_SANITIZER)
#define PERFETTO_ANNOTATE_BENIGN_RACE_SIZED(pointer, size, description)
#endif // defined(ADDRESS_SANITIZER)
diff --git a/protos/perfetto/trace/ftrace/all_protos.gni b/protos/perfetto/trace/ftrace/all_protos.gni
index bd055ab..2237aef 100644
--- a/protos/perfetto/trace/ftrace/all_protos.gni
+++ b/protos/perfetto/trace/ftrace/all_protos.gni
@@ -57,6 +57,7 @@
"net.proto",
"oom.proto",
"panel.proto",
+ "perf_trace_counters.proto",
"power.proto",
"printk.proto",
"raw_syscalls.proto",
diff --git a/protos/perfetto/trace/ftrace/ftrace_event.proto b/protos/perfetto/trace/ftrace/ftrace_event.proto
index a068c9d..f7e314b 100644
--- a/protos/perfetto/trace/ftrace/ftrace_event.proto
+++ b/protos/perfetto/trace/ftrace/ftrace_event.proto
@@ -57,6 +57,7 @@
import "protos/perfetto/trace/ftrace/net.proto";
import "protos/perfetto/trace/ftrace/oom.proto";
import "protos/perfetto/trace/ftrace/panel.proto";
+import "protos/perfetto/trace/ftrace/perf_trace_counters.proto";
import "protos/perfetto/trace/ftrace/power.proto";
import "protos/perfetto/trace/ftrace/printk.proto";
import "protos/perfetto/trace/ftrace/raw_syscalls.proto";
@@ -601,5 +602,6 @@
SamsungTracingMarkWriteFtraceEvent samsung_tracing_mark_write = 484;
BinderCommandFtraceEvent binder_command = 485;
BinderReturnFtraceEvent binder_return = 486;
+ SchedSwitchWithCtrsFtraceEvent sched_switch_with_ctrs = 487;
}
}
diff --git a/protos/perfetto/trace/ftrace/perf_trace_counters.proto b/protos/perfetto/trace/ftrace/perf_trace_counters.proto
new file mode 100644
index 0000000..0e3531c
--- /dev/null
+++ b/protos/perfetto/trace/ftrace/perf_trace_counters.proto
@@ -0,0 +1,26 @@
+// Autogenerated by:
+// ../../src/tools/ftrace_proto_gen/ftrace_proto_gen.cc
+// Do not edit.
+
+syntax = "proto2";
+package perfetto.protos;
+
+message SchedSwitchWithCtrsFtraceEvent {
+ optional int32 old_pid = 1;
+ optional int32 new_pid = 2;
+ optional uint32 cctr = 3;
+ optional uint32 ctr0 = 4;
+ optional uint32 ctr1 = 5;
+ optional uint32 ctr2 = 6;
+ optional uint32 ctr3 = 7;
+ optional uint32 lctr0 = 8;
+ optional uint32 lctr1 = 9;
+ optional uint32 ctr4 = 10;
+ optional uint32 ctr5 = 11;
+ optional string prev_comm = 12;
+ optional int32 prev_pid = 13;
+ optional uint32 cyc = 14;
+ optional uint32 inst = 15;
+ optional uint32 stallbm = 16;
+ optional uint32 l3dm = 17;
+}
diff --git a/protos/perfetto/trace/perfetto_trace.proto b/protos/perfetto/trace/perfetto_trace.proto
index fb3bd6a..8cfa67e 100644
--- a/protos/perfetto/trace/perfetto_trace.proto
+++ b/protos/perfetto/trace/perfetto_trace.proto
@@ -8486,6 +8486,30 @@
// End of protos/perfetto/trace/ftrace/panel.proto
+// Begin of protos/perfetto/trace/ftrace/perf_trace_counters.proto
+
+message SchedSwitchWithCtrsFtraceEvent {
+ optional int32 old_pid = 1;
+ optional int32 new_pid = 2;
+ optional uint32 cctr = 3;
+ optional uint32 ctr0 = 4;
+ optional uint32 ctr1 = 5;
+ optional uint32 ctr2 = 6;
+ optional uint32 ctr3 = 7;
+ optional uint32 lctr0 = 8;
+ optional uint32 lctr1 = 9;
+ optional uint32 ctr4 = 10;
+ optional uint32 ctr5 = 11;
+ optional string prev_comm = 12;
+ optional int32 prev_pid = 13;
+ optional uint32 cyc = 14;
+ optional uint32 inst = 15;
+ optional uint32 stallbm = 16;
+ optional uint32 l3dm = 17;
+}
+
+// End of protos/perfetto/trace/ftrace/perf_trace_counters.proto
+
// Begin of protos/perfetto/trace/ftrace/power.proto
message CpuFrequencyFtraceEvent {
@@ -9768,6 +9792,7 @@
SamsungTracingMarkWriteFtraceEvent samsung_tracing_mark_write = 484;
BinderCommandFtraceEvent binder_command = 485;
BinderReturnFtraceEvent binder_return = 486;
+ SchedSwitchWithCtrsFtraceEvent sched_switch_with_ctrs = 487;
}
}
diff --git a/src/tools/ftrace_proto_gen/event_list b/src/tools/ftrace_proto_gen/event_list
index f2dcbb3..68bb2ba 100644
--- a/src/tools/ftrace_proto_gen/event_list
+++ b/src/tools/ftrace_proto_gen/event_list
@@ -481,3 +481,4 @@
samsung/tracing_mark_write
binder/binder_command
binder/binder_return
+perf_trace_counters/sched_switch_with_ctrs
diff --git a/src/trace_processor/db/query_executor_unittest.cc b/src/trace_processor/db/query_executor_unittest.cc
index e5022c0..849c1cb 100644
--- a/src/trace_processor/db/query_executor_unittest.cc
+++ b/src/trace_processor/db/query_executor_unittest.cc
@@ -223,7 +223,7 @@
ASSERT_THAT(rm.GetAllIndices(), ElementsAre(0u, 4u));
}
-TEST(QueryExecutor, ArrangementOverlaySubsetInputRange) {
+TEST(QueryExecutor, ArrangementStorageSubsetInputRange) {
std::unique_ptr<storage::Storage> fake =
storage::FakeStorage::SearchSubset(5u, RowMap::Range(2u, 4u));
@@ -237,7 +237,7 @@
ASSERT_THAT(rm.GetAllIndices(), ElementsAre(2u));
}
-TEST(QueryExecutor, ArrangementOverlaySubsetInputBitvector) {
+TEST(QueryExecutor, ArrangementStorageSubsetInputBitvector) {
std::unique_ptr<storage::Storage> fake =
storage::FakeStorage::SearchSubset(5u, BitVector({0, 0, 1, 1, 0}));
diff --git a/src/trace_processor/db/storage/arrangement_storage.cc b/src/trace_processor/db/storage/arrangement_storage.cc
index ee777f4..b0171db 100644
--- a/src/trace_processor/db/storage/arrangement_storage.cc
+++ b/src/trace_processor/db/storage/arrangement_storage.cc
@@ -60,6 +60,7 @@
}
} else {
BitVector storage_bitvector = std::move(storage_result).TakeIfBitVector();
+ PERFETTO_DCHECK(storage_bitvector.size() == *max_i + 1);
// After benchmarking, it turns out this complexity *is* actually worthwhile
// and has a noticable impact on the performance of this function in real
@@ -67,13 +68,13 @@
// Fast path: we compare as many groups of 64 elements as we can.
// This should be very easy for the compiler to auto-vectorize.
+ const uint32_t* arrangement_idx = arrangement.data() + in.start;
uint32_t fast_path_elements = builder.BitsInCompleteWordsUntilFull();
- uint32_t cur_idx = 0;
for (uint32_t i = 0; i < fast_path_elements; i += BitVector::kBitsInWord) {
uint64_t word = 0;
// This part should be optimised by SIMD and is expected to be fast.
- for (uint32_t k = 0; k < BitVector::kBitsInWord; ++k, ++cur_idx) {
- bool comp_result = storage_bitvector.IsSet((*arrangement_)[cur_idx]);
+ for (uint32_t k = 0; k < BitVector::kBitsInWord; ++k, ++arrangement_idx) {
+ bool comp_result = storage_bitvector.IsSet(*arrangement_idx);
word |= static_cast<uint64_t>(comp_result) << k;
}
builder.AppendWord(word);
@@ -81,8 +82,8 @@
// Slow path: we compare <64 elements and append to fill the Builder.
uint32_t back_elements = builder.BitsUntilFull();
- for (uint32_t i = 0; i < back_elements; ++i, ++cur_idx) {
- builder.Append(storage_bitvector.IsSet((*arrangement_)[cur_idx]));
+ for (uint32_t i = 0; i < back_elements; ++i, ++arrangement_idx) {
+ builder.Append(storage_bitvector.IsSet(*arrangement_idx));
}
}
return RangeOrBitVector(std::move(builder).Build());
diff --git a/src/trace_processor/importers/ftrace/ftrace_descriptors.cc b/src/trace_processor/importers/ftrace/ftrace_descriptors.cc
index 557512c..225f951 100644
--- a/src/trace_processor/importers/ftrace/ftrace_descriptors.cc
+++ b/src/trace_processor/importers/ftrace/ftrace_descriptors.cc
@@ -24,7 +24,7 @@
namespace trace_processor {
namespace {
-std::array<FtraceMessageDescriptor, 487> descriptors{{
+std::array<FtraceMessageDescriptor, 488> descriptors{{
{nullptr, 0, {}},
{nullptr, 0, {}},
{nullptr, 0, {}},
@@ -5351,6 +5351,30 @@
{"cmd", ProtoSchemaType::kUint32},
},
},
+ {
+ "sched_switch_with_ctrs",
+ 17,
+ {
+ {},
+ {"old_pid", ProtoSchemaType::kInt32},
+ {"new_pid", ProtoSchemaType::kInt32},
+ {"cctr", ProtoSchemaType::kUint32},
+ {"ctr0", ProtoSchemaType::kUint32},
+ {"ctr1", ProtoSchemaType::kUint32},
+ {"ctr2", ProtoSchemaType::kUint32},
+ {"ctr3", ProtoSchemaType::kUint32},
+ {"lctr0", ProtoSchemaType::kUint32},
+ {"lctr1", ProtoSchemaType::kUint32},
+ {"ctr4", ProtoSchemaType::kUint32},
+ {"ctr5", ProtoSchemaType::kUint32},
+ {"prev_comm", ProtoSchemaType::kString},
+ {"prev_pid", ProtoSchemaType::kInt32},
+ {"cyc", ProtoSchemaType::kUint32},
+ {"inst", ProtoSchemaType::kUint32},
+ {"stallbm", ProtoSchemaType::kUint32},
+ {"l3dm", ProtoSchemaType::kUint32},
+ },
+ },
}};
} // namespace
diff --git a/src/traced/probes/ftrace/event_info.cc b/src/traced/probes/ftrace/event_info.cc
index 7ad51cf..62bd4b9 100644
--- a/src/traced/probes/ftrace/event_info.cc
+++ b/src/traced/probes/ftrace/event_info.cc
@@ -7361,6 +7361,64 @@
kUnsetFtraceId,
430,
kUnsetSize},
+ {"sched_switch_with_ctrs",
+ "perf_trace_counters",
+ {
+ {kUnsetOffset, kUnsetSize, FtraceFieldType::kInvalidFtraceFieldType,
+ "old_pid", 1, ProtoSchemaType::kInt32,
+ TranslationStrategy::kInvalidTranslationStrategy},
+ {kUnsetOffset, kUnsetSize, FtraceFieldType::kInvalidFtraceFieldType,
+ "new_pid", 2, ProtoSchemaType::kInt32,
+ TranslationStrategy::kInvalidTranslationStrategy},
+ {kUnsetOffset, kUnsetSize, FtraceFieldType::kInvalidFtraceFieldType,
+ "cctr", 3, ProtoSchemaType::kUint32,
+ TranslationStrategy::kInvalidTranslationStrategy},
+ {kUnsetOffset, kUnsetSize, FtraceFieldType::kInvalidFtraceFieldType,
+ "ctr0", 4, ProtoSchemaType::kUint32,
+ TranslationStrategy::kInvalidTranslationStrategy},
+ {kUnsetOffset, kUnsetSize, FtraceFieldType::kInvalidFtraceFieldType,
+ "ctr1", 5, ProtoSchemaType::kUint32,
+ TranslationStrategy::kInvalidTranslationStrategy},
+ {kUnsetOffset, kUnsetSize, FtraceFieldType::kInvalidFtraceFieldType,
+ "ctr2", 6, ProtoSchemaType::kUint32,
+ TranslationStrategy::kInvalidTranslationStrategy},
+ {kUnsetOffset, kUnsetSize, FtraceFieldType::kInvalidFtraceFieldType,
+ "ctr3", 7, ProtoSchemaType::kUint32,
+ TranslationStrategy::kInvalidTranslationStrategy},
+ {kUnsetOffset, kUnsetSize, FtraceFieldType::kInvalidFtraceFieldType,
+ "lctr0", 8, ProtoSchemaType::kUint32,
+ TranslationStrategy::kInvalidTranslationStrategy},
+ {kUnsetOffset, kUnsetSize, FtraceFieldType::kInvalidFtraceFieldType,
+ "lctr1", 9, ProtoSchemaType::kUint32,
+ TranslationStrategy::kInvalidTranslationStrategy},
+ {kUnsetOffset, kUnsetSize, FtraceFieldType::kInvalidFtraceFieldType,
+ "ctr4", 10, ProtoSchemaType::kUint32,
+ TranslationStrategy::kInvalidTranslationStrategy},
+ {kUnsetOffset, kUnsetSize, FtraceFieldType::kInvalidFtraceFieldType,
+ "ctr5", 11, ProtoSchemaType::kUint32,
+ TranslationStrategy::kInvalidTranslationStrategy},
+ {kUnsetOffset, kUnsetSize, FtraceFieldType::kInvalidFtraceFieldType,
+ "prev_comm", 12, ProtoSchemaType::kString,
+ TranslationStrategy::kInvalidTranslationStrategy},
+ {kUnsetOffset, kUnsetSize, FtraceFieldType::kInvalidFtraceFieldType,
+ "prev_pid", 13, ProtoSchemaType::kInt32,
+ TranslationStrategy::kInvalidTranslationStrategy},
+ {kUnsetOffset, kUnsetSize, FtraceFieldType::kInvalidFtraceFieldType,
+ "cyc", 14, ProtoSchemaType::kUint32,
+ TranslationStrategy::kInvalidTranslationStrategy},
+ {kUnsetOffset, kUnsetSize, FtraceFieldType::kInvalidFtraceFieldType,
+ "inst", 15, ProtoSchemaType::kUint32,
+ TranslationStrategy::kInvalidTranslationStrategy},
+ {kUnsetOffset, kUnsetSize, FtraceFieldType::kInvalidFtraceFieldType,
+ "stallbm", 16, ProtoSchemaType::kUint32,
+ TranslationStrategy::kInvalidTranslationStrategy},
+ {kUnsetOffset, kUnsetSize, FtraceFieldType::kInvalidFtraceFieldType,
+ "l3dm", 17, ProtoSchemaType::kUint32,
+ TranslationStrategy::kInvalidTranslationStrategy},
+ },
+ kUnsetFtraceId,
+ 487,
+ kUnsetSize},
{"cpu_frequency",
"power",
{
diff --git a/src/traced/probes/ftrace/test/data/synthetic/events/perf_trace_counters/sched_switch_with_ctrs/format b/src/traced/probes/ftrace/test/data/synthetic/events/perf_trace_counters/sched_switch_with_ctrs/format
new file mode 100644
index 0000000..e357f11
--- /dev/null
+++ b/src/traced/probes/ftrace/test/data/synthetic/events/perf_trace_counters/sched_switch_with_ctrs/format
@@ -0,0 +1,16 @@
+name: sched_switch_with_ctrs
+ID: 1237
+format:
+ field:unsigned short common_type; offset:0; size:2; signed:0;
+ field:unsigned char common_flags; offset:2; size:1; signed:0;
+ field:unsigned char common_preempt_count; offset:3; size:1; signed:0;
+ field:int common_pid; offset:4; size:4; signed:1;
+
+ field:char prev_comm[16]; offset:8; size:16; signed:0;
+ field:pid_t prev_pid; offset:24; size:4; signed:1;
+ field:u32 cyc; offset:28; size:4; signed:0;
+ field:u32 inst; offset:32; size:4; signed:0;
+ field:u32 stallbm; offset:36; size:4; signed:0;
+ field:u32 l3dm; offset:40; size:4; signed:0;
+
+print fmt: "prev_comm=%s, prev_pid=%d, CYC=%u, INST=%u, STALLBM=%u, L3DM=%u", REC->prev_comm, REC->prev_pid, REC->cyc, REC->inst, REC->stallbm, REC->l3dm
diff --git a/ui/src/tracks/chrome_critical_user_interactions/index.ts b/ui/src/tracks/chrome_critical_user_interactions/index.ts
index 73e7428..2e0a381 100644
--- a/ui/src/tracks/chrome_critical_user_interactions/index.ts
+++ b/ui/src/tracks/chrome_critical_user_interactions/index.ts
@@ -23,7 +23,6 @@
NAMED_ROW,
NamedSliceTrackTypes,
} from '../../frontend/named_slice_track';
-import {NewTrackArgs, TrackBase} from '../../frontend/track';
import {
Plugin,
PluginContext,
@@ -80,10 +79,6 @@
CustomSqlTableSliceTrack<CriticalUserInteractionSliceTrackTypes> {
static readonly kind = CRITICAL_USER_INTERACTIONS_KIND;
- static create(args: NewTrackArgs): TrackBase {
- return new CriticalUserInteractionTrack(args);
- }
-
getSqlDataSource(): CustomSqlTableDefConfig {
return {
columns: ['scoped_id AS id', 'name', 'ts', 'dur', 'type'],
diff --git a/ui/src/tracks/chrome_scroll_jank/chrome_tasks_scroll_jank_track.ts b/ui/src/tracks/chrome_scroll_jank/chrome_tasks_scroll_jank_track.ts
index 95d1924..5b87694 100644
--- a/ui/src/tracks/chrome_scroll_jank/chrome_tasks_scroll_jank_track.ts
+++ b/ui/src/tracks/chrome_scroll_jank/chrome_tasks_scroll_jank_track.ts
@@ -17,7 +17,7 @@
NamedSliceTrack,
NamedSliceTrackTypes,
} from '../../frontend/named_slice_track';
-import {NewTrackArgs, TrackBase} from '../../frontend/track';
+import {NewTrackArgs} from '../../frontend/track';
import {Engine} from '../../trace_processor/engine';
import {NUM} from '../../trace_processor/query_result';
@@ -35,9 +35,6 @@
export class ChromeTasksScrollJankTrack extends
NamedSliceTrack<ChromeTasksScrollJankTrackTypes> {
static readonly kind = 'org.chromium.ScrollJank.BrowserUIThreadLongTasks';
- static create(args: NewTrackArgs): TrackBase {
- return new ChromeTasksScrollJankTrack(args);
- }
constructor(args: NewTrackArgs) {
super(args);
diff --git a/ui/src/tracks/chrome_scroll_jank/scroll_jank_v3_track.ts b/ui/src/tracks/chrome_scroll_jank/scroll_jank_v3_track.ts
index a5bf0aa..14d296a 100644
--- a/ui/src/tracks/chrome_scroll_jank/scroll_jank_v3_track.ts
+++ b/ui/src/tracks/chrome_scroll_jank/scroll_jank_v3_track.ts
@@ -14,7 +14,7 @@
import {globals} from '../../frontend/globals';
import {NamedRow, NamedSliceTrackTypes} from '../../frontend/named_slice_track';
-import {NewTrackArgs, TrackBase} from '../../frontend/track';
+import {NewTrackArgs} from '../../frontend/track';
import {PrimaryTrackSortKey, Slice} from '../../public';
import {
CustomSqlDetailsPanelConfig,
@@ -38,10 +38,6 @@
CustomSqlTableSliceTrack<NamedSliceTrackTypes> {
static readonly kind = 'org.chromium.ScrollJank.scroll_jank_v3_track';
- static create(args: NewTrackArgs): TrackBase {
- return new ScrollJankV3Track(args);
- }
-
constructor(args: NewTrackArgs) {
super(args);
ScrollJankPluginState.getInstance().registerTrack({
diff --git a/ui/src/tracks/chrome_scroll_jank/scroll_track.ts b/ui/src/tracks/chrome_scroll_jank/scroll_track.ts
index 7eaba65..a888844 100644
--- a/ui/src/tracks/chrome_scroll_jank/scroll_track.ts
+++ b/ui/src/tracks/chrome_scroll_jank/scroll_track.ts
@@ -13,13 +13,14 @@
// limitations under the License.
import {NamedSliceTrackTypes} from '../../frontend/named_slice_track';
-import {NewTrackArgs, TrackBase} from '../../frontend/track';
+import {NewTrackArgs} from '../../frontend/track';
import {PrimaryTrackSortKey} from '../../public';
import {
CustomSqlDetailsPanelConfig,
CustomSqlTableDefConfig,
CustomSqlTableSliceTrack,
} from '../custom_sql_table_slices';
+
import {
SCROLL_JANK_GROUP_ID,
ScrollJankPluginState,
@@ -33,9 +34,6 @@
export class TopLevelScrollTrack extends
CustomSqlTableSliceTrack<NamedSliceTrackTypes> {
public static kind = CHROME_TOPLEVEL_SCROLLS_KIND;
- static create(args: NewTrackArgs): TrackBase {
- return new TopLevelScrollTrack(args);
- }
getSqlDataSource(): CustomSqlTableDefConfig {
return {
diff --git a/ui/src/tracks/cpu_freq/index.ts b/ui/src/tracks/cpu_freq/index.ts
index c42b480..f07f263 100644
--- a/ui/src/tracks/cpu_freq/index.ts
+++ b/ui/src/tracks/cpu_freq/index.ts
@@ -274,10 +274,6 @@
const RECT_HEIGHT = 20;
class CpuFreqTrack extends TrackAdapter<Config, Data> {
- static create(args: NewTrackArgs): CpuFreqTrack {
- return new CpuFreqTrack(args);
- }
-
private mousePos = {x: 0, y: 0};
private hoveredValue: number|undefined = undefined;
private hoveredTs: time|undefined = undefined;
diff --git a/ui/src/tracks/cpu_profile/index.ts b/ui/src/tracks/cpu_profile/index.ts
index 143e057..59ad373 100644
--- a/ui/src/tracks/cpu_profile/index.ts
+++ b/ui/src/tracks/cpu_profile/index.ts
@@ -90,10 +90,6 @@
}
class CpuProfileTrack extends TrackAdapter<Config, Data> {
- static create(args: NewTrackArgs): CpuProfileTrack {
- return new CpuProfileTrack(args);
- }
-
private centerY = this.getHeight() / 2 + BAR_HEIGHT;
private markerWidth = (this.getHeight() - MARGIN_TOP - BAR_HEIGHT) / 2;
private hoveredTs: time|undefined = undefined;
diff --git a/ui/src/tracks/cpu_slices/index.ts b/ui/src/tracks/cpu_slices/index.ts
index 28497a2..0e9c470 100644
--- a/ui/src/tracks/cpu_slices/index.ts
+++ b/ui/src/tracks/cpu_slices/index.ts
@@ -206,10 +206,6 @@
const TRACK_HEIGHT = MARGIN_TOP * 2 + RECT_HEIGHT;
class CpuSliceTrack extends TrackAdapter<Config, Data> {
- static create(args: NewTrackArgs): CpuSliceTrack {
- return new CpuSliceTrack(args);
- }
-
private mousePos?: {x: number, y: number};
private utidHoveredInThisTrack = -1;
diff --git a/ui/src/tracks/null_track/index.ts b/ui/src/tracks/null_track/index.ts
index 1b2bb24..7bc77b5 100644
--- a/ui/src/tracks/null_track/index.ts
+++ b/ui/src/tracks/null_track/index.ts
@@ -28,10 +28,6 @@
super(args);
}
- static create(args: NewTrackArgs): NullTrack {
- return new NullTrack(args);
- }
-
getHeight(): number {
return 30;
}
@@ -50,7 +46,7 @@
uri: NULL_TRACK_URI,
displayName: 'Null Track',
kind: NULL_TRACK_KIND,
- track: ({trackKey}) => NullTrack.create({
+ track: ({trackKey}) => new NullTrack({
engine: ctx.engine,
trackKey,
}),
diff --git a/ui/src/tracks/perf_samples_profile/index.ts b/ui/src/tracks/perf_samples_profile/index.ts
index 5da1f71..dd30045 100644
--- a/ui/src/tracks/perf_samples_profile/index.ts
+++ b/ui/src/tracks/perf_samples_profile/index.ts
@@ -87,10 +87,6 @@
const RECT_HEIGHT = 30.5;
class PerfSamplesProfileTrack extends TrackAdapter<Config, Data> {
- static create(args: NewTrackArgs): PerfSamplesProfileTrack {
- return new PerfSamplesProfileTrack(args);
- }
-
private centerY = this.getHeight() / 2;
private markerWidth = (this.getHeight() - MARGIN_TOP) / 2;
private hoveredTs: time|undefined = undefined;
diff --git a/ui/src/tracks/process_summary/process_scheduling_track.ts b/ui/src/tracks/process_summary/process_scheduling_track.ts
index f7ad4c1..a955278 100644
--- a/ui/src/tracks/process_summary/process_scheduling_track.ts
+++ b/ui/src/tracks/process_summary/process_scheduling_track.ts
@@ -189,10 +189,6 @@
}
export class ProcessSchedulingTrack extends TrackAdapter<Config, Data> {
- static create(args: NewTrackArgs): ProcessSchedulingTrack {
- return new ProcessSchedulingTrack(args);
- }
-
private mousePos?: {x: number, y: number};
private utidHoveredInThisTrack = -1;
diff --git a/ui/src/tracks/process_summary/process_summary_track.ts b/ui/src/tracks/process_summary/process_summary_track.ts
index a1b32c7..ee0bcc8 100644
--- a/ui/src/tracks/process_summary/process_summary_track.ts
+++ b/ui/src/tracks/process_summary/process_summary_track.ts
@@ -142,10 +142,6 @@
const SUMMARY_HEIGHT = TRACK_HEIGHT - MARGIN_TOP;
export class ProcessSummaryTrack extends TrackAdapter<Config, Data> {
- static create(args: NewTrackArgs): ProcessSummaryTrack {
- return new ProcessSummaryTrack(args);
- }
-
constructor(args: NewTrackArgs) {
super(args);
}
diff --git a/ui/src/tracks/screenshots/index.ts b/ui/src/tracks/screenshots/index.ts
index 32df756..4af3c94 100644
--- a/ui/src/tracks/screenshots/index.ts
+++ b/ui/src/tracks/screenshots/index.ts
@@ -16,7 +16,6 @@
import {
NamedSliceTrackTypes,
} from '../../frontend/named_slice_track';
-import {NewTrackArgs, TrackBase} from '../../frontend/track';
import {
Plugin,
PluginContext,
@@ -36,9 +35,6 @@
class ScreenshotsTrack extends CustomSqlTableSliceTrack<NamedSliceTrackTypes> {
static readonly kind = 'dev.perfetto.ScreenshotsTrack';
- static create(args: NewTrackArgs): TrackBase {
- return new ScreenshotsTrack(args);
- }
getSqlDataSource(): CustomSqlTableDefConfig {
return {
diff --git a/ui/src/tracks/thread_state/index.ts b/ui/src/tracks/thread_state/index.ts
index 5882283..7544ddb 100644
--- a/ui/src/tracks/thread_state/index.ts
+++ b/ui/src/tracks/thread_state/index.ts
@@ -179,10 +179,6 @@
const EXCESS_WIDTH = 10;
class ThreadStateTrack extends TrackAdapter<Config, Data> {
- static create(args: NewTrackArgs): ThreadStateTrack {
- return new ThreadStateTrack(args);
- }
-
constructor(args: NewTrackArgs) {
super(args);
}