Skip to content

Commit

Permalink
core(driver): reduce required traceCategories again (#6271)
Browse files Browse the repository at this point in the history
  • Loading branch information
paulirish committed Oct 15, 2018
1 parent c3e15ca commit 94d8e30
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 18 deletions.
34 changes: 25 additions & 9 deletions lighthouse-core/gather/driver.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,22 +82,38 @@ class Driver {

static get traceCategories() {
return [
'-*', // exclude default
'disabled-by-default-lighthouse', // used instead of 'toplevel' in Chrome 71+
// Exclude default categories. We'll be selective to minimize trace size
'-*',

// Used instead of 'toplevel' in Chrome 71+
'disabled-by-default-lighthouse',

// All compile/execute events are captured by parent events in devtools.timeline..
// But the v8 category provides some nice context for only <0.5% of the trace size
'v8',
// Same situation here. This category is there for RunMicrotasks only, but with other teams
// accidentally excluding microtasks, we don't want to assume a parent event will always exist
'v8.execute',
'blink.console',

// For extracting UserTiming marks/measures
'blink.user_timing',
'benchmark',
'loading',
'latencyInfo',

// Not mandatory but not used much
'blink.console',

// Most the events we need come in on these two
'devtools.timeline',
'disabled-by-default-devtools.timeline',
'disabled-by-default-devtools.timeline.frame',

// Up to 450 (https://goo.gl/rBfhn4) JPGs added to the trace
'disabled-by-default-devtools.screenshot',

// This doesn't add its own events, but adds a `stackTrace` property to devtools.timeline events
'disabled-by-default-devtools.timeline.stack',
// Flipped off until bugs.chromium.org/p/v8/issues/detail?id=5820 is fixed in Stable

// CPU sampling profiler data only enabled for debugging purposes
// 'disabled-by-default-v8.cpu_profiler',
// 'disabled-by-default-v8.cpu_profiler.hires',
'disabled-by-default-devtools.screenshot',
];
}

Expand Down
15 changes: 6 additions & 9 deletions lighthouse-core/lib/task-groups.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ const taskGroups = {
label: 'Style & Layout',
traceEventNames: [
'ScheduleStyleRecalculation',
'RecalculateStyles',
'UpdateLayoutTree',
'UpdateLayoutTree', // previously RecalculateStyles
'InvalidateLayout',
'Layout',
],
Expand All @@ -42,15 +41,11 @@ const taskGroups = {
label: 'Rendering',
traceEventNames: [
'Animation',
'RequestMainThreadFrame',
'ActivateLayerTree',
'DrawFrame',
'HitTest',
'PaintSetup',
'Paint',
'PaintImage',
'Rasterize',
'RasterTask',
'RasterTask', // Previously Rasterize
'ScrollLayer',
'UpdateLayer',
'UpdateLayerTree',
Expand Down Expand Up @@ -81,9 +76,11 @@ const taskGroups = {
id: 'garbageCollection',
label: 'Garbage Collection',
traceEventNames: [
'GCEvent',
'MinorGC',
'MinorGC', // Previously GCEvent
'MajorGC',
'BlinkGC.AtomicPhase', // Previously ThreadState::performIdleLazySweep, ThreadState::completeSweep, BlinkGCMarking

// Kept for compatibility on older traces
'ThreadState::performIdleLazySweep',
'ThreadState::completeSweep',
'BlinkGCMarking',
Expand Down

0 comments on commit 94d8e30

Please sign in to comment.