Skip to content

Commit

Permalink
ui: Group all old openTable into Chrometto plugin
Browse files Browse the repository at this point in the history
Change-Id: I9238c747a20992b139ff379cb49df5584c334291
  • Loading branch information
aMayzner committed Dec 9, 2024
1 parent fc9c0d6 commit 56f8a42
Show file tree
Hide file tree
Showing 18 changed files with 287 additions and 449 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ FROM sched_slice;
--
-- The rows in this table which have |state| = 'Running', will have a
-- corresponding row in the |sched_slice| table.
CREATE PERFETTO VIEW thread_state (
CREATE PERFETTO VIEW thread_state(
-- Unique identifier for this thread state.
id ID,
-- The name of the "most-specific" child table containing this row.
Expand Down
1 change: 1 addition & 0 deletions ui/src/core/default_plugins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ export const defaultPlugins = [
'dev.perfetto.TraceMetadata',
'dev.perfetto.VizPage',
'org.chromium.CriticalUserInteraction',
'org.Chromium.OpenTableCommands',
'org.kernel.LinuxKernelSubsystems',
'org.kernel.SuspendResumeLatency',
'org.kernel.Wattson',
Expand Down
14 changes: 0 additions & 14 deletions ui/src/plugins/dev.perfetto.AndroidLog/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,10 @@ import {LogFilteringCriteria, LogPanel} from './logs_panel';
import {ANDROID_LOGS_TRACK_KIND} from '../../public/track_kinds';
import {Trace} from '../../public/trace';
import {PerfettoPlugin} from '../../public/plugin';
import {sqlTableRegistry} from '../../components/widgets/sql/table/sql_table_registry';
import {NUM} from '../../trace_processor/query_result';
import {AndroidLogTrack} from './logs_track';
import {exists} from '../../base/utils';
import {TrackNode} from '../../public/workspace';
import {getAndroidLogsTable} from './table';
import {extensions} from '../../components/extensions';

const VERSION = 1;

Expand Down Expand Up @@ -97,16 +94,5 @@ export default class implements PerfettoPlugin {
ctx.tabs.showTab(androidLogsTabUri);
},
});

sqlTableRegistry['android_logs'] = getAndroidLogsTable();
ctx.commands.registerCommand({
id: 'perfetto.ShowTable.android_logs',
name: 'Open table: android_logs',
callback: () => {
extensions.addSqlTableTab(ctx, {
table: getAndroidLogsTable(),
});
},
});
}
}
45 changes: 0 additions & 45 deletions ui/src/plugins/dev.perfetto.AndroidLog/table.ts

This file was deleted.

15 changes: 0 additions & 15 deletions ui/src/plugins/dev.perfetto.AsyncSlices/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@ import {AsyncSliceTrack} from './async_slice_track';
import {exists} from '../../base/utils';
import {assertExists, assertTrue} from '../../base/logging';
import {SliceSelectionAggregator} from './slice_selection_aggregator';
import {sqlTableRegistry} from '../../components/widgets/sql/table/sql_table_registry';
import {getSliceTable} from './table';
import {extensions} from '../../components/extensions';
import ProcessThreadGroupsPlugin from '../dev.perfetto.ProcessThreadGroups';

export default class implements PerfettoPlugin {
Expand Down Expand Up @@ -74,18 +71,6 @@ export default class implements PerfettoPlugin {
ctx.selection.registerAreaSelectionAggregator(
new SliceSelectionAggregator(),
);

sqlTableRegistry['slice'] = getSliceTable();

ctx.commands.registerCommand({
id: 'perfetto.ShowTable.slice',
name: 'Open table: slice',
callback: () => {
extensions.addSqlTableTab(ctx, {
table: getSliceTable(),
});
},
});
}

async addGlobalAsyncTracks(
Expand Down
52 changes: 0 additions & 52 deletions ui/src/plugins/dev.perfetto.AsyncSlices/table.ts

This file was deleted.

35 changes: 0 additions & 35 deletions ui/src/plugins/dev.perfetto.Process/index.ts

This file was deleted.

41 changes: 0 additions & 41 deletions ui/src/plugins/dev.perfetto.Process/table.ts

This file was deleted.

14 changes: 0 additions & 14 deletions ui/src/plugins/dev.perfetto.Sched/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.

import {sqlTableRegistry} from '../../components/widgets/sql/table/sql_table_registry';
import {TrackNode} from '../../public/workspace';
import {Trace} from '../../public/trace';
import {PerfettoPlugin} from '../../public/plugin';
Expand All @@ -21,8 +20,6 @@ import {
RunnableThreadCountTrack,
UninterruptibleSleepThreadCountTrack,
} from './thread_count';
import {getSchedTable} from './table';
import {extensions} from '../../components/extensions';

export default class implements PerfettoPlugin {
static readonly id = 'dev.perfetto.Sched';
Expand Down Expand Up @@ -88,17 +85,6 @@ export default class implements PerfettoPlugin {
callback: () => addPinnedTrack(ctx, uri, title),
});
}

sqlTableRegistry['sched'] = getSchedTable();
ctx.commands.registerCommand({
id: 'perfetto.ShowTable.sched',
name: 'Open table: sched',
callback: () => {
extensions.addSqlTableTab(ctx, {
table: getSchedTable(),
});
},
});
}
}

Expand Down
55 changes: 0 additions & 55 deletions ui/src/plugins/dev.perfetto.Sched/table.ts

This file was deleted.

13 changes: 0 additions & 13 deletions ui/src/plugins/dev.perfetto.Thread/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.

import {sqlTableRegistry} from '../../components/widgets/sql/table/sql_table_registry';
import {Trace} from '../../public/trace';
import {PerfettoPlugin} from '../../public/plugin';
import {getThreadTable} from './table';
import {extensions} from '../../components/extensions';
import {ThreadDesc, ThreadMap} from '../dev.perfetto.Thread/threads';
import {NUM, NUM_NULL, STR, STR_NULL} from '../../trace_processor/query_result';
import {assertExists} from '../../base/logging';
Expand Down Expand Up @@ -61,16 +58,6 @@ export default class implements PerfettoPlugin {
private threads?: ThreadMap;

async onTraceLoad(ctx: Trace) {
sqlTableRegistry['thread'] = getThreadTable();
ctx.commands.registerCommand({
id: 'perfetto.ShowTable.thread',
name: 'Open table: thread',
callback: () => {
extensions.addSqlTableTab(ctx, {
table: getThreadTable(),
});
},
});
this.threads = await listThreads(ctx);
}

Expand Down
Loading

0 comments on commit 56f8a42

Please sign in to comment.