diff options
| author | Ian Rogers <[email protected]> | 2023-05-26 18:33:51 +0000 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <[email protected]> | 2023-05-28 13:22:40 +0000 |
| commit | 89df62c3ca1746177e5f1bae540b6b85c27aadcd (patch) | |
| tree | e5c5404a9e6caf74784e28f62172f4fa81500ce9 /tools/lib/api/fs/tracing_path.c | |
| parent | perf trace beauty: Make MSR arrays const to move it to .data.rel.ro (diff) | |
| download | kernel-89df62c3ca1746177e5f1bae540b6b85c27aadcd.tar.gz kernel-89df62c3ca1746177e5f1bae540b6b85c27aadcd.zip | |
tools api fs: Avoid large static PATH_MAX arrays
Change struct fs to have a pointer to a dynamically allocated array
rather than an array. This reduces the size of fs__entries from 24,768
bytes to 240 bytes. Read paths into a stack allocated array and
strdup. Fix off-by-1 fscanf %<num>s in fs__read_mounts caught by
address sanitizer.
Signed-off-by: Ian Rogers <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Cc: K Prateek Nayak <[email protected]>
Cc: Ravi Bangoria <[email protected]>
Cc: Mark Rutland <[email protected]>
Cc: Ross Zwisler <[email protected]>
Cc: Steven Rostedt (Google) <[email protected]>
Cc: Sean Christopherson <[email protected]>
Cc: Yang Jihong <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Adrian Hunter <[email protected]>
Cc: Arnaldo Carvalho de Melo <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Masami Hiramatsu (Google) <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Leo Yan <[email protected]>
Cc: Andi Kleen <[email protected]>
Cc: Alexander Shishkin <[email protected]>
Cc: Kan Liang <[email protected]>
Cc: Tiezhu Yang <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Paolo Bonzini <[email protected]>
Cc: [email protected]
Cc: [email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'tools/lib/api/fs/tracing_path.c')
0 files changed, 0 insertions, 0 deletions
