Avoid confusing error message for trivial profiled testcase.
authorJim Wilson <wilson@tuliptree.org>
Tue, 2 May 2006 18:03:02 +0000 (18:03 +0000)
committerJim Wilson <wilson@tuliptree.org>
Tue, 2 May 2006 18:03:02 +0000 (18:03 +0000)
* gprof.c (main): When setting default output_style, add separate
checks for INPUT_HISTOGRAM and INPUT_CALL_GRAPH.

gprof/ChangeLog
gprof/gprof.c

index 76092417aa6a41b8ffcf87867ea28ae7df5fe277..cbee06217b8c2ead0c015ffbebf778c80433fea7 100644 (file)
@@ -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
index dc6b618fdfd437155a7f742b8b2c07c84d9709c0..b2d6bafdef1671d969d2601ca230b82a20a113e6 100644 (file)
@@ -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;