@parca/profile 0.17.3 → 0.17.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,14 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [0.17.5](https://github.com/parca-dev/parca/compare/@parca/profile@0.17.4...@parca/profile@0.17.5) (2025-06-03)
7
+
8
+ **Note:** Version bump only for package @parca/profile
9
+
10
+ ## [0.17.4](https://github.com/parca-dev/parca/compare/@parca/profile@0.17.3...@parca/profile@0.17.4) (2025-06-02)
11
+
12
+ **Note:** Version bump only for package @parca/profile
13
+
6
14
  ## [0.17.3](https://github.com/parca-dev/parca/compare/@parca/profile@0.17.2...@parca/profile@0.17.3) (2025-05-30)
7
15
 
8
16
  **Note:** Version bump only for package @parca/profile
@@ -1 +1 @@
1
- {"version":3,"file":"IcicleGraphNodes.d.ts","sourceRoot":"","sources":["../../../src/ProfileIcicleGraph/IcicleGraphArrow/IcicleGraphNodes.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAgB,MAAM,OAAO,CAAC;AAErC,OAAO,EAAC,KAAK,EAAC,MAAM,cAAc,CAAC;AAMnC,OAAO,yCAAyC,CAAC;AAIjD,OAAO,EAAC,aAAa,EAAC,MAAM,qBAAqB,CAAC;AAgBlD,eAAO,MAAM,SAAS,KAAK,CAAC;AAE5B,MAAM,WAAW,aAAa;IAC5B,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC;IAClB,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,aAAa,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EA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C;IACtB,QAAQ,EAAE,OAAO,CAAC;IAClB,WAAW,EAAE,OAAO,CAAC;IACrB,aAAa,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,EAAE,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1D,oBAAoB,EAAE,MAAM,CAAC;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,aAAa,EAAE,OAAO,CAAC;IACvB,aAAa,EAAE,aAAa,CAAC;IAG7B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC;CACnD;AAED,eAAO,MAAM,gBAAgB;;;CAG5B,CAAC;AACF,eAAO,MAAM,qBAAqB;;;;CAIjC,CAAC;AAEF,eAAO,MAAM,UAAU,6CAiLrB,CAAC"}
@@ -47,7 +47,9 @@ export const IcicleNode = React.memo(function IcicleNodeNoMemo({ table, row, col
47
47
  const diff = diffColumn?.get(row) !== null ? BigInt(diffColumn?.get(row)) : null;
48
48
  const filename = arrowToString(filenameColumn?.get(row));
49
49
  const depth = depthColumn?.get(row) ?? 0;
50
- const valueOffset = valueOffsetColumn?.get(row) !== null ? BigInt(valueOffsetColumn?.get(row)) : 0n;
50
+ const valueOffset = valueOffsetColumn?.get(row) !== null && valueOffsetColumn?.get(row) !== undefined
51
+ ? BigInt(valueOffsetColumn?.get(row))
52
+ : 0n;
51
53
  const colorAttribute = colorBy === 'filename' ? filename : colorBy === 'binary' ? mappingFile : null;
52
54
  const colorsMap = colors;
53
55
  const hoveringName = hoveringRow !== undefined ? arrowToString(functionNameColumn?.get(hoveringRow)) : '';
@@ -70,7 +72,10 @@ export const IcicleNode = React.memo(function IcicleNodeNoMemo({ table, row, col
70
72
  }
71
73
  return { isHighlightEnabled: true, isHighlighted: isSearchMatch(searchString, name) };
72
74
  }, [searchString, name]);
73
- const selectionOffset = valueOffsetColumn?.get(selectedRow) !== null ? BigInt(valueOffsetColumn?.get(selectedRow)) : 0n;
75
+ const selectionOffset = valueOffsetColumn?.get(selectedRow) !== null &&
76
+ valueOffsetColumn?.get(selectedRow) !== undefined
77
+ ? BigInt(valueOffsetColumn?.get(selectedRow))
78
+ : 0n;
74
79
  const selectionCumulative = cumulativeColumn?.get(selectedRow) !== null ? BigInt(cumulativeColumn?.get(selectedRow)) : 0n;
75
80
  if (valueOffset + cumulative <= selectionOffset ||
76
81
  valueOffset >= selectionOffset + selectionCumulative) {
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
2
  import { FlamegraphArrow } from '@parca/client';
3
+ import { ProfileType } from '@parca/parser';
3
4
  import { type ColorConfig } from '@parca/utilities';
4
5
  import { ProfileSource } from '../../ProfileSource';
5
6
  import { colorByColors } from './IcicleGraphNodes';
@@ -29,6 +30,7 @@ interface IcicleGraphArrowProps {
29
30
  arrow: FlamegraphArrow;
30
31
  total: bigint;
31
32
  filtered: bigint;
33
+ profileType?: ProfileType;
32
34
  profileSource: ProfileSource;
33
35
  width?: number;
34
36
  curPath: CurrentPathFrame[];
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ProfileIcicleGraph/IcicleGraphArrow/index.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAqD,MAAM,OAAO,CAAC;AAK1E,OAAO,EAAC,eAAe,EAAC,MAAM,eAAe,CAAC;AAI9C,OAAO,EAAc,KAAK,WAAW,EAAC,MAAM,kBAAkB,CAAC;AAE/D,OAAO,EAAC,aAAa,EAAC,MAAM,qBAAqB,CAAC;AAGlD,OAAO,EAAwB,aAAa,EAAC,MAAM,oBAAoB,CAAC;AAIxE,OAAO,EACL,gBAAgB,EAMjB,MAAM,SAAS,CAAC;AAEjB,eAAO,MAAM,iBAAiB,gBAAgB,CAAC;AAC/C,eAAO,MAAM,kBAAkB,iBAAiB,CAAC;AACjD,eAAO,MAAM,sBAAsB,qBAAqB,CAAC;AACzD,eA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,SAAS,CAAC;AACjC,eAAO,MAAM,UAAU,SAAS,CAAC;AACjC,eAAO,MAAM,YAAY,WAAW,CAAC;AACrC,eAAO,MAAM,WAAW,UAAU,CAAC;AACnC,eAAO,MAAM,kBAAkB,iBAAiB,CAAC;AAEjD,UAAU,qBAAqB;IAC7B,KAAK,EAAE,eAAe,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,aAAa,EAAE,aAAa,CAAC;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,gBAAgB,EAAE,CAAC;IAC5B,UAAU,EAAE,CAAC,IAAI,EAAE,gBAAgB,EAAE,KAAK,IAAI,CAAC;IAC/C,YAAY,EAAE,OAAO,CAAC;IACtB,wBAAwB,EAAE,MAAM,EAAE,CAAC;IACnC,eAAe,EAAE,OAAO,CAAC;IACzB,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED,eAAO,MAAM,gBAAgB,iBACb,MAAM,EAAE,cACV,OAAO,uBACE,WAAW,KAC/B,aAQF,CAAC;AAEF,eAAO,MAAM,iBAAiB,kBACb,MAAM,EAAE,cACX,OAAO,uBACE,WAAW,KAC/B,aAQF,CAAC;AAeF,eAAO,MAAM,gBAAgB,mDA8N3B,CAAC;AAEH,eAAe,gBAAgB,CAAC"}
@@ -63,7 +63,18 @@ export const getFilenameColors = (filenamesList, isDarkMode, currentColorProfile
63
63
  return colors;
64
64
  };
65
65
  const noop = () => { };
66
- export const IcicleGraphArrow = memo(function IcicleGraphArrow({ arrow, total, filtered, width, setCurPath, curPath, profileSource, mappingsListFromMetadata, compareAbsolute, isIcicleChart = false, }) {
66
+ function getMaxDepth(depthColumn) {
67
+ if (depthColumn === null)
68
+ return 0;
69
+ let max = 0;
70
+ for (const val of depthColumn) {
71
+ const numVal = Number(val);
72
+ if (numVal > max)
73
+ max = numVal;
74
+ }
75
+ return max;
76
+ }
77
+ export const IcicleGraphArrow = memo(function IcicleGraphArrow({ arrow, total, filtered, width, setCurPath, curPath, profileType, profileSource, mappingsListFromMetadata, compareAbsolute, isIcicleChart = false, }) {
67
78
  const [highlightSimilarStacksPreference] = useUserPreference(USER_PREFERENCES.HIGHLIGHT_SIMILAR_STACKS.key);
68
79
  const [hoveringRow, setHoveringRow] = useState(undefined);
69
80
  const [dockedMetainfo] = useUserPreference(USER_PREFERENCES.GRAPH_METAINFO_DOCKED.key);
@@ -155,7 +166,7 @@ export const IcicleGraphArrow = memo(function IcicleGraphArrow({ arrow, total, f
155
166
  setCurPath(path);
156
167
  };
157
168
  const depthColumn = table.getChild(FIELD_DEPTH);
158
- const maxDepth = depthColumn === null ? 0 : Math.max(...depthColumn.toArray());
169
+ const maxDepth = getMaxDepth(depthColumn);
159
170
  const height = maxDepth * RowHeight;
160
171
  // To find the selected row, we must walk the current path and look at which
161
172
  // children of the current frame matches the path element exactly. Until the
@@ -181,7 +192,7 @@ export const IcicleGraphArrow = memo(function IcicleGraphArrow({ arrow, total, f
181
192
  currentRow = childRows[0];
182
193
  }
183
194
  const selectedRow = currentRow;
184
- return (_jsx(TooltipProvider, { table: table, total: total, totalUnfiltered: total + filtered, unit: arrow.unit, compareAbsolute: compareAbsolute, children: _jsxs("div", { className: "relative", children: [_jsx(ContextMenuWrapper, { ref: contextMenuRef, menuId: MENU_ID, table: table, total: total, totalUnfiltered: total + filtered, compareAbsolute: compareAbsolute, resetPath: () => setCurPath([]), hideMenu: hideAll, hideBinary: hideBinary, unit: arrow.unit }), _jsx(MemoizedTooltip, { contextElement: svg.current, dockedMetainfo: dockedMetainfo }), _jsx("svg", { className: "font-robotoMono", width: width, height: height, preserveAspectRatio: "xMinYMid", ref: svg, children: Array.from({ length: table.numRows }, (_, row) => (_jsx(IcicleNode, { table: table, row: row, colors: colorByColors, colorBy: colorByValue, totalWidth: width ?? 1, height: RowHeight, searchString: currentSearchString ?? '', darkMode: isDarkMode, compareMode: compareMode, colorForSimilarNodes: colorForSimilarNodes, selectedRow: selectedRow, onClick: () => {
195
+ return (_jsx(TooltipProvider, { table: table, total: total, totalUnfiltered: total + filtered, profileType: profileType, unit: arrow.unit, compareAbsolute: compareAbsolute, children: _jsxs("div", { className: "relative", children: [_jsx(ContextMenuWrapper, { ref: contextMenuRef, menuId: MENU_ID, table: table, total: total, totalUnfiltered: total + filtered, compareAbsolute: compareAbsolute, resetPath: () => setCurPath([]), hideMenu: hideAll, hideBinary: hideBinary, unit: arrow.unit, profileType: profileType }), _jsx(MemoizedTooltip, { contextElement: svg.current, dockedMetainfo: dockedMetainfo }), _jsx("svg", { className: "font-robotoMono", width: width, height: height, preserveAspectRatio: "xMinYMid", ref: svg, children: Array.from({ length: table.numRows }, (_, row) => (_jsx(IcicleNode, { table: table, row: row, colors: colorByColors, colorBy: colorByValue, totalWidth: width ?? 1, height: RowHeight, searchString: currentSearchString ?? '', darkMode: isDarkMode, compareMode: compareMode, colorForSimilarNodes: colorForSimilarNodes, selectedRow: selectedRow, onClick: () => {
185
196
  if (isIcicleChart) {
186
197
  // We don't want to expand in icicle charts.
187
198
  return;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ProfileIcicleGraph/index.tsx"],"names":[],"mappings":"AAaA,OAAO,KAA2D,MAAM,OAAO,CAAC;AAKhF,OAAO,EAAC,eAAe,EAAC,MAAM,eAAe,CAAC;AAE9C,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,CAAC;AAG1C,OAAO,EAAC,mBAAmB,EAAE,aAAa,EAAC,MAAM,kBAAkB,CAAC;AAMpE,OAAO,EAAC,gBAAgB,EAA0B,MAAM,0BAA0B,CAAC;AAInF,MAAM,MAAM,aAAa,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;AAEpE,UAAU,uBAAuB;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,eAAe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M,EAAE,MAAM,KAAK,IAAI,CAAC;AAEpE,UAAU,uBAAuB;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,aAAa,EAAE,aAAa,CAAC;IAC7B,YAAY,EAAE,gBAAgB,EAAE,GAAG,EAAE,CAAC;IACtC,kBAAkB,EAAE,CAAC,IAAI,EAAE,gBAAgB,EAAE,KAAK,IAAI,CAAC;IACvD,OAAO,EAAE,OAAO,CAAC;IACjB,gBAAgB,CAAC,EAAE,CAAC,OAAO,EAAE,KAAK,CAAC,GAAG,CAAC,OAAO,KAAK,IAAI,CAAC;IACxD,KAAK,CAAC,EAAE,GAAG,CAAC;IACZ,YAAY,EAAE,OAAO,CAAC;IACtB,oBAAoB,CAAC,EAAE,MAAM,EAAE,CAAC;IAChC,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAUD,eAAO,MAAM,wBAAwB,kBACpB,mBAAmB,KACjC;IAAC,OAAO,EAAE,OAAO,CAAC;IAAC,UAAU,EAAE,OAAO,CAAC;IAAC,iBAAiB,EAAE,OAAO,CAAA;CAIpE,CAAC;AAEF,QAAA,MAAM,kBAAkB,wKAcrB,uBAAuB,KAAG,GAAG,CAAC,OA8OhC,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
@@ -103,7 +103,7 @@ const ProfileIcicleGraph = function ProfileIcicleGraphNonMemo({ arrow, total, fi
103
103
  if (total === 0n && !loading)
104
104
  return _jsx("div", { className: "mx-auto text-center", children: "Profile has no samples" });
105
105
  if (arrow !== undefined) {
106
- return (_jsxs("div", { className: "relative", children: [isIcicleChart ? (_jsx(TimelineGuide, { bounds: boundsFromProfileSource(profileSource), width: width, height: icicleChartHeight ?? 420, margin: 0, ticks: 12, timeUnit: "nanoseconds" })) : null, _jsx("div", { ref: icicleChartRef, children: _jsx(IcicleGraphArrow, { width: width, arrow: arrow, total: total, filtered: filtered, curPath: curPathArrow, setCurPath: setNewCurPathArrow, isHalfScreen: isHalfScreen, mappingsListFromMetadata: mappingsList, compareAbsolute: isCompareAbsolute, isIcicleChart: isIcicleChart, profileSource: profileSource }) })] }));
106
+ return (_jsxs("div", { className: "relative", children: [isIcicleChart ? (_jsx(TimelineGuide, { bounds: boundsFromProfileSource(profileSource), width: width, height: icicleChartHeight ?? 420, margin: 0, ticks: 12, timeUnit: "nanoseconds" })) : null, _jsx("div", { ref: icicleChartRef, children: _jsx(IcicleGraphArrow, { width: width, arrow: arrow, total: total, filtered: filtered, curPath: curPathArrow, setCurPath: setNewCurPathArrow, profileType: profileType, isHalfScreen: isHalfScreen, mappingsListFromMetadata: mappingsList, compareAbsolute: isCompareAbsolute, isIcicleChart: isIcicleChart, profileSource: profileSource }) })] }));
107
107
  }
108
108
  }, [
109
109
  isLoading,
@@ -114,6 +114,7 @@ const ProfileIcicleGraph = function ProfileIcicleGraphNonMemo({ arrow, total, fi
114
114
  filtered,
115
115
  curPathArrow,
116
116
  setNewCurPathArrow,
117
+ profileType,
117
118
  isHalfScreen,
118
119
  isDarkMode,
119
120
  mappingsList,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@parca/profile",
3
- "version": "0.17.3",
3
+ "version": "0.17.5",
4
4
  "description": "Profile viewing libraries",
5
5
  "dependencies": {
6
6
  "@headlessui/react": "^1.7.19",
@@ -77,5 +77,5 @@
77
77
  "access": "public",
78
78
  "registry": "https://registry.npmjs.org/"
79
79
  },
80
- "gitHead": "7577be4930afe84038de88d174d3de14917aa1b7"
80
+ "gitHead": "859a26525b61192beea3ed997057e6df3d98ea8d"
81
81
  }
@@ -114,7 +114,9 @@ export const IcicleNode = React.memo(function IcicleNodeNoMemo({
114
114
  const filename: string | null = arrowToString(filenameColumn?.get(row));
115
115
  const depth: number = depthColumn?.get(row) ?? 0;
116
116
  const valueOffset: bigint =
117
- valueOffsetColumn?.get(row) !== null ? BigInt(valueOffsetColumn?.get(row)) : 0n;
117
+ valueOffsetColumn?.get(row) !== null && valueOffsetColumn?.get(row) !== undefined
118
+ ? BigInt(valueOffsetColumn?.get(row))
119
+ : 0n;
118
120
 
119
121
  const colorAttribute =
120
122
  colorBy === 'filename' ? filename : colorBy === 'binary' ? mappingFile : null;
@@ -147,7 +149,10 @@ export const IcicleNode = React.memo(function IcicleNodeNoMemo({
147
149
  }, [searchString, name]);
148
150
 
149
151
  const selectionOffset =
150
- valueOffsetColumn?.get(selectedRow) !== null ? BigInt(valueOffsetColumn?.get(selectedRow)) : 0n;
152
+ valueOffsetColumn?.get(selectedRow) !== null &&
153
+ valueOffsetColumn?.get(selectedRow) !== undefined
154
+ ? BigInt(valueOffsetColumn?.get(selectedRow))
155
+ : 0n;
151
156
  const selectionCumulative =
152
157
  cumulativeColumn?.get(selectedRow) !== null ? BigInt(cumulativeColumn?.get(selectedRow)) : 0n;
153
158
  if (
@@ -19,6 +19,7 @@ import {useContextMenu} from 'react-contexify';
19
19
  import {FlamegraphArrow} from '@parca/client';
20
20
  import {useURLState} from '@parca/components';
21
21
  import {USER_PREFERENCES, useCurrentColorProfile, useUserPreference} from '@parca/hooks';
22
+ import {ProfileType} from '@parca/parser';
22
23
  import {getColorForFeature, selectDarkMode, useAppSelector} from '@parca/store';
23
24
  import {getLastItem, type ColorConfig} from '@parca/utilities';
24
25
 
@@ -64,6 +65,7 @@ interface IcicleGraphArrowProps {
64
65
  arrow: FlamegraphArrow;
65
66
  total: bigint;
66
67
  filtered: bigint;
68
+ profileType?: ProfileType;
67
69
  profileSource: ProfileSource;
68
70
  width?: number;
69
71
  curPath: CurrentPathFrame[];
@@ -104,6 +106,17 @@ export const getFilenameColors = (
104
106
 
105
107
  const noop = (): void => {};
106
108
 
109
+ function getMaxDepth(depthColumn: Vector<any> | null): number {
110
+ if (depthColumn === null) return 0;
111
+
112
+ let max = 0;
113
+ for (const val of depthColumn) {
114
+ const numVal = Number(val);
115
+ if (numVal > max) max = numVal;
116
+ }
117
+ return max;
118
+ }
119
+
107
120
  export const IcicleGraphArrow = memo(function IcicleGraphArrow({
108
121
  arrow,
109
122
  total,
@@ -111,6 +124,7 @@ export const IcicleGraphArrow = memo(function IcicleGraphArrow({
111
124
  width,
112
125
  setCurPath,
113
126
  curPath,
127
+ profileType,
114
128
  profileSource,
115
129
  mappingsListFromMetadata,
116
130
  compareAbsolute,
@@ -234,7 +248,7 @@ export const IcicleGraphArrow = memo(function IcicleGraphArrow({
234
248
  };
235
249
 
236
250
  const depthColumn = table.getChild(FIELD_DEPTH);
237
- const maxDepth = depthColumn === null ? 0 : Math.max(...depthColumn.toArray());
251
+ const maxDepth = getMaxDepth(depthColumn);
238
252
  const height = maxDepth * RowHeight;
239
253
 
240
254
  // To find the selected row, we must walk the current path and look at which
@@ -267,6 +281,7 @@ export const IcicleGraphArrow = memo(function IcicleGraphArrow({
267
281
  table={table}
268
282
  total={total}
269
283
  totalUnfiltered={total + filtered}
284
+ profileType={profileType}
270
285
  unit={arrow.unit}
271
286
  compareAbsolute={compareAbsolute}
272
287
  >
@@ -282,6 +297,7 @@ export const IcicleGraphArrow = memo(function IcicleGraphArrow({
282
297
  hideMenu={hideAll}
283
298
  hideBinary={hideBinary}
284
299
  unit={arrow.unit}
300
+ profileType={profileType}
285
301
  />
286
302
  <MemoizedTooltip contextElement={svg.current} dockedMetainfo={dockedMetainfo} />
287
303
  <svg
@@ -235,6 +235,7 @@ const ProfileIcicleGraph = function ProfileIcicleGraphNonMemo({
235
235
  filtered={filtered}
236
236
  curPath={curPathArrow}
237
237
  setCurPath={setNewCurPathArrow}
238
+ profileType={profileType}
238
239
  isHalfScreen={isHalfScreen}
239
240
  mappingsListFromMetadata={mappingsList}
240
241
  compareAbsolute={isCompareAbsolute}
@@ -254,6 +255,7 @@ const ProfileIcicleGraph = function ProfileIcicleGraphNonMemo({
254
255
  filtered,
255
256
  curPathArrow,
256
257
  setNewCurPathArrow,
258
+ profileType,
257
259
  isHalfScreen,
258
260
  isDarkMode,
259
261
  mappingsList,