aboutsummaryrefslogtreecommitdiff
path: root/gprof
diff options
context:
space:
mode:
authorJim Wilson <wilson@tuliptree.org>2006-05-02 18:03:02 +0000
committerJim Wilson <wilson@tuliptree.org>2006-05-02 18:03:02 +0000
commitfe541ea9534b4287b345f40f6070b638d98caa15 (patch)
tree5c3d1673a28149b14b1b7fe140564fb459e4dddc /gprof
parente44d194ff6184ec4378ff30fd094cf225bb892c9 (diff)
downloadfsf-binutils-gdb-fe541ea9534b4287b345f40f6070b638d98caa15.zip
fsf-binutils-gdb-fe541ea9534b4287b345f40f6070b638d98caa15.tar.gz
fsf-binutils-gdb-fe541ea9534b4287b345f40f6070b638d98caa15.tar.bz2
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')
-rw-r--r--gprof/ChangeLog5
-rw-r--r--gprof/gprof.c7
2 files changed, 11 insertions, 1 deletions
diff --git a/gprof/ChangeLog b/gprof/ChangeLog
index 7609241..cbee062 100644
--- a/gprof/ChangeLog
+++ b/gprof/ChangeLog
@@ -1,3 +1,8 @@
+2006-05-02 James E Wilson <wilson@specifix.com>
+
+ * gprof.c (main): When setting default output_style, add separate
+ checks for INPUT_HISTOGRAM and INPUT_CALL_GRAPH.
+
2006-04-25 Masaki Muranaka <monaka@monami-software.com>
PR 2587
diff --git a/gprof/gprof.c b/gprof/gprof.c
index dc6b618..b2d6baf 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;