RE: [PATCH v3 5/7] perf jevents: Add support for NVIDIA Tegra410 C2C PMU aliasing

From: Besar Wicaksono

Date: Wed Nov 04 2026 - 12:05:55 EST




> -----Original Message-----
> From: Ian Rogers <irogers@xxxxxxxxxx>
> Sent: Wednesday, November 4, 2026 4:20 PM
> To: Besar Wicaksono <bwicaksono@xxxxxxxxxx>
> Cc: acme@xxxxxxxxxx; namhyung@xxxxxxxxxx; ctshao@xxxxxxxxxx; linux-
> tegra@xxxxxxxxxxxxxxx; linux-arm-kernel@xxxxxxxxxxxxxxxxxxx; linux-perf-
> users@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx; Vikram Sethi
> <vsethi@xxxxxxxxxx>; Rich Wiley <rwiley@xxxxxxxxxx>; Sean Kelley
> <skelley@xxxxxxxxxx>; Matt Ochs <mochs@xxxxxxxxxx>; Raj Joshi
> <rajjoshi@xxxxxxxxxx>; Thierry Reding <treding@xxxxxxxxxx>; Jon Hunter
> <jonathanh@xxxxxxxxxx>; john.garry@xxxxxxxxx; will@xxxxxxxxxx;
> james.clark@xxxxxxxxxx; mike.leach@xxxxxxx; leo.yan@xxxxxxxxx;
> mark.rutland@xxxxxxx; alexander.shishkin@xxxxxxxxxxxxxxx;
> jolsa@xxxxxxxxxx; adrian.hunter@xxxxxxxxx
> Subject: Re: [PATCH v3 5/7] perf jevents: Add support for NVIDIA Tegra410
> C2C PMU aliasing
>
> External email: Use caution opening links or attachments
>
>
> On Wed, Nov 4, 2026 at 8:08 AM Besar Wicaksono
> <bwicaksono@xxxxxxxxxx> wrote:
> >
> > Add alias support for NVIDIA Tegra410 C2C PMU events.
>
> What does alias mean in this case? That there are json and sysfs
> events? I don't see support being added, only additional events.
>

Yes, the JSON events in this patch use the same event codes as the
sysfs events that were added with the driver:
https://lore.kernel.org/all/20260324012952.1923296-1-bwicaksono@xxxxxxxxxx/T/#mdb5493bf5ffcd907278a349363e98b4ceeef5ec4

Regards,
Besar

