• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (C) 2022 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 *     http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16import { TabPaneCurrentSelection } from '../sheet/TabPaneCurrentSelection.js';
17import { TabPaneFreq } from '../sheet/freq/TabPaneFreq.js';
18import { TabPaneCpuByThread } from '../sheet/cpu/TabPaneCpuByThread.js';
19import { SelectionParam } from '../../../bean/BoxSelection.js';
20import { TabPaneCpuByProcess } from '../sheet/cpu/TabPaneCpuByProcess.js';
21import { TabPaneCpuUsage } from '../sheet/cpu/TabPaneCpuUsage.js';
22import { TabPaneSPT } from '../sheet/cpu/TabPaneSPT.js';
23import { TabPanePTS } from '../sheet/cpu/TabPanePTS.js';
24import { TabPaneSlices } from '../sheet/process/TabPaneSlices.js';
25import { TabPaneCounter } from '../sheet/process/TabPaneCounter.js';
26import { TabPaneFps } from '../sheet/fps/TabPaneFps.js';
27import { TabPaneFlag } from '../timer-shaft/TabPaneFlag.js';
28import { TabPaneBoxChild } from '../sheet/cpu/TabPaneBoxChild.js';
29import { TabPaneNMStatstics } from '../sheet/native-memory/TabPaneNMStatstics.js';
30import { TabPaneNMemory } from '../sheet/native-memory/TabPaneNMemory.js';
31import { TabPaneNMSampleList } from '../sheet/native-memory/TabPaneNMSampleList.js';
32import { TabpanePerfProfile } from '../sheet/hiperf/TabPerfProfile.js';
33import { TabPanePerfSample } from '../sheet/hiperf/TabPerfSampleList.js';
34import { TabPaneLiveProcesses } from '../sheet/ability/TabPaneLiveProcesses.js';
35import { TabPaneHistoryProcesses } from '../sheet/ability/TabPaneHistoryProcesses.js';
36import { TabPaneCpuAbility } from '../sheet/ability/TabPaneCpuAbility.js';
37import { TabPaneMemoryAbility } from '../sheet/ability/TabPaneMemoryAbility.js';
38import { TabPaneDiskAbility } from '../sheet/ability/TabPaneDiskAbility.js';
39import { TabPaneNetworkAbility } from '../sheet/ability/TabPaneNetworkAbility.js';
40import { TabPaneFileStatistics } from '../sheet/file-system/TabPaneFilesystemStatistics.js';
41import { TabpaneFilesystemCalltree } from '../sheet/file-system/TabPaneFileSystemCalltree.js';
42import { TabPaneFileSystemEvents } from '../sheet/file-system/TabPaneFileSystemEvents.js';
43import { TabPaneFileSystemDescHistory } from '../sheet/file-system/TabPaneFileSystemDescHistory.js';
44import { TabPaneFileSystemDescTimeSlice } from '../sheet/file-system/TabPaneFileSystemDescTimeSlice.js';
45import { TabPaneSdkSlice } from '../sheet/sdk/TabPaneSdkSlice.js';
46import { TabPaneSdkCounter } from '../sheet/sdk/TabPaneSdkCounter.js';
47import { TabPaneCounterSample } from '../sheet/cpu/TabPaneCounterSample.js';
48import { TabPaneThreadStates } from '../sheet/process/TabPaneThreadStates.js';
49import { TabPaneThreadUsage } from '../sheet/process/TabPaneThreadUsage.js';
50import { TabPaneFrequencySample } from '../sheet/cpu/TabPaneFrequencySample.js';
51import { TabPaneEnergyAnomaly } from '../sheet/energy/TabPaneEnergyAnomaly.js';
52import { TabPaneSystemDetails } from '../sheet/energy/TabPaneSystemDetails.js';
53import { TabPanePowerDetails } from '../sheet/energy/TabPanePowerDetails.js';
54import { TabPanePowerBattery } from '../sheet/energy/TabPanePowerBattery.js';
55import { TabPaneCpuStateClick } from '../sheet/cpu/TabPaneCpuStateClick.js';
56import { TabPaneVirtualMemoryStatistics } from '../sheet/file-system/TabPaneVirtualMemoryStatistics.js';
57import { TabPaneIOTierStatistics } from '../sheet/file-system/TabPaneIOTierStatistics.js';
58import { TabPaneIOCallTree, TabPaneVMCallTree } from '../sheet/file-system/TabPaneIOCallTree.js';
59import { TabPaneIoCompletionTimes } from '../sheet/file-system/TabPaneIoCompletionTimes.js';
60import { TabPaneVirtualMemoryEvents } from '../sheet/file-system/TabPaneVMEvents.js';
61import { TabPaneSmapsStatistics } from '../sheet/smaps/TabPaneSmapsStatistics.js';
62import { TabPaneSmapsRecord } from '../sheet/smaps/TabPaneSmapsRecord.js';
63import { TabPaneFreqLimit } from '../sheet/freq/TabPaneFreqLimit.js';
64import { TabPaneCpuFreqLimits } from '../sheet/freq/TabPaneCpuFreqLimits.js';
65import { TabpaneNMCalltree } from '../sheet/native-memory/TabPaneNMCallTree.js';
66import { TabPaneClockCounter } from '../sheet/clock/TabPaneClockCounter.js';
67import { TabPaneIrqCounter } from '../sheet/irq/TabPaneIrqCounter.js';
68import { TabPaneFrames } from '../sheet/jank/TabPaneFrames.js';
69import { TabPaneSummary } from '../sheet/snapshot/TabPaneSummary.js';
70import { TabPaneComparison } from '../sheet/snapshot/TabPaneComparison.js';
71import { TabPanePerfAnalysis } from '../sheet/hiperf/TabPanePerfAnalysis.js';
72import { TabPaneNMStatisticAnalysis } from '../sheet/native-memory/TabPaneNMStatisticAnalysis.js';
73import { TabPaneFilesystemStatisticsAnalysis } from '../sheet/file-system/TabPaneFilesystemStatisticsAnalysis.js';
74import { TabPaneIOTierStatisticsAnalysis } from '../sheet/file-system/TabPaneIOTierStatisticsAnalysis.js';
75import { TabPaneVirtualMemoryStatisticsAnalysis } from '../sheet/file-system/TabPaneVirtualMemoryStatisticsAnalysis.js';
76import { TabPaneCurrent } from '../sheet/TabPaneCurrent.js';
77import { TabPaneStartup } from '../sheet/process/TabPaneStartup.js';
78import { TabPaneStaticInit } from '../sheet/process/TabPaneStaticInit.js';
79import { TabPaneTaskFrames } from '../sheet/task/TabPaneTaskFrames.js';
80
81export let tabConfig: any = {
82  'tabpane-current': {
83    title: 'Current Selection',
84    type: TabPaneCurrent,
85    require: (param: SelectionParam) => param.isCurrentPane,
86  }, //current selection
87  'current-selection': {
88    title: 'Current Selection',
89    type: TabPaneCurrentSelection,
90  }, //cpu data click
91  'cpu-state-click': {
92    title: 'Cpu State',
93    type: TabPaneCpuStateClick,
94  },
95  'box-freq': {
96    title: 'Frequency',
97    type: TabPaneFreq,
98  }, //freq data click
99  'box-freq-limit': {
100    title: 'Frequency Limits',
101    type: TabPaneFreqLimit,
102  },
103  'box-cpu-freq-limit': {
104    title: 'Cpu Frequency Limits',
105    type: TabPaneCpuFreqLimits,
106    require: (param: SelectionParam) => param.cpuFreqLimitDatas.length > 0,
107  },
108  'box-cpu-thread': {
109    title: 'CPU by thread',
110    type: TabPaneCpuByThread,
111    require: (param: SelectionParam) => param.cpus.length > 0,
112  }, //range select
113  'box-cpu-process': {
114    title: 'CPU by process',
115    type: TabPaneCpuByProcess,
116    require: (param: SelectionParam) => param.cpus.length > 0,
117  },
118  'box-cpu-usage': {
119    title: 'CPU Usage',
120    type: TabPaneCpuUsage,
121    require: (param: SelectionParam) => param.cpus.length > 0,
122  },
123  'box-spt': {
124    title: 'Thread Switches',
125    type: TabPaneSPT,
126    require: (param: SelectionParam) => param.cpus.length > 0,
127  },
128  'box-pts': {
129    title: 'Thread States',
130    type: TabPanePTS,
131    require: (param: SelectionParam) => param.cpus.length > 0,
132  },
133  'box-thread-states': {
134    title: 'Thread States',
135    type: TabPaneThreadStates,
136    require: (param: SelectionParam) => param.threadIds.length > 0,
137  },
138  'box-process-startup': {
139    title: 'App Startups',
140    type: TabPaneStartup,
141    require: (param: SelectionParam) => param.processIds.length > 0 && param.startup,
142  },
143  'box-process-static-init': {
144    title: 'Static Initialization',
145    type: TabPaneStaticInit,
146    require: (param: SelectionParam) => param.processIds.length > 0 && param.staticInit,
147  },
148  'box-thread-usage': {
149    title: 'Thread Usage',
150    type: TabPaneThreadUsage,
151    require: (param: SelectionParam) => param.threadIds.length > 0,
152  },
153  'box-slices': {
154    title: 'Slices',
155    type: TabPaneSlices,
156    require: (param: SelectionParam) => param.funTids.length > 0 || param.funAsync.length > 0,
157  },
158  'box-counters': {
159    title: 'Counters',
160    type: TabPaneCounter,
161    require: (param: SelectionParam) => param.processTrackIds.length > 0 || param.virtualTrackIds.length > 0,
162  },
163  'box-clock-counters': {
164    title: 'Clock Counters',
165    type: TabPaneClockCounter,
166    require: (param: SelectionParam) => param.clockMapData.size > 0,
167  },
168  'box-irq-counters': {
169    title: 'Irq Counters',
170    type: TabPaneIrqCounter,
171    require: (param: SelectionParam) => param.irqMapData.size > 0,
172  },
173  'box-fps': {
174    title: 'FPS',
175    type: TabPaneFps,
176    require: (param: SelectionParam) => param.hasFps,
177  },
178  'box-flag': {
179    title: 'Current Selection',
180    type: TabPaneFlag,
181  },
182  'box-cpu-child': {
183    title: '',
184    type: TabPaneBoxChild,
185  },
186  'box-native-statstics': {
187    title: 'Statistics',
188    type: TabPaneNMStatstics,
189    require: (param: SelectionParam) => param.nativeMemory.length > 0,
190  },
191  'box-native-statistic-analysis': {
192    title: 'Analysis',
193    type: TabPaneNMStatisticAnalysis,
194    require: (param: SelectionParam) => param.nativeMemory.length > 0 || param.nativeMemoryStatistic.length > 0,
195  },
196  'box-native-calltree': {
197    title: 'Call Info',
198    type: TabpaneNMCalltree,
199    require: (param: SelectionParam) => param.nativeMemory.length > 0 || param.nativeMemoryStatistic.length > 0,
200  },
201  'box-native-memory': {
202    title: 'Native Memory',
203    type: TabPaneNMemory,
204    require: (param: SelectionParam) => param.nativeMemory.length > 0,
205  },
206  'box-native-sample': {
207    title: 'Snapshot List',
208    type: TabPaneNMSampleList,
209    require: (param: SelectionParam) => param.nativeMemory.length > 0,
210  },
211  'box-perf-analysis': {
212    title: 'Analysis',
213    type: TabPanePerfAnalysis,
214    require: (param: SelectionParam) => param.perfSampleIds.length > 0,
215  },
216  'box-perf-profile': {
217    title: 'Perf Profile',
218    type: TabpanePerfProfile,
219    require: (param: SelectionParam) => param.perfSampleIds.length > 0,
220  },
221  'box-perf-sample': {
222    title: 'Sample List',
223    type: TabPanePerfSample,
224    require: (param: SelectionParam) => param.perfSampleIds.length > 0,
225  },
226  'box-live-processes-child': {
227    title: 'Live Processes',
228    type: TabPaneLiveProcesses,
229    require: (param: SelectionParam) =>
230      param.cpuAbilityIds.length > 0 ||
231      (param.memoryAbilityIds.length > 0 && param.diskAbilityIds.length > 0) ||
232      param.networkAbilityIds.length > 0,
233  },
234  'box-history-processes-child': {
235    title: 'Processes History',
236    type: TabPaneHistoryProcesses,
237    require: (param: SelectionParam) =>
238      param.cpuAbilityIds.length > 0 ||
239      param.memoryAbilityIds.length > 0 ||
240      param.diskAbilityIds.length > 0 ||
241      param.networkAbilityIds.length > 0,
242  },
243  'box-system-cpu-child': {
244    title: 'System CPU Summary',
245    type: TabPaneCpuAbility,
246    require: (param: SelectionParam) => param.cpuAbilityIds.length > 0,
247  },
248  'box-system-memory-child': {
249    title: 'System Memory Summary',
250    type: TabPaneMemoryAbility,
251    require: (param: SelectionParam) => param.memoryAbilityIds.length > 0,
252  },
253  'box-system-diskIo-child': {
254    title: 'System Disk Summary',
255    type: TabPaneDiskAbility,
256    require: (param: SelectionParam) => param.diskAbilityIds.length > 0,
257  },
258  'box-system-network-child': {
259    title: 'System Network Summary',
260    type: TabPaneNetworkAbility,
261    require: (param: SelectionParam) => param.networkAbilityIds.length > 0,
262  },
263  'box-sdk-slice-child': {
264    title: 'Sdk Slice',
265    type: TabPaneSdkSlice,
266    require: (param: SelectionParam) => param.sdkSliceIds.length > 0,
267  },
268  'box-system-counter-child': {
269    title: 'SDK Counter',
270    type: TabPaneSdkCounter,
271    require: (param: SelectionParam) => param.sdkCounterIds.length > 0,
272  },
273  'box-counter-sample': {
274    title: 'Cpu State',
275    type: TabPaneCounterSample,
276    require: (param: SelectionParam) => param.cpuStateFilterIds.length > 0,
277  },
278
279  'box-frequency-sample': {
280    title: 'Cpu Frequency',
281    type: TabPaneFrequencySample,
282    require: (param: SelectionParam) => param.cpuFreqFilterIds.length > 0,
283  },
284  'box-anomaly-details': {
285    title: 'Anomaly details',
286    type: TabPaneEnergyAnomaly,
287    require: (param: SelectionParam) => param.anomalyEnergy.length > 0,
288  },
289  'box-system-details': {
290    title: 'System Details',
291    type: TabPaneSystemDetails,
292    require: (param: SelectionParam) => param.systemEnergy.length > 0,
293  },
294  'box-power-battery': {
295    title: 'Power Battery',
296    type: TabPanePowerBattery,
297    require: (param: SelectionParam) => param.powerEnergy.length > 0,
298  },
299  'box-power-details': {
300    title: 'Power Details',
301    type: TabPanePowerDetails,
302    require: (param: SelectionParam) => param.powerEnergy.length > 0,
303  },
304  'box-file-system-statistics': {
305    title: 'Filesystem statistics',
306    type: TabPaneFileStatistics,
307    require: (param: SelectionParam) => param.fileSystemType.length > 0,
308  },
309  'box-file-system-statistics-analysis': {
310    title: 'Analysis',
311    type: TabPaneFilesystemStatisticsAnalysis,
312    require: (param: SelectionParam) => param.fileSystemType.length > 0,
313  },
314  'box-file-system-calltree': {
315    title: 'Filesystem Calltree',
316    type: TabpaneFilesystemCalltree,
317    require: (param: SelectionParam) => param.fileSystemType.length > 0 || param.fsCount > 0,
318  },
319  'box-file-system-event': {
320    title: 'Filesystem Events',
321    type: TabPaneFileSystemEvents,
322    require: (param: SelectionParam) => param.fileSystemType.length > 0,
323  },
324  'box-file-system-desc-history': {
325    title: 'File Descriptor History',
326    type: TabPaneFileSystemDescHistory,
327    require: (param: SelectionParam) => param.fileSystemType.length > 0,
328  },
329  'box-file-system-desc-time-slice': {
330    title: 'File Descriptor Time Slice',
331    type: TabPaneFileSystemDescTimeSlice,
332    require: (param: SelectionParam) => param.fileSystemType.length > 0,
333  },
334  'box-virtual-memory-statistics': {
335    title: 'Page Fault Statistics',
336    type: TabPaneVirtualMemoryStatistics,
337    require: (param: SelectionParam) => param.fileSysVirtualMemory,
338  },
339  'box-virtual-memory-statistics-analysis': {
340    title: 'Analysis',
341    type: TabPaneVirtualMemoryStatisticsAnalysis,
342    require: (param: SelectionParam) => param.fileSysVirtualMemory,
343  },
344  'box-vm-calltree': {
345    title: 'Page Fault CallTree',
346    type: TabPaneVMCallTree,
347    require: (param: SelectionParam) => param.fileSysVirtualMemory || param.vmCount > 0,
348  },
349  'box-vm-events': {
350    title: 'Page Fault Events',
351    type: TabPaneVirtualMemoryEvents,
352    require: (param: SelectionParam) => param.fileSysVirtualMemory,
353  },
354  'box-io-tier-statistics': {
355    title: 'Disk I/O Tier Statistics',
356    type: TabPaneIOTierStatistics,
357    require: (param: SelectionParam) => param.diskIOLatency,
358  },
359  'box-io-tier-statistics-analysis': {
360    title: 'Analysis',
361    type: TabPaneIOTierStatisticsAnalysis,
362    require: (param: SelectionParam) => param.diskIOLatency,
363  },
364  'box-io-calltree': {
365    title: 'Disk I/O Latency Calltree',
366    type: TabPaneIOCallTree,
367    require: (param: SelectionParam) => param.diskIOLatency || param.diskIOipids.length > 0,
368  },
369  'box-io-events': {
370    title: 'Trace Completion Times',
371    type: TabPaneIoCompletionTimes,
372    require: (param: SelectionParam) => param.diskIOLatency,
373  },
374  'box-smaps-statistics': {
375    title: 'VM Tracker Statistics',
376    type: TabPaneSmapsStatistics,
377    require: (param: SelectionParam) => param.smapsType.length > 0,
378  },
379  'box-smaps-record': {
380    title: 'VM Tracker Record List',
381    type: TabPaneSmapsRecord,
382    require: (param: SelectionParam) => param.smapsType.length > 0,
383  },
384  'box-frames': {
385    title: 'Frames',
386    type: TabPaneFrames,
387    require: (param: SelectionParam) => param.jankFramesData.length > 0,
388  },
389  'box-heap-summary': {
390    title: 'Summary',
391    type: TabPaneSummary,
392    require: (param: SelectionParam) => param.jsMemory.length > 0,
393  },
394  'box-heap-comparison': {
395    title: 'Comparison',
396    type: TabPaneComparison,
397  }, // snapshot data click
398  'box-task-frames': {
399    title: 'Frames',
400    type: TabPaneTaskFrames,
401    require: (param: SelectionParam) => param.taskFramesData.length > 0,
402  },
403};
404