diff options
author | Jim Wilson <wilson@tuliptree.org> | 2006-05-02 18:03:02 +0000 |
---|---|---|
committer | Jim Wilson <wilson@tuliptree.org> | 2006-05-02 18:03:02 +0000 |
commit | ad9653e9fed2a78224d67c7f5e8de2a09e43d4e9 (patch) | |
tree | 5c2dae4bd98f2713791c62f1212aff425597faa5 /gprof/gprof.c | |
parent | 895aec445771037c5ccd45fccaf740a4c3ae7938 (diff) | |
download | binutils-redhat-ad9653e9fed2a78224d67c7f5e8de2a09e43d4e9.tar.gz |
Avoid confusing error message for trivial profiled testcase.
* gprof.c (main): When setting default output_style, add separate
checks for INPUT_HISTOGRAM and INPUT_CALL_GRAPH.
Diffstat (limited to 'gprof/gprof.c')
-rw-r--r-- | gprof/gprof.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gprof/gprof.c b/gprof/gprof.c index dc6b618fdf..b2d6bafdef 100644 --- a/gprof/gprof.c +++ b/gprof/gprof.c @@ -545,7 +545,12 @@ This program is free software. This program has absolutely no warranty.\n")); if (output_style == 0) { if (gmon_input & (INPUT_HISTOGRAM | INPUT_CALL_GRAPH)) - output_style = STYLE_FLAT_PROFILE | STYLE_CALL_GRAPH; + { + if (gmon_input & INPUT_HISTOGRAM) + output_style |= STYLE_FLAT_PROFILE; + if (gmon_input & INPUT_CALL_GRAPH) + output_style |= STYLE_CALL_GRAPH; + } else output_style = STYLE_EXEC_COUNTS; |