diff options
| author | Ian Rogers <[email protected]> | 2023-04-08 05:44:56 +0000 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <[email protected]> | 2023-04-10 22:15:53 +0000 |
| commit | 760eafb2a3dd568a8eec519bf21c9a24582930f3 (patch) | |
| tree | de3ed51cf5813aac48dab35bf41d5def286ae235 /tools/perf/tests/shell/lib/perf_json_output_lint.py | |
| parent | perf stat: Don't write invalid "started on" comment for JSON output (diff) | |
| download | kernel-760eafb2a3dd568a8eec519bf21c9a24582930f3.tar.gz kernel-760eafb2a3dd568a8eec519bf21c9a24582930f3.zip | |
perf test stat+json_output: Write JSON output to a file
Write the JSON output to a file, then sanity check this output. This
avoids problems with debug/warning/error output corrupting the file
format.
Signed-off-by: Ian Rogers <[email protected]>
Cc: Adrian Hunter <[email protected]>
Cc: Alexander Shishkin <[email protected]>
Cc: Athira Rajeev <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Mark Rutland <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Sumanth Korikkar <[email protected]>
Cc: Thomas Richter <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'tools/perf/tests/shell/lib/perf_json_output_lint.py')
| -rw-r--r-- | tools/perf/tests/shell/lib/perf_json_output_lint.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/perf/tests/shell/lib/perf_json_output_lint.py b/tools/perf/tests/shell/lib/perf_json_output_lint.py index 97598d14e532..61f3059ca54b 100644 --- a/tools/perf/tests/shell/lib/perf_json_output_lint.py +++ b/tools/perf/tests/shell/lib/perf_json_output_lint.py @@ -17,9 +17,10 @@ ap.add_argument('--per-thread', action='store_true') ap.add_argument('--per-die', action='store_true') ap.add_argument('--per-node', action='store_true') ap.add_argument('--per-socket', action='store_true') +ap.add_argument('--file', type=argparse.FileType('r'), default=sys.stdin) args = ap.parse_args() -Lines = sys.stdin.readlines() +Lines = args.file.readlines() def isfloat(num): try: |
