mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
perf mem: Fix size tracking for mem_lvl's in perf_script__meminfo_scnprintf()
When printing memory info in perf script, the entire size of the
buffer is passed to perf_mem__lvl_scnprintf() instead of the remaining
size. Pass the remaining buffer size instead.
This issue was detected by sashiko during an internal code review.
Fixes: fdefc3750e ("perf mem: Print memory operation type")
Reviewed-by: Dapeng Mi <dapeng1.mi@linux.intel.com>
Reviewed-by: Ian Rogers <irogers@google.com>
Reviewed-by: Namhyung Kim <namhyung@kernel.org>
Cc: Leo Yan <leo.yan@linux.dev>
Assisted-by: Sashiko:gemini-3.1-pro-preview
Signed-off-by: Thomas Falcon <thomas.falcon@intel.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
parent
ed1293302f
commit
06d5ce78e4
|
|
@ -610,7 +610,7 @@ int perf_script__meminfo_scnprintf(char *out, size_t sz, const struct mem_info *
|
|||
i += scnprintf(out, sz, "|OP ");
|
||||
i += perf_mem__op_scnprintf(out + i, sz - i, mem_info);
|
||||
i += scnprintf(out + i, sz - i, "|LVL ");
|
||||
i += perf_mem__lvl_scnprintf(out + i, sz, mem_info);
|
||||
i += perf_mem__lvl_scnprintf(out + i, sz - i, mem_info);
|
||||
i += scnprintf(out + i, sz - i, "|SNP ");
|
||||
i += perf_mem__snp_scnprintf(out + i, sz - i, mem_info);
|
||||
i += scnprintf(out + i, sz - i, "|TLB ");
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user