@parca/profile 0.19.151 → 0.19.153

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.
Files changed (29) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/GraphTooltipArrow/Content.d.ts +2 -1
  3. package/dist/GraphTooltipArrow/Content.d.ts.map +1 -1
  4. package/dist/GraphTooltipArrow/Content.js +203 -9
  5. package/dist/GraphTooltipArrow/gpuFrameDescriptions.d.ts +28 -0
  6. package/dist/GraphTooltipArrow/gpuFrameDescriptions.d.ts.map +1 -0
  7. package/dist/GraphTooltipArrow/gpuFrameDescriptions.js +845 -0
  8. package/dist/GraphTooltipArrow/index.d.ts +2 -1
  9. package/dist/GraphTooltipArrow/index.d.ts.map +1 -1
  10. package/dist/GraphTooltipArrow/index.js +11 -2
  11. package/dist/GraphTooltipArrow/openInNewTab.d.ts +2 -0
  12. package/dist/GraphTooltipArrow/openInNewTab.d.ts.map +1 -0
  13. package/dist/GraphTooltipArrow/openInNewTab.js +40 -0
  14. package/dist/ProfileFlameGraph/FlameGraphArrow/MemoizedTooltip.d.ts.map +1 -1
  15. package/dist/ProfileFlameGraph/FlameGraphArrow/MemoizedTooltip.js +119 -56
  16. package/dist/ProfileMetricsGraph/index.d.ts.map +1 -1
  17. package/dist/ProfileMetricsGraph/index.js +7 -1
  18. package/dist/ProfileTypeSelector/index.d.ts.map +1 -1
  19. package/dist/ProfileTypeSelector/index.js +12 -0
  20. package/dist/styles.css +1 -1
  21. package/package.json +2 -2
  22. package/src/GraphTooltipArrow/Content.tsx +86 -5
  23. package/src/GraphTooltipArrow/gpuFrameDescriptions.test.ts +53 -0
  24. package/src/GraphTooltipArrow/gpuFrameDescriptions.ts +556 -0
  25. package/src/GraphTooltipArrow/index.tsx +13 -1
  26. package/src/GraphTooltipArrow/openInNewTab.ts +43 -0
  27. package/src/ProfileFlameGraph/FlameGraphArrow/MemoizedTooltip.tsx +35 -2
  28. package/src/ProfileMetricsGraph/index.tsx +7 -1
  29. package/src/ProfileTypeSelector/index.tsx +12 -0
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.19.153](https://github.com/parca-dev/parca/compare/@parca/profile@0.19.152...@parca/profile@0.19.153) (2026-05-21)
7
+
8
+ **Note:** Version bump only for package @parca/profile
9
+
10
+ ## [0.19.152](https://github.com/parca-dev/parca/compare/@parca/profile@0.19.151...@parca/profile@0.19.152) (2026-05-18)
11
+
12
+ **Note:** Version bump only for package @parca/profile
13
+
6
14
  ## [0.19.151](https://github.com/parca-dev/parca/compare/@parca/profile@0.19.150...@parca/profile@0.19.151) (2026-05-18)
7
15
 
8
16
  **Note:** Version bump only for package @parca/profile
@@ -10,7 +10,8 @@ interface GraphTooltipArrowContentProps {
10
10
  row: number | null;
11
11
  isFixed: boolean;
12
12
  compareAbsolute: boolean;
13
+ frozen?: boolean;
13
14
  }
14
- declare const GraphTooltipArrowContent: ({ table, profileType, unit, total, totalUnfiltered, row, isFixed, compareAbsolute, }: GraphTooltipArrowContentProps) => React.JSX.Element;
15
+ declare const GraphTooltipArrowContent: ({ table, profileType, unit, total, totalUnfiltered, row, isFixed, compareAbsolute, frozen, }: GraphTooltipArrowContentProps) => React.JSX.Element;
15
16
  export default GraphTooltipArrowContent;
16
17
  //# sourceMappingURL=Content.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Content.d.ts","sourceRoot":"","sources":["../../src/GraphTooltipArrow/Content.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAC,KAAK,EAAC,MAAM,mBAAmB,CAAC;AAGxC,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,CAAC;AAQ1C,UAAU,6BAA6B;IACrC,KAAK,EAAE,KAAK,CAAC;IACb,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,eAAe,EAAE,MAAM,CAAC;IACxB,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;IACjB,eAAe,EAAE,OAAO,CAAC;CAC1B;AAMD,QAAA,MAAM,wBAAwB,GAAI,sFAS/B,6BAA6B,KAAG,KAAK,CAAC,GAAG,CAAC,OA+E5C,CAAC;AAqFF,eAAe,wBAAwB,CAAC"}
1
+ {"version":3,"file":"Content.d.ts","sourceRoot":"","sources":["../../src/GraphTooltipArrow/Content.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAC,KAAK,EAAC,MAAM,mBAAmB,CAAC;AAGxC,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,CAAC;AAU1C,UAAU,6BAA6B;IACrC,KAAK,EAAE,KAAK,CAAC;IACb,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,eAAe,EAAE,MAAM,CAAC;IACxB,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;IACjB,eAAe,EAAE,OAAO,CAAC;IACzB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAMD,QAAA,MAAM,wBAAwB,GAAI,8FAU/B,6BAA6B,KAAG,KAAK,CAAC,GAAG,CAAC,OAwF5C,CAAC;AAyJF,eAAe,wBAAwB,CAAC"}
@@ -18,6 +18,8 @@ import { useParcaContext } from '@parca/components';
18
18
  import { formatDateTimeDownToMS, getLastItem } from '@parca/utilities';
19
19
  import { hexifyAddress, truncateString, truncateStringReverse } from '../utils';
20
20
  import { ExpandOnHover } from './ExpandOnHoverValue';
21
+ import { gpuFrameInfo } from './gpuFrameDescriptions';
22
+ import { openInNewTab } from './openInNewTab';
21
23
  import { useGraphTooltip } from './useGraphTooltip';
22
24
  import { useGraphTooltipMetaInfo } from './useGraphTooltipMetaInfo';
23
25
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
@@ -43,7 +45,9 @@ var GraphTooltipArrowContent = function GraphTooltipArrowContent(_ref) {
43
45
  totalUnfiltered = _ref.totalUnfiltered,
44
46
  row = _ref.row,
45
47
  isFixed = _ref.isFixed,
46
- compareAbsolute = _ref.compareAbsolute;
48
+ compareAbsolute = _ref.compareAbsolute,
49
+ _ref$frozen = _ref.frozen,
50
+ frozen = _ref$frozen === void 0 ? false : _ref$frozen;
47
51
  var graphTooltipData = useGraphTooltip({
48
52
  table: table,
49
53
  profileType: profileType,
@@ -63,12 +67,17 @@ var GraphTooltipArrowContent = function GraphTooltipArrowContent(_ref) {
63
67
  diffText = graphTooltipData.diffText,
64
68
  diff = graphTooltipData.diff,
65
69
  rowNumber = graphTooltipData.row;
70
+ var info = gpuFrameInfo(name);
71
+
72
+ // Outer card gains a subtle ring when frozen, matching the design's
73
+ // `.is-frozen` treatment.
74
+ var cardClassName = ['flex w-auto max-w-[600px] min-w-[300px] flex-col justify-start rounded-lg border bg-gray-50 p-3 shadow-lg dark:bg-gray-900', frozen ? 'border-indigo-400/60 ring-2 ring-indigo-400/20 dark:border-indigo-400/40' : 'border-gray-300 dark:border-gray-500'].join(' ');
66
75
  return /*#__PURE__*/_jsx("div", {
67
76
  className: "flex text-sm ".concat(isFixed ? 'w-full' : ''),
68
77
  children: /*#__PURE__*/_jsx("div", {
69
78
  className: "m-auto w-full ".concat(isFixed ? 'w-full' : ''),
70
79
  children: /*#__PURE__*/_jsxs("div", {
71
- className: "flex w-auto max-w-[600px] min-w-[300px] flex-col justify-start rounded-lg border border-gray-300 bg-gray-50 p-3 shadow-lg dark:border-gray-500 dark:bg-gray-900",
80
+ className: cardClassName,
72
81
  children: [/*#__PURE__*/_jsx("div", {
73
82
  className: "flex flex-row",
74
83
  children: /*#__PURE__*/_jsxs("div", {
@@ -120,18 +129,203 @@ var GraphTooltipArrowContent = function GraphTooltipArrowContent(_ref) {
120
129
  })
121
130
  })]
122
131
  })
123
- }), /*#__PURE__*/_jsxs("div", {
124
- className: "flex w-full items-center gap-1 text-xs text-gray-500",
125
- children: [/*#__PURE__*/_jsx(Icon, {
126
- icon: "iconoir:mouse-button-right"
127
- }), /*#__PURE__*/_jsx("div", {
128
- children: "Right click to show context menu"
129
- })]
132
+ }), info !== undefined && /*#__PURE__*/_jsx(GpuDescriptionBlock, {
133
+ info: info
134
+ }), /*#__PURE__*/_jsx(ShortcutFooter, {
135
+ frozen: frozen
130
136
  })]
131
137
  })
132
138
  })
133
139
  });
134
140
  };
141
+ var GpuDescriptionBlock = function GpuDescriptionBlock(t0) {
142
+ var $ = _c(16);
143
+ var info = t0.info;
144
+ var chipPrefix = info.kind === "stall" ? "Stall reason" : "SASS instruction";
145
+ var t1;
146
+ if ($[0] !== chipPrefix || $[1] !== info.entry.reasonLabel) {
147
+ t1 = /*#__PURE__*/_jsxs("div", {
148
+ className: "mb-2 text-xs font-semibold text-gray-700 dark:text-gray-200",
149
+ children: [chipPrefix, " \xB7 ", info.entry.reasonLabel]
150
+ });
151
+ $[0] = chipPrefix;
152
+ $[1] = info.entry.reasonLabel;
153
+ $[2] = t1;
154
+ } else {
155
+ t1 = $[2];
156
+ }
157
+ var t2;
158
+ if ($[3] === Symbol["for"]("react.memo_cache_sentinel")) {
159
+ t2 = /*#__PURE__*/_jsx("div", {
160
+ className: "font-mono text-[10px] uppercase tracking-wider text-gray-500 dark:text-gray-400",
161
+ children: "Description"
162
+ });
163
+ $[3] = t2;
164
+ } else {
165
+ t2 = $[3];
166
+ }
167
+ var t3;
168
+ if ($[4] !== info.entry.description) {
169
+ t3 = /*#__PURE__*/_jsx("p", {
170
+ className: "mt-1 text-xs leading-relaxed text-gray-600 dark:text-gray-300",
171
+ children: info.entry.description
172
+ });
173
+ $[4] = info.entry.description;
174
+ $[5] = t3;
175
+ } else {
176
+ t3 = $[5];
177
+ }
178
+ var t4;
179
+ if ($[6] !== info.sourceUrl) {
180
+ t4 = function t4(e) {
181
+ e.preventDefault();
182
+ e.stopPropagation();
183
+ openInNewTab(info.sourceUrl);
184
+ };
185
+ $[6] = info.sourceUrl;
186
+ $[7] = t4;
187
+ } else {
188
+ t4 = $[7];
189
+ }
190
+ var t5;
191
+ if ($[8] === Symbol["for"]("react.memo_cache_sentinel")) {
192
+ t5 = /*#__PURE__*/_jsx(Icon, {
193
+ icon: "iconoir:open-new-window",
194
+ className: "opacity-80",
195
+ width: 11,
196
+ height: 11
197
+ });
198
+ $[8] = t5;
199
+ } else {
200
+ t5 = $[8];
201
+ }
202
+ var t6;
203
+ if ($[9] !== info.sourceLabel || $[10] !== t4) {
204
+ t6 = /*#__PURE__*/_jsxs("button", {
205
+ type: "button",
206
+ onClick: t4,
207
+ title: info.sourceLabel,
208
+ className: "mt-2 inline-flex cursor-pointer items-center gap-1 self-start text-[11px] text-indigo-600 hover:underline dark:text-indigo-400",
209
+ children: ["Docs", t5]
210
+ });
211
+ $[9] = info.sourceLabel;
212
+ $[10] = t4;
213
+ $[11] = t6;
214
+ } else {
215
+ t6 = $[11];
216
+ }
217
+ var t7;
218
+ if ($[12] !== t1 || $[13] !== t3 || $[14] !== t6) {
219
+ t7 = /*#__PURE__*/_jsxs("div", {
220
+ className: "mx-2 mt-3 border-t border-gray-200 pt-3 dark:border-gray-700",
221
+ children: [t1, t2, t3, t6]
222
+ });
223
+ $[12] = t1;
224
+ $[13] = t3;
225
+ $[14] = t6;
226
+ $[15] = t7;
227
+ } else {
228
+ t7 = $[15];
229
+ }
230
+ return t7;
231
+ };
232
+ var ShortcutFooter = function ShortcutFooter(t0) {
233
+ var $ = _c(14);
234
+ var frozen = t0.frozen;
235
+ var t1 = "inline-flex items-center gap-1.5 ".concat(frozen ? "text-gray-600 dark:text-gray-300" : "");
236
+ var t2 = frozen ? "border-gray-300 bg-gray-200 text-gray-600 dark:border-gray-600 dark:bg-gray-700 dark:text-gray-300" : "border-gray-300 bg-white text-gray-600 dark:border-gray-600 dark:bg-gray-900 dark:text-gray-300";
237
+ var t3;
238
+ if ($[0] !== t2) {
239
+ t3 = ["inline-flex min-w-[18px] justify-center rounded border border-b-2 px-1 font-mono text-[10px] leading-4", t2];
240
+ $[0] = t2;
241
+ $[1] = t3;
242
+ } else {
243
+ t3 = $[1];
244
+ }
245
+ var t4 = t3.join(" ");
246
+ var t5;
247
+ if ($[2] !== t4) {
248
+ t5 = /*#__PURE__*/_jsx("kbd", {
249
+ className: t4,
250
+ children: "\u21E7"
251
+ });
252
+ $[2] = t4;
253
+ $[3] = t5;
254
+ } else {
255
+ t5 = $[3];
256
+ }
257
+ var t6;
258
+ if ($[4] !== frozen) {
259
+ t6 = frozen ? /*#__PURE__*/_jsxs("span", {
260
+ children: [/*#__PURE__*/_jsx("b", {
261
+ className: "font-semibold",
262
+ children: "Frozen"
263
+ }), " \xB7 release to resume hover"]
264
+ }) : /*#__PURE__*/_jsxs("span", {
265
+ children: ["Hold ", /*#__PURE__*/_jsx("b", {
266
+ className: "font-semibold",
267
+ children: "Shift"
268
+ }), " to freeze \xB7 interact"]
269
+ });
270
+ $[4] = frozen;
271
+ $[5] = t6;
272
+ } else {
273
+ t6 = $[5];
274
+ }
275
+ var t7;
276
+ if ($[6] !== t1 || $[7] !== t5 || $[8] !== t6) {
277
+ t7 = /*#__PURE__*/_jsxs("span", {
278
+ className: t1,
279
+ children: [t5, t6]
280
+ });
281
+ $[6] = t1;
282
+ $[7] = t5;
283
+ $[8] = t6;
284
+ $[9] = t7;
285
+ } else {
286
+ t7 = $[9];
287
+ }
288
+ var t8;
289
+ if ($[10] === Symbol["for"]("react.memo_cache_sentinel")) {
290
+ t8 = /*#__PURE__*/_jsx("span", {
291
+ className: "inline-block h-3 w-px bg-gray-200 dark:bg-gray-700"
292
+ });
293
+ $[10] = t8;
294
+ } else {
295
+ t8 = $[10];
296
+ }
297
+ var t9;
298
+ if ($[11] === Symbol["for"]("react.memo_cache_sentinel")) {
299
+ t9 = /*#__PURE__*/_jsxs("span", {
300
+ className: "inline-flex items-center gap-1.5",
301
+ children: [/*#__PURE__*/_jsx(Icon, {
302
+ icon: "iconoir:mouse-button-right",
303
+ width: 12,
304
+ height: 14
305
+ }), /*#__PURE__*/_jsxs("span", {
306
+ children: [/*#__PURE__*/_jsx("b", {
307
+ className: "font-semibold",
308
+ children: "Right-click"
309
+ }), " for context menu"]
310
+ })]
311
+ });
312
+ $[11] = t9;
313
+ } else {
314
+ t9 = $[11];
315
+ }
316
+ var t10;
317
+ if ($[12] !== t7) {
318
+ t10 = /*#__PURE__*/_jsxs("div", {
319
+ className: "mx-2 mt-3 flex flex-wrap items-center gap-x-3 gap-y-1 border-t border-gray-200 pt-2 text-[11px] text-gray-500 dark:border-gray-700 dark:text-gray-400",
320
+ children: [t7, t8, t9]
321
+ });
322
+ $[12] = t7;
323
+ $[13] = t10;
324
+ } else {
325
+ t10 = $[13];
326
+ }
327
+ return t10;
328
+ };
135
329
  var TooltipMetaInfo = function TooltipMetaInfo(_ref2) {
136
330
  var _ref3;
137
331
  var table = _ref2.table,
@@ -0,0 +1,28 @@
1
+ export declare const NVIDIA_DOCS_LABEL = "NVIDIA docs";
2
+ export declare const STALL_SOURCE_URL = "https://docs.nvidia.com/nsight-compute/ProfilingGuide/index.html#warp-stall-reasons";
3
+ export declare const SASS_SOURCE_URL = "https://docs.nvidia.com/cuda/cuda-binary-utilities/index.html#turing-turing-instruction-set-table";
4
+ export interface StallEntry {
5
+ reasonLabel: string;
6
+ description: string;
7
+ sourceUrl?: string;
8
+ }
9
+ export interface SASSEntry {
10
+ reasonLabel: string;
11
+ description: string;
12
+ sourceUrl?: string;
13
+ }
14
+ export declare const SASS_INSTRUCTION_DESCRIPTIONS: Record<string, SASSEntry>;
15
+ export declare const STALL_REASON_DESCRIPTIONS: Record<string, StallEntry>;
16
+ export type GpuFrameInfo = {
17
+ kind: 'sass';
18
+ entry: SASSEntry;
19
+ sourceLabel: string;
20
+ sourceUrl: string;
21
+ } | {
22
+ kind: 'stall';
23
+ entry: StallEntry;
24
+ sourceLabel: string;
25
+ sourceUrl: string;
26
+ };
27
+ export declare function gpuFrameInfo(name: string): GpuFrameInfo | undefined;
28
+ //# sourceMappingURL=gpuFrameDescriptions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gpuFrameDescriptions.d.ts","sourceRoot":"","sources":["../../src/GraphTooltipArrow/gpuFrameDescriptions.ts"],"names":[],"mappings":"AAkCA,eAAO,MAAM,iBAAiB,gBAAgB,CAAC;AAC/C,eAAO,MAAM,gBAAgB,wFAC0D,CAAC;AACxF,eAAO,MAAM,eAAe,sGACyE,CAAC;AAEtG,MAAM,WAAW,UAAU;IACzB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,SAAS;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAGD,eAAO,MAAM,6BAA6B,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAkRnE,CAAC;AAGF,eAAO,MAAM,yBAAyB,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CA4LhE,CAAC;AAGF,MAAM,MAAM,YAAY,GACpB;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,SAAS,CAAC;IAAC,WAAW,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAC,GACxE;IAAC,IAAI,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,UAAU,CAAC;IAAC,WAAW,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAC,CAAC;AAW/E,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,YAAY,GAAG,SAAS,CAqBnE"}