@@ -134,7 +134,7 @@ export const VisualisationToolbar: FC
= ({
clearSelection,
showVisualizationSelector = true,
}) => {
- const { dashboardItems } = useDashboard();
+ const {dashboardItems} = useDashboard();
const isTableViz = dashboardItems?.includes('table');
const isGraphViz = dashboardItems?.includes('icicle');
@@ -150,7 +150,7 @@ export const VisualisationToolbar: FC = ({
labels={groupByLabels}
setGroupByLabels={setGroupByLabels}
/>
- { }} />
+ {}} />
>
diff --git a/ui/packages/shared/profile/src/ProfileView/hooks/useVisualizationState.ts b/ui/packages/shared/profile/src/ProfileView/hooks/useVisualizationState.ts
index 3ef287c9fb5..3a899502324 100644
--- a/ui/packages/shared/profile/src/ProfileView/hooks/useVisualizationState.ts
+++ b/ui/packages/shared/profile/src/ProfileView/hooks/useVisualizationState.ts
@@ -16,7 +16,7 @@ import {useCallback, useState} from 'react';
import {JSONParser, JSONSerializer, useURLState, useURLStateCustom} from '@parca/components';
import {FIELD_FUNCTION_NAME, FIELD_LABELS} from '../../ProfileIcicleGraph/IcicleGraphArrow';
-import { CurrentPathFrame } from '../../ProfileIcicleGraph/IcicleGraphArrow/utils';
+import {CurrentPathFrame} from '../../ProfileIcicleGraph/IcicleGraphArrow/utils';
export const useVisualizationState = (): {
curPath: string[];
From 8ce22a537eddf95d9cac20fd68f67d9d2ed083f4 Mon Sep 17 00:00:00 2001
From: Manoj Vivek
Date: Tue, 8 Apr 2025 11:53:25 +0530
Subject: [PATCH 09/11] Fix lint error
---
ui/packages/shared/components/src/hooks/URLState/index.tsx | 2 +-
.../profile/src/ProfileIcicleGraph/IcicleGraphArrow/utils.ts | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/ui/packages/shared/components/src/hooks/URLState/index.tsx b/ui/packages/shared/components/src/hooks/URLState/index.tsx
index acf4ce7da5a..060ccb9b97b 100644
--- a/ui/packages/shared/components/src/hooks/URLState/index.tsx
+++ b/ui/packages/shared/components/src/hooks/URLState/index.tsx
@@ -161,7 +161,7 @@ export const JSONSerializer = (val: object): string => {
return JSON.stringify(val, (_, v) => (typeof v === 'bigint' ? v.toString() : v));
};
-export const JSONParser = (val: ParamValue): T => {
+export const JSONParser = (val: ParamValue): T => {
return JSON.parse(val as string);
};
diff --git a/ui/packages/shared/profile/src/ProfileIcicleGraph/IcicleGraphArrow/utils.ts b/ui/packages/shared/profile/src/ProfileIcicleGraph/IcicleGraphArrow/utils.ts
index 763bb1db48d..c167efcd0fb 100644
--- a/ui/packages/shared/profile/src/ProfileIcicleGraph/IcicleGraphArrow/utils.ts
+++ b/ui/packages/shared/profile/src/ProfileIcicleGraph/IcicleGraphArrow/utils.ts
@@ -162,7 +162,7 @@ export interface CurrentPathFrame {
export const getCurrentPathFrameData = (
table: Table,
row: number,
- level: number
+ _level: number
): CurrentPathFrame => {
const functionName: string | null = arrowToString(table.getChild(FIELD_FUNCTION_NAME)?.get(row));
const systemName: string | null = arrowToString(table.getChild(FIELD_FUNCTION_NAME)?.get(row));
From 1000addadc427f3b3736fc338637099b205967ba Mon Sep 17 00:00:00 2001
From: Manoj Vivek
Date: Tue, 8 Apr 2025 12:02:04 +0530
Subject: [PATCH 10/11] Fixed missing address field
---
.../src/ProfileIcicleGraph/IcicleGraphArrow/utils.ts | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/ui/packages/shared/profile/src/ProfileIcicleGraph/IcicleGraphArrow/utils.ts b/ui/packages/shared/profile/src/ProfileIcicleGraph/IcicleGraphArrow/utils.ts
index c167efcd0fb..c81c911a4b7 100644
--- a/ui/packages/shared/profile/src/ProfileIcicleGraph/IcicleGraphArrow/utils.ts
+++ b/ui/packages/shared/profile/src/ProfileIcicleGraph/IcicleGraphArrow/utils.ts
@@ -30,6 +30,7 @@ import {
FIELD_LABELS_ONLY,
FIELD_LOCATION_ADDRESS,
FIELD_MAPPING_FILE,
+ FIELD_FUNCTION_START_LINE,
} from './index';
export function nodeLabel(
@@ -156,6 +157,7 @@ export interface CurrentPathFrame {
systemName: string;
fileName: string;
lineNumber: number;
+ address: string;
inlined: boolean;
}
@@ -167,7 +169,9 @@ export const getCurrentPathFrameData = (
const functionName: string | null = arrowToString(table.getChild(FIELD_FUNCTION_NAME)?.get(row));
const systemName: string | null = arrowToString(table.getChild(FIELD_FUNCTION_NAME)?.get(row));
const fileName: string | null = arrowToString(table.getChild(FIELD_MAPPING_FILE)?.get(row));
- const lineNumber: bigint = table.getChild(FIELD_LOCATION_ADDRESS)?.get(row) ?? 0n;
+ const lineNumber: bigint = table.getChild(FIELD_FUNCTION_START_LINE)?.get(row) ?? 0n;
+ const addressBigInt: bigint = table.getChild(FIELD_LOCATION_ADDRESS)?.get(row);
+ const address = hexifyAddress(addressBigInt);
const inlined: boolean | null = table.getChild(FIELD_INLINED)?.get(row);
return {
@@ -175,6 +179,7 @@ export const getCurrentPathFrameData = (
systemName: systemName ?? '',
fileName: fileName ?? '',
lineNumber: Number(lineNumber),
+ address: address,
inlined: inlined ?? false,
};
};
@@ -191,6 +196,7 @@ export function isCurrentPathFrameMatch(
a.systemName === b.systemName &&
a.fileName === b.fileName &&
a.lineNumber === b.lineNumber &&
+ a.address === b.address &&
a.inlined === b.inlined
);
}
From 576b720a37883fd8fce7ee25e492d03c4ee753b5 Mon Sep 17 00:00:00 2001
From: "pre-commit-ci-lite[bot]"
<117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
Date: Tue, 8 Apr 2025 10:58:34 +0000
Subject: [PATCH 11/11] [pre-commit.ci lite] apply automatic fixes
---
.../profile/src/ProfileIcicleGraph/IcicleGraphArrow/utils.ts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ui/packages/shared/profile/src/ProfileIcicleGraph/IcicleGraphArrow/utils.ts b/ui/packages/shared/profile/src/ProfileIcicleGraph/IcicleGraphArrow/utils.ts
index c81c911a4b7..c443093ffeb 100644
--- a/ui/packages/shared/profile/src/ProfileIcicleGraph/IcicleGraphArrow/utils.ts
+++ b/ui/packages/shared/profile/src/ProfileIcicleGraph/IcicleGraphArrow/utils.ts
@@ -26,11 +26,11 @@ import {MergedProfileSource, ProfileSource} from '../../ProfileSource';
import {BigIntDuo, hexifyAddress} from '../../utils';
import {
FIELD_FUNCTION_NAME,
+ FIELD_FUNCTION_START_LINE,
FIELD_INLINED,
FIELD_LABELS_ONLY,
FIELD_LOCATION_ADDRESS,
FIELD_MAPPING_FILE,
- FIELD_FUNCTION_START_LINE,
} from './index';
export function nodeLabel(