diff options
author | Jin Yao <[email protected]> | 2018-01-10 23:00:28 +0800 |
---|---|---|
committer | Arnaldo Carvalho de Melo <[email protected]> | 2018-01-17 10:23:35 -0300 |
commit | 6e761cbc9127fb8fc609aea2265ee8279b8d6c55 (patch) | |
tree | 5c341396728ce7f3c627670b875c2a8c06218f44 /tools/perf/scripts/python/call-graph-from-sql.py | |
parent | 1e2778e91616086177a255f3fc8c72ecaa564ae6 (diff) |
perf util: Improve error checking for time percent input
The command line like 'perf report --stdio --time 1abc%/1' could be
accepted by perf. It looks not very good.
This patch uses strtod() to replace original atof() and check the entire
string. Now for the same command line, it would return error message
"Invalid time string".
root@skl:/tmp# perf report --stdio --time 1abc%/1
Invalid time string
Signed-off-by: Jin Yao <[email protected]>
Reviewed-by: Jiri Olsa <[email protected]>
Cc: Alexander Shishkin <[email protected]>
Cc: Andi Kleen <[email protected]>
Cc: Kan Liang <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/call-graph-from-sql.py')
0 files changed, 0 insertions, 0 deletions