Use g_info and g_debug properly.
[lttv.git] / ltt / branches / poly / lttv / main / stats.c
index 4265853d83bab764b3ff032d674f7ff65db7156c..8415b4e42218d215458dec1be2a9cd391cfc2deb 100644 (file)
@@ -1,6 +1,25 @@
+/* This file is part of the Linux Trace Toolkit viewer
+ * Copyright (C) 2003-2004 Michel Dagenais
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License Version 2 as
+ * published by the Free Software Foundation;
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, 
+ * MA 02111-1307, USA.
+ */
+
 
 #include <stdio.h>
 #include <lttv/stats.h>
+#include <lttv/lttv.h>
 #include <ltt/facility.h>
 #include <ltt/trace.h>
 #include <ltt/event.h>
@@ -460,7 +479,7 @@ gboolean before_schedchange(void *hook_data, void *call_data)
 
   /* get the information for the process scheduled in */
 
-  process = lttv_state_find_process(&(tfcs->parent), pid_in);
+  process = lttv_state_find_process_or_create(&(tfcs->parent), pid_in);
 
   find_event_tree(tfcs, process->pid_time, tfcs->parent.cpu_name, 
       process->state->t, process->state->n, &(tfcs->current_events_tree), 
@@ -797,7 +816,7 @@ lttv_stats_remove_event_hooks(LttvTracesetStats *self)
            hook.id), hook.h, &g_array_index(after_hooks, LttvTraceHook, k));
       }
     }
-    g_critical("lttv_stats_remove_event_hooks()");
+    g_debug("lttv_stats_remove_event_hooks()");
     g_array_free(before_hooks, TRUE);
     g_array_free(after_hooks, TRUE);
   }
This page took 0.025417 seconds and 4 git commands to generate.