> Thanks,
> Ian
>
> > Signed-off-by: Besar Wicaksono <bwicaksono@xxxxxxxxxx>
> > ---
> > .../arm64/nvidia/t410/uncore-nvclink.json | 67 ++++++++++
> > .../arm64/nvidia/t410/uncore-nvdlink.json | 43 +++++++
> > .../arm64/nvidia/t410/uncore-nvlink_c2c.json | 115
> ++++++++++++++++++
> > 3 files changed, 225 insertions(+)
> > create mode 100644 tools/perf/pmu-
> events/arch/arm64/nvidia/t410/uncore-nvclink.json
> > create mode 100644 tools/perf/pmu-
> events/arch/arm64/nvidia/t410/uncore-nvdlink.json
> > create mode 100644 tools/perf/pmu-
> events/arch/arm64/nvidia/t410/uncore-nvlink_c2c.json
> >
> > diff --git a/tools/perf/pmu-events/arch/arm64/nvidia/t410/uncore-
> nvclink.json b/tools/perf/pmu-events/arch/arm64/nvidia/t410/uncore-
> nvclink.json
> > new file mode 100644
> > index 000000000000..1e7f8115ff9c
> > --- /dev/null
> > +++ b/tools/perf/pmu-events/arch/arm64/nvidia/t410/uncore-
> nvclink.json
> > @@ -0,0 +1,67 @@
> > +[
> > + {
> > + "EventCode": "0x0",
> > + "EventName": "NVCLINK_CYCLES",
> > + "BriefDescription": "Counts NV-CLink interface clock cycles.",
> > + "PublicDescription": "Counts NV-CLink interface clock cycles. All NV-
> CLink instances share this clock, so the count is read from the first
> instance.",
> > + "Unit": "nvidia_nvclink_pmu_"
> > + },
> > + {
> > + "EventCode": "0x1",
> > + "EventName": "NVCLINK_IN_RD_CUM_OUTS",
> > + "BriefDescription": "Accumulates the outstanding incoming read
> requests counted by NVCLINK_IN_RD_REQ each NV-CLink interface cycle.",
> > + "PublicDescription": "Accumulates the outstanding incoming read
> requests counted by NVCLINK_IN_RD_REQ each NV-CLink interface cycle.
> Pair the two for the average read latency.",
> > + "Unit": "nvidia_nvclink_pmu_"
> > + },
> > + {
> > + "EventCode": "0x2",
> > + "EventName": "NVCLINK_IN_RD_REQ",
> > + "BriefDescription": "Counts incoming read requests from the remote
> Tegra SoC at the NV-CLink interface.",
> > + "PublicDescription": "Counts incoming read requests from the
> remote Tegra SoC at the NV-CLink interface, where local memory or a local
> device responds with data. Request size can be from 1 to 256 bytes. The
> count is summed over all NV-CLink instances.",
> > + "Unit": "nvidia_nvclink_pmu_"
> > + },
> > + {
> > + "EventCode": "0x5",
> > + "EventName": "NVCLINK_OUT_RD_CUM_OUTS",
> > + "BriefDescription": "Accumulates the outstanding outgoing read
> requests counted by NVCLINK_OUT_RD_REQ each NV-CLink interface
> cycle.",
> > + "PublicDescription": "Accumulates the outstanding outgoing read
> requests counted by NVCLINK_OUT_RD_REQ each NV-CLink interface cycle.
> Pair the two for the average read latency.",
> > + "Unit": "nvidia_nvclink_pmu_"
> > + },
> > + {
> > + "EventCode": "0x6",
> > + "EventName": "NVCLINK_OUT_RD_REQ",
> > + "BriefDescription": "Counts outgoing read requests from the local
> Tegra SoC to the remote Tegra SoC at the NV-CLink interface.",
> > + "PublicDescription": "Counts outgoing read requests from the local
> Tegra SoC to the remote Tegra SoC at the NV-CLink interface, where memory
> on the remote Tegra SoC responds with data. Request size can be from 1 to
> 256 bytes. The count is summed over all NV-CLink instances.",
> > + "Unit": "nvidia_nvclink_pmu_"
> > + },
> > + {
> > + "MetricName": "nvclink_freq",
> > + "MetricGroup":
> "NVCLINK_Frequency;NVCLINK_Latency;NVCLINK_Read_Latency",
> > + "MetricConstraint": "NO_GROUP_EVENTS",
> > + "MetricExpr": "(NVCLINK_CYCLES / aggr_nr(NVCLINK_CYCLES)) / 1e9
> / duration_time",
> > + "ScaleUnit": "1GHz",
> > + "BriefDescription": "NV-CLink interface clock frequency.",
> > + "PublicDescription": "Average NV-CLink interface clock frequency
> over the measurement interval.",
> > + "Unit": "nvidia_nvclink_pmu_"
> > + },
> > + {
> > + "MetricName": "nvclink_in_avg_rd_latency",
> > + "MetricGroup":
> "NVCLINK_Latency;NVCLINK_Read_Latency;NVCLINK_Incoming",
> > + "MetricConstraint": "NO_GROUP_EVENTS",
> > + "MetricExpr": "(NVCLINK_IN_RD_CUM_OUTS /
> NVCLINK_IN_RD_REQ) / nvclink_freq",
> > + "ScaleUnit": "1ns/request",
> > + "BriefDescription": "Average latency of incoming read requests from
> the remote Tegra SoC at the NV-CLink interface.",
> > + "PublicDescription": "Average latency of the incoming read requests
> counted by NVCLINK_IN_RD_REQ, measured at the NV-CLink interface.",
> > + "Unit": "nvidia_nvclink_pmu_"
> > + },
> > + {
> > + "MetricName": "nvclink_out_avg_rd_latency",
> > + "MetricGroup":
> "NVCLINK_Latency;NVCLINK_Read_Latency;NVCLINK_Outgoing",
> > + "MetricConstraint": "NO_GROUP_EVENTS",
> > + "MetricExpr": "(NVCLINK_OUT_RD_CUM_OUTS /
> NVCLINK_OUT_RD_REQ) / nvclink_freq",
> > + "ScaleUnit": "1ns/request",
> > + "BriefDescription": "Average latency of outgoing read requests sent
> by the local Tegra SoC to the remote Tegra SoC at the NV-CLink interface.",
> > + "PublicDescription": "Average latency of the outgoing read requests
> counted by NVCLINK_OUT_RD_REQ, measured at the NV-CLink interface.",
> > + "Unit": "nvidia_nvclink_pmu_"
> > + }
> > +]
> > diff --git a/tools/perf/pmu-events/arch/arm64/nvidia/t410/uncore-
> nvdlink.json b/tools/perf/pmu-events/arch/arm64/nvidia/t410/uncore-
> nvdlink.json
> > new file mode 100644
> > index 000000000000..7777add3741d
> > --- /dev/null
> > +++ b/tools/perf/pmu-events/arch/arm64/nvidia/t410/uncore-
> nvdlink.json
> > @@ -0,0 +1,43 @@
> > +[
> > + {
> > + "EventCode": "0x0",
> > + "EventName": "NVDLINK_CYCLES",
> > + "BriefDescription": "Counts NV-DLink interface clock cycles.",
> > + "PublicDescription": "Counts NV-DLink interface clock cycles. All NV-
> DLink instances share this clock, so the count is read from the first
> instance.",
> > + "Unit": "nvidia_nvdlink_pmu_"
> > + },
> > + {
> > + "EventCode": "0x1",
> > + "EventName": "NVDLINK_IN_RD_CUM_OUTS",
> > + "BriefDescription": "Accumulates the outstanding read requests
> counted by NVDLINK_IN_RD_REQ each NV-DLink interface cycle.",
> > + "PublicDescription": "Accumulates the outstanding read requests
> counted by NVDLINK_IN_RD_REQ each NV-DLink interface cycle. Pair the
> two for the average read latency.",
> > + "Unit": "nvidia_nvdlink_pmu_"
> > + },
> > + {
> > + "EventCode": "0x2",
> > + "EventName": "NVDLINK_IN_RD_REQ",
> > + "BriefDescription": "Counts read requests to local CXL memory at the
> NV-DLink interface.",
> > + "PublicDescription": "Counts read requests to local CXL memory at
> the NV-DLink interface, from all requesters, local and remote. Request size
> can be from 1 to 256 bytes. The count is summed over all NV-DLink
> instances.",
> > + "Unit": "nvidia_nvdlink_pmu_"
> > + },
> > + {
> > + "MetricName": "nvdlink_freq",
> > + "MetricGroup":
> "NVDLINK_Frequency;NVDLINK_Latency;NVDLINK_Read_Latency",
> > + "MetricConstraint": "NO_GROUP_EVENTS",
> > + "MetricExpr": "(NVDLINK_CYCLES / aggr_nr(NVDLINK_CYCLES)) / 1e9
> / duration_time",
> > + "ScaleUnit": "1GHz",
> > + "BriefDescription": "NV-DLink interface clock frequency.",
> > + "PublicDescription": "Average NV-DLink interface clock frequency
> over the measurement interval.",
> > + "Unit": "nvidia_nvdlink_pmu_"
> > + },
> > + {
> > + "MetricName": "nvdlink_in_avg_rd_latency",
> > + "MetricGroup": "NVDLINK_Latency;NVDLINK_Read_Latency",
> > + "MetricConstraint": "NO_GROUP_EVENTS",
> > + "MetricExpr": "(NVDLINK_IN_RD_CUM_OUTS /
> NVDLINK_IN_RD_REQ) / nvdlink_freq",
> > + "ScaleUnit": "1ns/request",
> > + "BriefDescription": "Average latency of read requests to local CXL
> memory at the NV-DLink interface.",
> > + "PublicDescription": "Average latency of the read requests counted
> by NVDLINK_IN_RD_REQ, measured at the NV-DLink interface.",
> > + "Unit": "nvidia_nvdlink_pmu_"
> > + }
> > +]
> > diff --git a/tools/perf/pmu-events/arch/arm64/nvidia/t410/uncore-
> nvlink_c2c.json b/tools/perf/pmu-
> events/arch/arm64/nvidia/t410/uncore-nvlink_c2c.json
> > new file mode 100644
> > index 000000000000..48a64caaba61
> > --- /dev/null
> > +++ b/tools/perf/pmu-events/arch/arm64/nvidia/t410/uncore-
> nvlink_c2c.json
> > @@ -0,0 +1,115 @@
> > +[
> > + {
> > + "EventCode": "0x0",
> > + "EventName": "NVLINK_C2C_CYCLES",
> > + "BriefDescription": "Counts NVLink-C2C interface clock cycles.",
> > + "PublicDescription": "Counts NVLink-C2C interface clock cycles. All
> NVLink-C2C instances share this clock, so the count is read from the first
> instance.",
> > + "Unit": "nvidia_nvlink_c2c_pmu_"
> > + },
> > + {
> > + "EventCode": "0x1",
> > + "EventName": "NVLINK_C2C_IN_RD_CUM_OUTS",
> > + "BriefDescription": "Accumulates the outstanding incoming read
> requests counted by NVLINK_C2C_IN_RD_REQ each NVLink-C2C interface
> cycle.",
> > + "PublicDescription": "Accumulates the outstanding incoming read
> requests counted by NVLINK_C2C_IN_RD_REQ each NVLink-C2C interface
> cycle. Pair the two for the average read latency. The gpu_mask filter works as
> described for NVLINK_C2C_IN_RD_REQ.",
> > + "Unit": "nvidia_nvlink_c2c_pmu_"
> > + },
> > + {
> > + "EventCode": "0x2",
> > + "EventName": "NVLINK_C2C_IN_RD_REQ",
> > + "BriefDescription": "Counts incoming read requests from connected
> GPUs or a remote Tegra SoC at the NVLink-C2C interface.",
> > + "PublicDescription": "Counts incoming read requests sent by
> connected GPUs or a remote Tegra SoC to the local Tegra SoC at the NVLink-
> C2C interface, where the local Tegra SoC responds with data. Request size
> can be from 1 to 256 bytes. The count is summed over all NVLink-C2C
> instances. Filters: the gpu_mask filter selects GPUs by index, one bit per
> GPU. This filter is available only when GPUs are connected. An unset
> gpu_mask counts all GPUs.",
> > + "Unit": "nvidia_nvlink_c2c_pmu_"
> > + },
> > + {
> > + "EventCode": "0x3",
> > + "EventName": "NVLINK_C2C_IN_WR_CUM_OUTS",
> > + "BriefDescription": "Accumulates the outstanding incoming write
> requests counted by NVLINK_C2C_IN_WR_REQ each NVLink-C2C interface
> cycle.",
> > + "PublicDescription": "Accumulates the outstanding incoming write
> requests counted by NVLINK_C2C_IN_WR_REQ each NVLink-C2C interface
> cycle. Available only when GPUs are connected. Pair the two for the average
> write latency. The gpu_mask filter works as described for
> NVLINK_C2C_IN_WR_REQ.",
> > + "Unit": "nvidia_nvlink_c2c_pmu_"
> > + },
> > + {
> > + "EventCode": "0x4",
> > + "EventName": "NVLINK_C2C_IN_WR_REQ",
> > + "BriefDescription": "Counts incoming write requests from connected
> GPUs to the local Tegra SoC at the NVLink-C2C interface.",
> > + "PublicDescription": "Counts incoming write requests sent by
> connected GPUs to the local Tegra SoC at the NVLink-C2C interface, where
> the GPU sends the data. Request size can be from 1 to 256 bytes. Available
> only when GPUs are connected. The count is summed over all NVLink-C2C
> instances. Filters: the gpu_mask filter selects GPUs by index, one bit per
> GPU. An unset gpu_mask counts all GPUs.",
> > + "Unit": "nvidia_nvlink_c2c_pmu_"
> > + },
> > + {
> > + "EventCode": "0x5",
> > + "EventName": "NVLINK_C2C_OUT_RD_CUM_OUTS",
> > + "BriefDescription": "Accumulates the outstanding outgoing read
> requests counted by NVLINK_C2C_OUT_RD_REQ each NVLink-C2C interface
> cycle.",
> > + "PublicDescription": "Accumulates the outstanding outgoing read
> requests counted by NVLINK_C2C_OUT_RD_REQ each NVLink-C2C interface
> cycle. Pair the two for the average read latency. The gpu_mask filter works as
> described for NVLINK_C2C_OUT_RD_REQ.",
> > + "Unit": "nvidia_nvlink_c2c_pmu_"
> > + },
> > + {
> > + "EventCode": "0x6",
> > + "EventName": "NVLINK_C2C_OUT_RD_REQ",
> > + "BriefDescription": "Counts outgoing read requests to connected
> GPUs or a remote Tegra SoC at the NVLink-C2C interface.",
> > + "PublicDescription": "Counts outgoing read requests from all
> requesters to connected GPUs or a remote Tegra SoC at the NVLink-C2C
> interface, where the GPU or remote Tegra SoC responds with data. Request
> size can be from 1 to 256 bytes. The count is summed over all NVLink-C2C
> instances. Filters: the gpu_mask filter selects GPUs by index, one bit per
> GPU. This filter is available only when GPUs are connected. An unset
> gpu_mask counts all GPUs.",
> > + "Unit": "nvidia_nvlink_c2c_pmu_"
> > + },
> > + {
> > + "EventCode": "0x7",
> > + "EventName": "NVLINK_C2C_OUT_WR_CUM_OUTS",
> > + "BriefDescription": "Accumulates the outstanding outgoing write
> requests counted by NVLINK_C2C_OUT_WR_REQ each NVLink-C2C
> interface cycle.",
> > + "PublicDescription": "Accumulates the outstanding outgoing write
> requests counted by NVLINK_C2C_OUT_WR_REQ each NVLink-C2C
> interface cycle. Available only when GPUs are connected. Pair the two for the
> average write latency. The gpu_mask filter works as described for
> NVLINK_C2C_OUT_WR_REQ.",
> > + "Unit": "nvidia_nvlink_c2c_pmu_"
> > + },
> > + {
> > + "EventCode": "0x8",
> > + "EventName": "NVLINK_C2C_OUT_WR_REQ",
> > + "BriefDescription": "Counts outgoing write requests to connected
> GPUs at the NVLink-C2C interface.",
> > + "PublicDescription": "Counts outgoing write requests from all
> requesters to connected GPUs at the NVLink-C2C interface, where the
> requester sends the data. Request size can be from 1 to 256 bytes. Available
> only when GPUs are connected. The count is summed over all NVLink-C2C
> instances. Filters: the gpu_mask filter selects GPUs by index, one bit per
> GPU. An unset gpu_mask counts all GPUs.",
> > + "Unit": "nvidia_nvlink_c2c_pmu_"
> > + },
> > + {
> > + "MetricName": "nvlink_c2c_freq",
> > + "MetricGroup":
> "NVLINK_C2C_Frequency;NVLINK_C2C_Latency;NVLINK_C2C_Read_Latenc
> y;NVLINK_C2C_Write_Latency",
> > + "MetricConstraint": "NO_GROUP_EVENTS",
> > + "MetricExpr": "(NVLINK_C2C_CYCLES /
> aggr_nr(NVLINK_C2C_CYCLES)) / 1e9 / duration_time",
> > + "ScaleUnit": "1GHz",
> > + "BriefDescription": "NVLink-C2C interface clock frequency.",
> > + "PublicDescription": "Average NVLink-C2C interface clock frequency
> over the measurement interval.",
> > + "Unit": "nvidia_nvlink_c2c_pmu_"
> > + },
> > + {
> > + "MetricName": "nvlink_c2c_in_avg_rd_latency",
> > + "MetricGroup":
> "NVLINK_C2C_Latency;NVLINK_C2C_Read_Latency;NVLINK_C2C_Incoming
> ",
> > + "MetricConstraint": "NO_GROUP_EVENTS",
> > + "MetricExpr": "(NVLINK_C2C_IN_RD_CUM_OUTS /
> NVLINK_C2C_IN_RD_REQ) / nvlink_c2c_freq",
> > + "ScaleUnit": "1ns/request",
> > + "BriefDescription": "Average latency of incoming read requests at the
> NVLink-C2C interface.",
> > + "PublicDescription": "Average latency of the incoming read requests
> counted by NVLINK_C2C_IN_RD_REQ, measured at the NVLink-C2C
> interface.",
> > + "Unit": "nvidia_nvlink_c2c_pmu_"
> > + },
> > + {
> > + "MetricName": "nvlink_c2c_in_avg_wr_latency",
> > + "MetricGroup":
> "NVLINK_C2C_Latency;NVLINK_C2C_Write_Latency;NVLINK_C2C_Incoming
> ",
> > + "MetricConstraint": "NO_GROUP_EVENTS",
> > + "MetricExpr": "(NVLINK_C2C_IN_WR_CUM_OUTS /
> NVLINK_C2C_IN_WR_REQ) / nvlink_c2c_freq",
> > + "ScaleUnit": "1ns/request",
> > + "BriefDescription": "Average latency of incoming write requests from
> connected GPUs at the NVLink-C2C interface.",
> > + "PublicDescription": "Average latency of the incoming write requests
> counted by NVLINK_C2C_IN_WR_REQ, measured at the NVLink-C2C
> interface. Available only when GPUs are connected.",
> > + "Unit": "nvidia_nvlink_c2c_pmu_"
> > + },
> > + {
> > + "MetricName": "nvlink_c2c_out_avg_rd_latency",
> > + "MetricGroup":
> "NVLINK_C2C_Latency;NVLINK_C2C_Read_Latency;NVLINK_C2C_Outgoing
> ",
> > + "MetricConstraint": "NO_GROUP_EVENTS",
> > + "MetricExpr": "(NVLINK_C2C_OUT_RD_CUM_OUTS /
> NVLINK_C2C_OUT_RD_REQ) / nvlink_c2c_freq",
> > + "ScaleUnit": "1ns/request",
> > + "BriefDescription": "Average latency of outgoing read requests at the
> NVLink-C2C interface.",
> > + "PublicDescription": "Average latency of the outgoing read requests
> counted by NVLINK_C2C_OUT_RD_REQ, measured at the NVLink-C2C
> interface.",
> > + "Unit": "nvidia_nvlink_c2c_pmu_"
> > + },
> > + {
> > + "MetricName": "nvlink_c2c_out_avg_wr_latency",
> > + "MetricGroup":
> "NVLINK_C2C_Latency;NVLINK_C2C_Write_Latency;NVLINK_C2C_Outgoing
> ",
> > + "MetricConstraint": "NO_GROUP_EVENTS",
> > + "MetricExpr": "(NVLINK_C2C_OUT_WR_CUM_OUTS /
> NVLINK_C2C_OUT_WR_REQ) / nvlink_c2c_freq",
> > + "ScaleUnit": "1ns/request",
> > + "BriefDescription": "Average latency of outgoing write requests to
> connected GPUs at the NVLink-C2C interface.",
> > + "PublicDescription": "Average latency of the outgoing write requests
> counted by NVLINK_C2C_OUT_WR_REQ, measured at the NVLink-C2C
> interface. Available only when GPUs are connected.",
> > + "Unit": "nvidia_nvlink_c2c_pmu_"
> > + }
> > +]
> > --
> > 2.43.0
> >