warning fixes
authorcompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Mon, 15 Dec 2008 18:11:25 +0000 (18:11 +0000)
committercompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Mon, 15 Dec 2008 18:11:25 +0000 (18:11 +0000)
git-svn-id: http://ltt.polymtl.ca/svn@3177 04897980-b3bd-0310-b5e0-8ef037075253

33 files changed:
trunk/lttv/ltt/event.c
trunk/lttv/ltt/event.h
trunk/lttv/ltt/marker.h
trunk/lttv/ltt/tracefile.c
trunk/lttv/lttv/lttv/attribute.c
trunk/lttv/lttv/lttv/batchtest.c
trunk/lttv/lttv/lttv/filter.c
trunk/lttv/lttv/lttv/print.c
trunk/lttv/lttv/lttv/state.c
trunk/lttv/lttv/lttv/stats.c
trunk/lttv/lttv/modules/gui/controlflow/drawing.c
trunk/lttv/lttv/modules/gui/controlflow/eventhooks.c
trunk/lttv/lttv/modules/gui/controlflow/lttv_plugin_cfv.c
trunk/lttv/lttv/modules/gui/controlflow/processlist.c
trunk/lttv/lttv/modules/gui/detailedevents/events.c
trunk/lttv/lttv/modules/gui/histogram/histobuttonwidget.c
trunk/lttv/lttv/modules/gui/histogram/histodrawing.c
trunk/lttv/lttv/modules/gui/histogram/histoeventhooks.c
trunk/lttv/lttv/modules/gui/interrupts/interrupts.c
trunk/lttv/lttv/modules/gui/lttvwindow/lttvwindow/callbacks.c
trunk/lttv/lttv/modules/gui/lttvwindow/lttvwindow/init_module.c
trunk/lttv/lttv/modules/gui/lttvwindow/lttvwindow/lttvwindow.c
trunk/lttv/lttv/modules/gui/lttvwindow/lttvwindow/lttvwindow.h
trunk/lttv/lttv/modules/gui/lttvwindow/lttvwindow/lttvwindowtraces.c
trunk/lttv/lttv/modules/gui/resourceview/cfv.h
trunk/lttv/lttv/modules/gui/resourceview/drawing.c
trunk/lttv/lttv/modules/gui/resourceview/eventhooks.c
trunk/lttv/lttv/modules/gui/resourceview/lttv_plugin_cfv.c
trunk/lttv/lttv/modules/gui/resourceview/processlist.c
trunk/lttv/lttv/modules/gui/resourceview/processlist.h
trunk/lttv/lttv/modules/text/precomputeState.c
trunk/lttv/lttv/modules/text/textDump.c
trunk/lttv/lttv/modules/text/textFilter.c

index 46b68af7e692528935c352f5538e942f69bd5c0a..4297bf0c29ad2acfd8147112f26942aedf475214 100644 (file)
@@ -175,7 +175,7 @@ guint32 ltt_event_get_unsigned(LttEvent *e, struct marker_field *f)
     break;
   case 8:
   default:
-    g_critical("ltt_event_get_unsigned : field size %i unknown", f->size);
+    g_critical("ltt_event_get_unsigned : field size %li unknown", f->size);
     return 0;
     break;
   }
@@ -205,7 +205,7 @@ gint32 ltt_event_get_int(LttEvent *e, struct marker_field *f)
     break;
   case 8:
   default:
-    g_critical("ltt_event_get_int : field size %i unknown", f->size);
+    g_critical("ltt_event_get_int : field size %li unknown", f->size);
     return 0;
     break;
   }
@@ -237,7 +237,7 @@ guint64 ltt_event_get_long_unsigned(LttEvent *e, struct marker_field *f)
     return ltt_get_uint64(reverse_byte_order, e->data + f->offset);
     break;
   default:
-    g_critical("ltt_event_get_long_unsigned : field size %i unknown", f->size);
+    g_critical("ltt_event_get_long_unsigned : field size %li unknown", f->size);
     return 0;
     break;
   }
@@ -269,7 +269,7 @@ gint64 ltt_event_get_long_int(LttEvent *e, struct marker_field *f)
     return ltt_get_int64(reverse_byte_order, e->data + f->offset);
     break;
   default:
-    g_critical("ltt_event_get_long_int : field size %i unknown", f->size);
+    g_critical("ltt_event_get_long_int : field size %li unknown", f->size);
     return 0;
     break;
   }
index 0741e0edaa3b514fdf6371478d1b5bf50cb11f7d..8293d15fcf59c59c010604d2527a8037e95a034c 100644 (file)
@@ -47,7 +47,7 @@ struct LttEventPosition {
        uint64_t tsc;            /* Current timestamp counter */
 };
 
-static inline guint16 ltt_event_id(struct LttEvent *event)
+static inline guint16 ltt_event_id(const struct LttEvent *event)
 {
        return event->event_id;
 }
index 4d21e471d48dd4adf6b59e95884f877ddc922b56..3a84749d22d7ae700adc73cca5c131a106e11f26 100644 (file)
@@ -44,7 +44,6 @@ struct marker_data {
 enum marker_id {
   MARKER_ID_SET_MARKER_ID = 0,  /* Static IDs available (range 0-7) */
   MARKER_ID_SET_MARKER_FORMAT,
-  MARKER_ID_DYNAMIC,    /* Dynamic IDs (range: 8-65535)   */
 };
 
 static inline guint16 marker_get_id_from_info(struct marker_data *data,
index 0fb8fbe7a92ed70d079943c5c85a44d7a02b74f0..752b811786aa39d04fccf01f841df17b10b5d433 100644 (file)
 #include <unistd.h>
 #include <math.h>
 #include <glib.h>
+#include <glib/gprintf.h>
 #include <malloc.h>
 #include <sys/mman.h>
 #include <string.h>
+#include <ctype.h>
+#include <inttypes.h>
 
 // For realpath
 #include <limits.h>
@@ -48,6 +51,9 @@
 #include <ltt/ltt-types.h>
 #include <ltt/marker.h>
 
+/* from marker.c */
+extern long marker_update_fields_offsets(struct marker_info *info, const char *data);
+
 /* Tracefile names used in this file */
 
 GQuark LTT_TRACEFILE_NAME_METADATA;
@@ -270,7 +276,7 @@ static gint ltt_tracefile_open(LttTrace *t, gchar * fileName, LttTracefile *tf)
 
   if(munmap(tf->buffer.head,
         PAGE_ALIGN(ltt_subbuffer_header_size()))) {
-    g_warning("unmap size : %u\n",
+    g_warning("unmap size : %zu\n",
         PAGE_ALIGN(ltt_subbuffer_header_size()));
     perror("munmap error");
     g_assert(0);
@@ -289,7 +295,7 @@ static gint ltt_tracefile_open(LttTrace *t, gchar * fileName, LttTracefile *tf)
 unmap_file:
   if(munmap(tf->buffer.head,
         PAGE_ALIGN(ltt_subbuffer_header_size()))) {
-    g_warning("unmap size : %u\n",
+    g_warning("unmap size : %zu\n",
         PAGE_ALIGN(ltt_subbuffer_header_size()));
     perror("munmap error");
     g_assert(0);
@@ -363,7 +369,7 @@ static int get_tracefile_name_number(gchar *raw_name,
 {
   guint raw_name_len = strlen(raw_name);
   gchar char_name[PATH_MAX];
-  int i;
+  unsigned int i;
   int underscore_pos;
   long int cpu_num;
   gchar *endptr;
@@ -472,7 +478,7 @@ void compute_tracefile_group(GQuark key_id,
                              GArray *group,
                              struct compute_tracefile_group_args *args)
 {
-  int i;
+  unsigned int i;
   LttTracefile *tf;
 
   for(i=0; i<group->len; i++) {
@@ -486,7 +492,7 @@ void compute_tracefile_group(GQuark key_id,
 static void ltt_tracefile_group_destroy(gpointer data)
 {
   GArray *group = (GArray *)data;
-  int i;
+  unsigned int i;
   LttTracefile *tf;
 
   if (group->len > 0)
@@ -499,10 +505,10 @@ static void ltt_tracefile_group_destroy(gpointer data)
   g_array_free(group, TRUE);
 }
 
-static gboolean ltt_tracefile_group_has_cpu_online(gpointer data)
+static __attribute__ ((__unused__)) gboolean ltt_tracefile_group_has_cpu_online(gpointer data)
 {
   GArray *group = (GArray *)data;
-  int i;
+  unsigned int i;
   LttTracefile *tf;
 
   for(i=0; i<group->len; i++) {
@@ -651,7 +657,6 @@ static int open_tracefiles(LttTrace *trace, gchar *root_path, gchar *relative_pa
 static int ltt_process_metadata_tracefile(LttTracefile *tf)
 {
   int err;
-  guint i;
   
   while(1) {
     err = ltt_tracefile_read_seek(tf);
@@ -755,7 +760,8 @@ LttTrace *ltt_trace_open(const gchar *pathname)
   LttTrace  * t;
   LttTracefile *tf;
   GArray *group;
-  int i, ret;
+  unsigned int i;
+  int ret;
   ltt_subbuffer_header_t *header;
   DIR *dir;
   struct dirent *entry;
@@ -903,7 +909,7 @@ static void group_time_span_get(GQuark name, gpointer data, gpointer user_data)
           (struct tracefile_time_span_get_args*)user_data;
 
   GArray *group = (GArray *)data;
-  int i;
+  unsigned int i;
   LttTracefile *tf;
   LttTime tmp_start;
   LttTime tmp_end;
@@ -1226,10 +1232,10 @@ static void print_debug_event_header(LttEvent *ev, void *start_pos, void *end_po
   unsigned int offset = 0;
   int i, j;
 
-  g_printf("Event header (tracefile %s offset %llx):\n",
+  g_printf("Event header (tracefile %s offset %" PRIx64 "):\n",
     g_quark_to_string(ev->tracefile->long_name),
-    ((uint64_t)ev->tracefile->buffer.index * ev->tracefile->buf_size)
-      + (long)start_pos - (long)ev->tracefile->buffer.head);
+          ((uint64_t)ev->tracefile->buffer.index * ev->tracefile->buf_size)
+          + (long)start_pos - (long)ev->tracefile->buffer.head);
 
   while (offset < (long)end_pos - (long)start_pos) {
     g_printf("%8lx", (long)start_pos - (long)ev->tracefile->buffer.head + offset);
@@ -1445,10 +1451,10 @@ static void print_debug_event_data(LttEvent *ev)
   if (!max(ev->event_size, ev->data_size))
     return;
 
-  g_printf("Event data (tracefile %s offset %llx):\n",
-    g_quark_to_string(ev->tracefile->long_name),
-    ((uint64_t)ev->tracefile->buffer.index * ev->tracefile->buf_size)
-      + (long)ev->data - (long)ev->tracefile->buffer.head);
+  g_printf("Event data (tracefile %s offset %" PRIx64 "):\n",
+          g_quark_to_string(ev->tracefile->long_name),
+          ((uint64_t)ev->tracefile->buffer.index * ev->tracefile->buf_size)
+          + (long)ev->data - (long)ev->tracefile->buffer.head);
 
   while (offset < max(ev->event_size, ev->data_size)) {
     g_printf("%8lx", (long)ev->data + offset
@@ -1489,7 +1495,6 @@ static void print_debug_event_data(LttEvent *ev)
 void ltt_update_event_size(LttTracefile *tf)
 {
   off_t size = 0;
-  char *tscdata;
   struct marker_info *info;
 
   if (tf->name == LTT_TRACEFILE_NAME_METADATA) {
@@ -2536,7 +2541,7 @@ LttTime ltt_trace_start_time_monotonic(LttTrace *t)
   return t->start_time_from_tsc;
 }
 
-static LttTracefile *ltt_tracefile_new()
+static __attribute__ ((__unused__)) LttTracefile *ltt_tracefile_new()
 {
   LttTracefile *tf;
   tf = g_new(LttTracefile, 1);
@@ -2544,12 +2549,12 @@ static LttTracefile *ltt_tracefile_new()
   return tf;
 }
 
-static void ltt_tracefile_destroy(LttTracefile *tf)
+static __attribute__ ((__unused__)) void ltt_tracefile_destroy(LttTracefile *tf)
 {
   g_free(tf);
 }
 
-static void ltt_tracefile_copy(LttTracefile *dest, const LttTracefile *src)
+static __attribute__ ((__unused__)) void ltt_tracefile_copy(LttTracefile *dest, const LttTracefile *src)
 {
   *dest = *src;
 }
index eab857be844f1997b4dcea3635c6d913f7f0beb0..9966b44814d5aa39c2fa5bc8871e33e59f103958 100644 (file)
@@ -142,11 +142,11 @@ LttvAttributeValue
 lttv_attribute_add(LttvAttribute *self, LttvAttributeName name, 
     LttvAttributeType t)
 {
-  unsigned i;
+  unsigned int i;
 
   Attribute a, *pa;
 
-  i = (unsigned)g_hash_table_lookup(self->names, GUINT_TO_POINTER(name));
+  i = GPOINTER_TO_UINT(g_hash_table_lookup(self->names, GUINT_TO_POINTER(name)));
   if(i != 0) g_error("duplicate entry in attribute table");
 
   a.name = name;
@@ -165,11 +165,11 @@ LttvAttributeValue
 lttv_attribute_add_unnamed(LttvAttribute *self, LttvAttributeName name, 
     LttvAttributeType t)
 {
-  unsigned i;
+  unsigned int i;
 
   Attribute a, *pa;
 
-  i = (unsigned)g_hash_table_lookup(self->names, GUINT_TO_POINTER(name));
+  i = GPOINTER_TO_UINT(g_hash_table_lookup(self->names, GUINT_TO_POINTER(name)));
   if(i != 0) g_error("duplicate entry in attribute table");
 
   a.name = name;
@@ -215,9 +215,9 @@ lttv_attribute_remove(LttvAttribute *self, unsigned i)
 void 
 lttv_attribute_remove_by_name(LttvAttribute *self, LttvAttributeName name)
 {
-  unsigned i;
+  unsigned int i;
 
-  i = (unsigned)g_hash_table_lookup(self->names, GUINT_TO_POINTER(name));
+  i = GPOINTER_TO_UINT(g_hash_table_lookup(self->names, GUINT_TO_POINTER(name)));
   if(unlikely(i == 0)) g_error("remove by name non existent attribute");
 
   lttv_attribute_remove(self, i - 1);
@@ -231,13 +231,13 @@ lttv_attribute_remove_by_name(LttvAttribute *self, LttvAttributeName name)
 /*CHECK*/LttvAttribute* 
 lttv_attribute_find_subdir(LttvAttribute *self, LttvAttributeName name)
 {
-  unsigned i;
+  unsigned int i;
 
   Attribute a;
 
   LttvAttribute *new;
   
-  i = (unsigned)g_hash_table_lookup(self->names, GUINT_TO_POINTER(name));
+  i = GPOINTER_TO_UINT(g_hash_table_lookup(self->names, GUINT_TO_POINTER(name)));
   if(likely(i != 0)) {
     a = g_array_index(self->attributes, Attribute, i - 1);
     if(likely(a.type == LTTV_GOBJECT && LTTV_IS_IATTRIBUTE(a.value.dv_gobject))) {
@@ -253,13 +253,13 @@ lttv_attribute_find_subdir(LttvAttribute *self, LttvAttributeName name)
 /*CHECK*/LttvAttribute* 
 lttv_attribute_find_subdir_unnamed(LttvAttribute *self, LttvAttributeName name)
 {
-  unsigned i;
+  unsigned int i;
 
   Attribute a;
 
   LttvAttribute *new;
   
-  i = (unsigned)g_hash_table_lookup(self->names, GUINT_TO_POINTER(name));
+  i = GPOINTER_TO_UINT(g_hash_table_lookup(self->names, GUINT_TO_POINTER(name)));
   if(likely(i != 0)) {
     a = g_array_index(self->attributes, Attribute, i - 1);
     if(likely(a.type == LTTV_GOBJECT && LTTV_IS_IATTRIBUTE(a.value.dv_gobject))) {
@@ -277,11 +277,11 @@ gboolean
 lttv_attribute_find(LttvAttribute *self, LttvAttributeName name, 
     LttvAttributeType t, LttvAttributeValue *v)
 {
-  unsigned i;
+  unsigned int i;
 
   Attribute *a;
 
-  i = (unsigned)g_hash_table_lookup(self->names, GUINT_TO_POINTER(name));
+  i = GPOINTER_TO_UINT(g_hash_table_lookup(self->names, GUINT_TO_POINTER(name)));
   if(likely(i != 0)) {
     a = &g_array_index(self->attributes, Attribute, i - 1);
     if(unlikely(a->type != t)) return FALSE;
@@ -301,7 +301,7 @@ lttv_attribute_find_unnamed(LttvAttribute *self, LttvAttributeName name,
 
   Attribute *a;
 
-  i = (unsigned)g_hash_table_lookup(self->names, GUINT_TO_POINTER(name));
+  i = GPOINTER_TO_UINT(g_hash_table_lookup(self->names, GUINT_TO_POINTER(name)));
   if(likely(i != 0)) {
     a = &g_array_index(self->attributes, Attribute, i - 1);
     if(unlikely(a->type != t)) return FALSE;
index 2f5fce8391366600c7884addf640b461dd95895e..be60bb41e2b00d5474e35fff115f6e262d376954 100644 (file)
@@ -25,6 +25,7 @@
 #endif
 
 #include <string.h>
+#include <inttypes.h>
 #include <lttv/lttv.h>
 #include <lttv/attribute.h>
 #include <lttv/hook.h>
@@ -170,7 +171,7 @@ gboolean trace_event(void __UNUSED__ *hook_data, void *call_data)
   LttEvent *e = ltt_tracefile_get_event(tfs->parent.tf);
   ltt_event_position(e, a_event_position);
   ltt_event_position_get(a_event_position, &tf, &nb_block, &offset, &tsc);
-  fprintf(stderr,"Event %s %lu.%09lu [%u 0x%x tsc %llu]\n",
+  fprintf(stderr, "Event %s %lu.%09lu [%u 0x%x tsc %" PRIu64 "]\n",
       g_quark_to_string(marker_get_info_from_id(tf->mdata,
                        ltt_event_id(e))->name),
       tfs->parent.timestamp.tv_sec, tfs->parent.timestamp.tv_nsec,
@@ -334,7 +335,7 @@ static void compute_tracefile(LttTracefile *tracefile, void *hook_data)
     ltt_event_position(event, a_event_position);
     ltt_event_position_get(a_event_position, &tf_pos, &nb_block, &offset, &tsc);
     //fprintf(fp,"%s.%s: %llu %lu.%09lu position %u/%u\n", 
-    fprintf(fp, "%s: %llu %lu.%09lu position %u/%u, tracefile %s\n", 
+    fprintf(fp, "%s: %" PRIu64 " %lu.%09lu position %u/%u, tracefile %s\n",
        g_quark_to_string(minfo->name),
         tsc, (unsigned long)time.tv_sec, 
         (unsigned long)time.tv_nsec, 
index 3c53e38791c7fd081a407015fc2503d1575883ae..71eb619c50cede72a10b7aa575c8e9be37a8fefa 100644 (file)
@@ -1891,7 +1891,7 @@ lttv_filter_tree_parse(
     
   gboolean lresult = FALSE, rresult = FALSE;
 
-  LttvTraceState *ts;
+  LttvTraceState *ts = NULL;
   LttvTracefileState *tfs = (LttvTracefileState*)context;
   if(tc)
     ts = (LttvTraceState*)tc;
index 8bba69719df48a48d69ce92114c2f8d7c0750926..c678b4e44513665cda964d396f1ea7ac82c97f85 100644 (file)
@@ -42,6 +42,7 @@
 #include <ctype.h>
 #include <ltt/ltt-private.h>
 #include <string.h>
+#include <inttypes.h>
 
 static inline void print_enum_events(LttEvent *e, struct marker_field *f,
                       guint64 value, GString *s, LttvTracefileState *tfs)
@@ -140,7 +141,7 @@ void lttv_print_field(LttEvent *e, struct marker_field *f, GString *s,
         if(name)
           g_string_append_printf(s, "%s = ", g_quark_to_string(name));
       }
-      g_string_append_printf(s, "0x%llx", ltt_event_get_long_unsigned(e,f));
+      g_string_append_printf(s, "0x%" PRIx64, ltt_event_get_long_unsigned(e,f));
       //g_string_append_printf(s, type->fmt, ltt_event_get_long_unsigned(e,f));
       break;
 
@@ -271,12 +272,13 @@ void lttv_event_to_string(LttEvent *e, GString *s,
         g_quark_to_string(ltt_tracefile_name(tfs->parent.tf)),
         cpu);
     /* Print the process id and the state/interrupt type of the process */
-    g_string_append_printf(s,", %u, %u, %s, %s, %u, 0x%llX, %s", process->pid,
-        process->tgid,
-        g_quark_to_string(process->name),
-        g_quark_to_string(process->brand),
-        process->ppid, process->current_function,
-        g_quark_to_string(process->state->t));
+    g_string_append_printf(s,", %u, %u, %s, %s, %u, 0x%" PRIx64", %s",
+                          process->pid,
+                          process->tgid,
+                          g_quark_to_string(process->name),
+                          g_quark_to_string(process->brand),
+                          process->ppid, process->current_function,
+                          g_quark_to_string(process->state->t));
   }
   
   if(marker_get_num_fields(info) == 0) return;
index 1a3d907db0adfb81f6447485c5d1ae1f31afc4eb..e6278ac8070bccba3d3a504326fda047c8ec0978 100644 (file)
@@ -32,6 +32,7 @@
 #include <stdio.h>
 #include <string.h>
 #include <ltt/ltt-private.h>
+#include <inttypes.h>
 
 /* Comment :
  * Mathieu Desnoyers
@@ -646,12 +647,12 @@ init(LttvTracesetState *self, LttvTraceset *ts)
         /* It's a Usertrace */
         guint tid = ltt_tracefile_tid(tfcs->parent.tf);
         GTree *usertrace_tree = (GTree*)g_hash_table_lookup(tcs->usertraces,
-            (gconstpointer)tid);
+                                                           GUINT_TO_POINTER(tid));
         if(!usertrace_tree) {
           usertrace_tree = g_tree_new_full(compare_usertraces,
               NULL, free_usertrace_key, NULL);
           g_hash_table_insert(tcs->usertraces,
-              (gpointer)tid, usertrace_tree);
+                             GUINT_TO_POINTER(tid), usertrace_tree);
         }
         LttTime *timestamp = g_new(LttTime, 1);
         *timestamp = ltt_interpolate_time_from_tsc(tfcs->parent.tf,
@@ -761,7 +762,7 @@ static void write_process_state(gpointer key, gpointer value,
 
   for(i = 0 ; i < process->user_stack->len; i++) {
     address = g_array_index(process->user_stack, guint64, i);
-    fprintf(fp, "    <USER_STACK ADDRESS=\"%llu\"/>\n",
+    fprintf(fp, "    <USER_STACK ADDRESS=\"%" PRIu64 "\"/>\n",
             address);
   }
 
@@ -815,7 +816,7 @@ void lttv_state_write(LttvTraceState *self, LttTime t, FILE *fp)
     else {
       ltt_event_position(e, ep);
       ltt_event_position_get(ep, &tf, &nb_block, &offset, &tsc);
-      fprintf(fp, " BLOCK=%u OFFSET=%u TSC=%llu/>\n", nb_block, offset,
+      fprintf(fp, " BLOCK=%u OFFSET=%u TSC=%" PRIu64 "/>\n", nb_block, offset,
           tsc);
     }
   }
@@ -1536,7 +1537,7 @@ static void state_save(LttvTraceState *self, LttvAttribute *container)
       guint64 tsc;
       LttTracefile *tf;
       ltt_event_position_get(ep, &tf, &nb_block, &offset, &tsc);
-      g_info("Block %u offset %u tsc %llu time %lu.%lu", nb_block, offset,
+      g_info("Block %u offset %u tsc %" PRIu64 " time %lu.%lu", nb_block, offset,
           tsc,
           tfcs->parent.timestamp.tv_sec, tfcs->parent.timestamp.tv_nsec);
     }
@@ -2242,7 +2243,8 @@ static LttvTracefileState *ltt_state_usertrace_find(LttvTraceState *tcs,
    * timestamp the lowest, but higher or equal to "timestamp". */
   res.time = timestamp;
   res.best = NULL;
-  GTree *usertrace_tree = g_hash_table_lookup(tcs->usertraces, (gpointer)pid);
+  GTree *usertrace_tree = g_hash_table_lookup(tcs->usertraces,
+                                             GUINT_TO_POINTER(pid));
   if(usertrace_tree) {
     g_tree_search(usertrace_tree, search_usertrace, &res);
     if(res.best)
@@ -2571,7 +2573,7 @@ static gboolean soft_irq_raise(void *hook_data, void *call_data)
   } else {
     /* Fixup an incomplete irq table */
     GString *string = g_string_new("");
-    g_string_printf(string, "softirq %llu", softirq);
+    g_string_printf(string, "softirq %" PRIu64, softirq);
     submode = g_quark_from_string(string->str);
     g_string_free(string, TRUE);
   }
@@ -2708,7 +2710,7 @@ static void pop_function(LttvTracefileState *tfs, guint64 funcptr)
   if(process->current_function != funcptr){
     g_info("Different functions (%lu.%09lu): ignore it\n",
         tfs->parent.timestamp.tv_sec, tfs->parent.timestamp.tv_nsec);
-    g_info("process state has %llu when pop_function is %llu\n",
+    g_info("process state has %" PRIu64 " when pop_function is %" PRIu64 "\n",
         process->current_function, funcptr);
     g_info("{ %u, %u, %s, %s, %s }\n",
         process->pid,
@@ -3957,7 +3959,7 @@ void lttv_state_traceset_seek_time_closest(LttvTracesetState *self, LttTime t)
 
   gboolean is_named;
 
-  LttvAttribute *saved_states_tree, *saved_state_tree, *closest_tree;
+  LttvAttribute *saved_states_tree, *saved_state_tree, *closest_tree = NULL;
 
   //g_tree_destroy(self->parent.pqueue);
   //self->parent.pqueue = g_tree_new(compare_tracefile);
index 6aef4403c61584d7ed869d70c6455cb917c695c8..24b4ad4caf81db5a8fde00561486c0da4bd0a8c1 100644 (file)
@@ -21,6 +21,7 @@
 #endif
 
 #include <stdio.h>
+#include <inttypes.h>
 #include <lttv/module.h>
 #include <lttv/stats.h>
 #include <lttv/lttv.h>
@@ -398,7 +399,7 @@ find_event_tree(LttvTracefileStats *tfcs,
   gint ret;
 
   ret = snprintf(fstring, MAX_64_HEX_STRING_LEN-1,
-        "0x%llX", function) > 0;
+        "0x%" PRIX64, function) > 0;
   g_assert(ret > 0);
   fstring[MAX_64_HEX_STRING_LEN-1] = '\0';
 
index cde87124dd71e0791c23aa3a395bacc0acc861c0..46c83b6e611f4bdc074d9750f8e407c41376e267 100644 (file)
@@ -431,7 +431,7 @@ static void set_last_start(gpointer key, gpointer value, gpointer user_data)
 {
   ProcessInfo *process_info = (ProcessInfo*)key;
   HashedProcessData *hashed_process_data = (HashedProcessData*)value;
-  guint x = (guint)user_data;
+  guint x = GPOINTER_TO_UINT(user_data);
 
   hashed_process_data->x.over = x;
   hashed_process_data->x.over_used = FALSE;
@@ -467,7 +467,7 @@ void drawing_data_request_begin(EventsRequest *events_request, LttvTracesetState
           &x);
 
   g_hash_table_foreach(cfd->process_list->process_hash, set_last_start,
-                            (gpointer)x);
+                      GUINT_TO_POINTER(x));
 
 }
 
index db1604c447f76d02d94cbace3e06c81322eff30b..287ddb1f425357b0331bc706e6deba18998d1f55 100644 (file)
@@ -2590,7 +2590,8 @@ int after_chunk(void *hook_data, void *call_data)
   guint nb_trace = lttv_traceset_number(traceset);
 
   /* Only execute when called for the first trace's events request */
-  if(!process_list->current_hash_data) return;
+  if(!process_list->current_hash_data)
+         return 0;
 
   for(i = 0 ; i < nb_trace ; i++) {
     g_free(process_list->current_hash_data[i]);
index d8b005ab954e096518922096cf563fc6237fabe4..c23cfabe5025f4c68fa2b1711c7c43030f23ed05 100644 (file)
@@ -20,6 +20,7 @@
 #include "lttv_plugin_cfv.h"
 #include <lttvwindow/lttvwindow.h>
 #include "drawing.h"
+#include "eventhooks.h"
 
 /* 
  * forward definitions
index 383c3e8e658cd1c6308f599d1ee37a57a36131f9..506dae1cc279b23589de399a05ef7316e414283b 100644 (file)
@@ -215,9 +215,9 @@ static void update_pixmap_size_each(ProcessInfo *key,
 
 void update_pixmap_size(ProcessList *process_list, guint width)
 {
-  g_hash_table_foreach(process_list->process_hash, 
-                       (GHFunc)update_pixmap_size_each,
-                       (gpointer)width);
+  g_hash_table_foreach(process_list->process_hash,
+                      (GHFunc)update_pixmap_size_each,
+                      GUINT_TO_POINTER(width));
 }
 
 
index 9376349c9bcfbf0dfb2fbd55ce61fbb9b2f83801..22bb4208eb11c31c7500a6eda6ff7b11b64eda67 100644 (file)
@@ -55,6 +55,7 @@
 #include <ltt/ltt.h>
 #include <ltt/event.h>
 #include <ltt/trace.h>
+#include <lttv/lttv.h>
 #include <lttv/module.h>
 #include <lttv/hook.h>
 #include <lttv/tracecontext.h>
@@ -1226,7 +1227,7 @@ void tree_v_size_allocate_cb (GtkWidget *widget, GtkAllocation *alloc, gpointer
  
   g_debug("size allocate %p : last_num_visible_events : %d",
            event_viewer_data, last_num_visible_events);
-  g_debug("num_visible_events : %d, value %lu",
+  g_debug("num_visible_events : %d, value %f",
            event_viewer_data->num_visible_events,
           event_viewer_data->vadjust_c->value);
 
@@ -1360,6 +1361,7 @@ static void get_events(double new_value, EventViewerData *event_viewer_data)
     break;
   case SCROLL_JUMP:
     g_debug("get_events : SCROLL_JUMP");
+    relative_position = 0;
     seek_by_time = 1;
     break;
   case SCROLL_NONE:
@@ -1416,7 +1418,7 @@ static void get_events(double new_value, EventViewerData *event_viewer_data)
    */
     if(relative_position > 0) {
       guint count;
-      count += lttv_process_traceset_seek_n_forward(tsc, relative_position,
+      count = lttv_process_traceset_seek_n_forward(tsc, relative_position,
           events_check_handler,
           &event_viewer_data->tab->stop_foreground,
           event_viewer_data->main_win_filter,
index 279be946dd04fdb300fbf6cd14b6e313f5fd9cd6..d4a87f51789a6b07bc5b4e6144bc12465874c7cb 100644 (file)
 #include "histobuttonwidget.h"
 #include "histodrawing.h"
 #include "histodrawitem.h"
-#include "stock_zoom_in_24.xpm"
-#include "stock_zoom_out_24.xpm"
-#include "stock_zoom_fit_24.xpm"
 
+extern void histogram_show(HistoControlFlowData *histocontrol_flow_data,
+                          guint draw_begin, guint draw_end);
+
+#ifndef g_info
 #define g_info(format...) g_log (G_LOG_DOMAIN, G_LOG_LEVEL_INFO, format)
+#endif
+#ifndef g_debug
 #define g_debug(format...) g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, format)
+#endif
 
 /* Preallocated Size of the index_to_pixmap array */
 #define ALLOCATE_PROCESSES 1000
@@ -113,7 +117,7 @@ static GtkWidget *xpm_label_box( gchar* xpm_filename,
 
     /* Now on to the image stuff */
         
-    pixbufP = gdk_pixbuf_new_from_xpm_data((const char*)xpm_filename);
+    pixbufP = gdk_pixbuf_new_from_xpm_data((const char **)&xpm_filename);
     image =  gtk_image_new_from_pixbuf(pixbufP);
 
     /* Create a label for the button */
@@ -148,9 +152,9 @@ ButtonWidget *histo_buttonwidget_construct(HistoControlFlowData *histocontrol_fl
   buttonwidget ->buttonFit =gtk_button_new ();
 
 /* This calls our box creating function */
-  boxPlus = xpm_label_box (stock_zoom_in_24, "vertical");
-  boxMinus = xpm_label_box (stock_zoom_out_24, "vertical");
-  boxfit = xpm_label_box (stock_zoom_fit_24, "vertical");
+  boxPlus = xpm_label_box ("stock_zoom_in_24.xpm", "vertical");
+  boxMinus = xpm_label_box ("stock_zoom_out_24.xpm", "vertical");
+  boxfit = xpm_label_box ("stock_zoom_fit_24.xpm", "vertical");
 
 /* Pack and show all widgets */
   gtk_widget_show (boxPlus);
index 53addbcec1909a9cd28fbc21a6c13a057bea6715..0b2adcbe28656bda80e16ffc8a3336f1ec856d21 100644 (file)
 #include "histoeventhooks.h"
 #include "histocfv.h"
 
+#ifndef g_info
 #define g_info(format...) g_log (G_LOG_DOMAIN, G_LOG_LEVEL_INFO, format)
+#endif
+#ifndef g_debug
 #define g_debug(format...) g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, format)
+#endif
 
 //FIXME
 // fixed #define TRACE_NUMBER 0
@@ -168,7 +172,7 @@ void histo_drawing_request_expose(EventsRequest *events_request,
   HistoControlFlowData *cfd = events_request->viewer_data;
   histoDrawing_t *drawing = cfd->drawing;
    
-  gint x, x_end, width;
+  guint x, x_end, width;
   LttvTracesetContext *tsc = (LttvTracesetContext*)tss;
     
   TimeWindow time_window = 
@@ -771,6 +775,7 @@ void histo_drawing_clear(histoDrawing_t *drawing,guint clear_from,guint clear_to
       TRUE,
       0,0,
       drawing->drawing_area->allocation.width,drawing->drawing_area->allocation.height );
+*/
    
   /* ask for the buffer to be redrawn */
 //enabled again for histogram.
@@ -1073,6 +1078,7 @@ histo_motion_notify_ruler(GtkWidget *widget, GdkEventMotion *event, gpointer use
 {
   //g_debug("motion");
   //eventually follow mouse and show time here
+       return FALSE;
 }
 
 static gboolean
@@ -1080,6 +1086,7 @@ histo_motion_notify_vertical_ruler(GtkWidget *widget, GdkEventMotion *event, gpo
 {
   //g_debug("motion");
   //eventually follow mouse and show time here
+       return FALSE;
 }
 
 
@@ -1141,7 +1148,7 @@ histo_expose_vertical_ruler( GtkWidget *widget, GdkEventExpose *event, gpointer
                    drawing->vertical_ruler-> allocation.width-7, 1);
 
 
-  snprintf(text, 255, "%lu",0);
+  snprintf(text, 255, "%d", 0);
 
   pango_layout_set_text(layout, text, -1);
   pango_layout_get_pixel_extents(layout, &ink_rect, NULL);
index b0781b10bb3dccc31b6ca88c3a799c28a064d0c7..05ef78dbf194469bd9a17e051925c4e011a7b570 100644 (file)
@@ -615,7 +615,7 @@ gint histo_update_time_window_hook(void *hook_data, void *call_data)
 
   histo_drawing_update_vertical_ruler(drawing);
 
-
+#if 0
 
 /*//  if( histo_new_time_window->time_width.tv_sec == histo_old_time_window->time_width.tv_sec
   && histo_new_time_window->time_width.tv_nsec == histo_old_time_window->time_width.tv_nsec)
@@ -834,6 +834,8 @@ gint histo_update_time_window_hook(void *hook_data, void *call_data)
 
   histo_drawing_update_vertical_ruler(drawing);
 */
+#endif
+
 //disabled for histogram, always redraw whole screen. 
   return 0;
 }
@@ -1111,7 +1113,9 @@ int histo_after_chunk(void *hook_data, void *call_data)
 
   histoDrawing_t *drawing = histocontrol_flow_data->drawing;
 
-  if(!histocontrol_flow_data->chunk_has_begun) return;
+  if(!histocontrol_flow_data->chunk_has_begun)
+         return 0;
+
   histocontrol_flow_data->chunk_has_begun = TRUE;
 
   if(tfc != NULL)
index 949668bd8160044b79ad2e87c67d8da846d8cc68..bea4a10214089869cf35bff73a5d21f4a5cae284 100644 (file)
@@ -1014,7 +1014,7 @@ static gboolean DisplayViewer(void *hook_data, void *call_data)
   guint maxIRQduration;
   guint minIRQduration;
   double periodInSec;
-  int periodInNsec;
+  int periodInNsec = 0;
   char maxIrqHandler[80];
   char minIrqHandler[80];
   InterruptEventData *event_data = (InterruptEventData *)hook_data;
@@ -1034,14 +1034,14 @@ static gboolean DisplayViewer(void *hook_data, void *call_data)
     maxIRQduration *= NANOSECONDS_PER_SECOND;
     maxIRQduration += element.max_irq_handler.duration.tv_nsec;
     
-    sprintf(maxIrqHandler, "%d [%d.%d - %d.%d]",maxIRQduration, element.max_irq_handler.start_time.tv_sec, \
+    sprintf(maxIrqHandler, "%d [%lu.%lu - %lu.%lu]",maxIRQduration, element.max_irq_handler.start_time.tv_sec, \
     element.max_irq_handler.start_time.tv_nsec, element.max_irq_handler.end_time.tv_sec, \
     element.max_irq_handler.end_time.tv_nsec) ;
     
     minIRQduration  =  element.min_irq_handler.duration.tv_sec;
     minIRQduration *= NANOSECONDS_PER_SECOND;
     minIRQduration += element.min_irq_handler.duration.tv_nsec;
-    sprintf(minIrqHandler, "%d [%d.%d - %d.%d]",minIRQduration, element.min_irq_handler.start_time.tv_sec, \
+    sprintf(minIrqHandler, "%d [%lu.%lu - %lu.%lu]",minIRQduration, element.min_irq_handler.start_time.tv_sec, \
     element.min_irq_handler.start_time.tv_nsec, element.min_irq_handler.end_time.tv_sec, \
     element.min_irq_handler.end_time.tv_nsec) ;
  
index 97e7556126a6cfa2c44b12e1101ebc9ff25e10bb..a47307d25793904645651b97e7db6dbaf3fbe79c 100644 (file)
@@ -764,7 +764,7 @@ void move_down_viewer(GtkWidget * widget, gpointer user_data)
     return;
   } else {
     LttvPluginTab *ptab;
-    ptab = (Tab *)g_object_get_data(G_OBJECT(page), "Tab_Plugin");
+    ptab = g_object_get_data(G_OBJECT(page), "Tab_Plugin");
     tab = ptab->tab;
   }
 
@@ -839,7 +839,7 @@ void delete_viewer(GtkWidget * widget, gpointer user_data)
     return;
   } else {
     LttvPluginTab *ptab;
-    ptab = (Tab *)g_object_get_data(G_OBJECT(page), "Tab_Plugin");
+    ptab = g_object_get_data(G_OBJECT(page), "Tab_Plugin");
     tab = ptab->tab;
   }
 
@@ -2577,7 +2577,7 @@ void
 on_trace_facility_activate              (GtkMenuItem     *menuitem,
                                         gpointer         user_data)
 {
-  g_info("Trace facility selector: %s\n");  
+       g_info("Trace facility selector: %s\n", "");
 }
 
 
@@ -2895,7 +2895,7 @@ on_unload_module_activate              (GtkMenuItem     *menuitem,
   GError *error = NULL;
   MainWindow * mw_data = get_window_data_struct((GtkWidget*)menuitem);
 
-  LttvLibrary *library;
+  LttvLibrary *library = NULL;
   {
     GPtrArray *name;
     guint nb,i;
@@ -4349,10 +4349,10 @@ MainWindow *construct_main_window(MainWindow * parent)
     LttvIAttribute *attributes_global = 
        LTTV_IATTRIBUTE(lttv_global_attributes());
 
-    g_assert(attribute = 
-      LTTV_ATTRIBUTE(lttv_iattribute_find_subdir(
-                                LTTV_IATTRIBUTE(attributes_global),
-                                LTTV_VIEWER_CONSTRUCTORS)));
+    attribute = LTTV_ATTRIBUTE(lttv_iattribute_find_subdir(
+                                      LTTV_IATTRIBUTE(attributes_global),
+                                      LTTV_VIEWER_CONSTRUCTORS));
+    g_assert(attribute);
 
     name = g_quark_from_string("guievents");
     type = lttv_iattribute_get_by_name(LTTV_IATTRIBUTE(attribute),
index ffbf291772ea40df03f58c6aa85ca0aee889b113..83d35c96ca0ed274bd1f4c0cb38d2a28e4318c93 100644 (file)
@@ -240,10 +240,6 @@ static void destroy_walk(gpointer data, gpointer user_data)
  */
 static void destroy() {
 
-  LttvAttributeValue value;  
-  LttvTrace *trace;
-  GSList *iter = NULL;
-  
   lttv_option_remove("trace");
 
   lttv_hooks_remove_data(main_hooks, window_creation_hook, NULL);
index 529e4ac6c21aed90cb33f611b543bd69b7dccd02..ebbaa06fd37fdeb050237b779238d2de4660136e 100644 (file)
@@ -1113,7 +1113,6 @@ void events_request_free(EventsRequest *events_request)
   if(events_request->end_position != NULL)
        lttv_traceset_context_position_destroy(events_request->end_position);
   if(events_request->hooks != NULL) {
-    guint i;
     GArray *hooks = events_request->hooks;
     lttv_trace_hook_remove_all(&hooks);
     g_array_free(events_request->hooks, TRUE);
index df04a3f00cae399331af4a1dcf41ab6d5eacde5e..30fa5c6aabc7e1ac06a081a0ae98f26c44bc13c7 100644 (file)
@@ -850,10 +850,7 @@ static inline void lttvwindow_events_request_enable(void)
 }
 
 
-
-
-
-
-
+void current_position_change_manager(Tab *tab,
+                                     LttvTracesetContextPosition *pos);
 
 #endif //LTTVWINDOW_H
index 375eb689e97133977b988261624c79c2b91fbd7f..787c5a70e12b32ee28c55f53a68f21ceb900e125 100644 (file)
@@ -28,6 +28,7 @@
 #include <sys/stat.h>
 #include <unistd.h>
 #include <string.h>
+#include <inttypes.h>
 
 #include <ltt/time.h>
 #include <ltt/trace.h>
@@ -79,7 +80,7 @@ __EXPORT LttvTrace *lttvwindowtraces_get_trace_by_name(gchar *path)
   for(i=0;i<lttvwindowtraces_get_number();i++) {
     LttvTrace *trace_v = lttvwindowtraces_get_trace(i);
     LttTrace *trace;
-    gchar *name;
+    const gchar *name;
     g_assert(trace_v != NULL);
 
     trace = lttv_trace(trace_v);
@@ -153,7 +154,8 @@ void lttvwindowtraces_add_trace(LttvTrace *trace)
         g_quark_to_string(ltt_trace_name(lttv_trace(trace))));
     return;
   }
-  result = snprintf(attribute_path, PATH_MAX, "%llu:%llu", buf.st_dev, buf.st_ino);
+  result = snprintf(attribute_path, PATH_MAX, "%" PRIu64 ":%" PRIu64,
+                   buf.st_dev, buf.st_ino);
   g_assert(result >= 0);
   
   attribute = 
@@ -805,7 +807,7 @@ void lttvwindowtraces_call_before_chunk(LttvAttributeName module_name,
                                      LTTV_EVENT_HOOK_BY_ID_CHANNEL,
                                      &value);
   if(type == LTTV_POINTER) {
-    event_hook_by_id_channel = (LttvHooksById*)*(value.v_pointer);
+    event_hook_by_id_channel = (LttvHooksByIdChannelArray*)*(value.v_pointer);
   }
 
   lttv_process_traceset_begin(tsc,
@@ -829,7 +831,7 @@ void lttvwindowtraces_call_after_chunk(LttvAttributeName module_name,
   LttvHooks *after_chunk_trace=NULL;
   LttvHooks *after_chunk_tracefile=NULL;
   LttvHooks *event_hook=NULL;
-  LttvHooksById *event_hook_by_id_channel=NULL;
+  LttvHooksByIdChannelArray *event_hook_by_id_channel=NULL;
  
   module_attribute =
       LTTV_ATTRIBUTE(lttv_iattribute_find_subdir(LTTV_IATTRIBUTE(g_attribute),
@@ -874,7 +876,7 @@ void lttvwindowtraces_call_after_chunk(LttvAttributeName module_name,
                                      LTTV_EVENT_HOOK_BY_ID_CHANNEL,
                                      &value);
   if(type == LTTV_POINTER) {
-    event_hook_by_id_channel = (LttvHooksById*)*(value.v_pointer);
+    event_hook_by_id_channel = (LttvHooksByIdChannelArray*)*(value.v_pointer);
   }
   
   lttv_process_traceset_end(tsc,
@@ -1832,7 +1834,7 @@ void lttvwindowtraces_unregister_computation_hooks
                                 &value);
   g_assert(result);
 
-  LttvHooksById *event_hook_by_id_channel = (LttvHooksById*)*(value.v_pointer);
+  LttvHooksByIdChannelArray *event_hook_by_id_channel = (LttvHooksByIdChannelArray*)*(value.v_pointer);
   if(event_hook_by_id_channel != NULL)
     lttv_hooks_by_id_channel_destroy(event_hook_by_id_channel);
  
index 46bc804312801c4dac64743173968e0c6eaf8e30..a03eb190f188cf49396a0cecb2ef1f2c6b261832 100644 (file)
@@ -93,6 +93,6 @@ static inline ProcessList *guicontrolflow_get_process_list
     return control_flow_data->process_list ;
 }
 
-
+ControlFlowData *resourceview(LttvPluginTab *ptab);
 
 #endif // _CFV_H
index 2959cac79fc7a580d4c2f288f7fd29b5dc2ad602..2d3b4a1b4521ef389ae6260418f9044929fbf52b 100644 (file)
@@ -482,7 +482,7 @@ static void set_last_start(gpointer key, gpointer value, gpointer user_data)
 {
   //ResourceInfo *process_info = (ResourceInfo*)key;
   HashedResourceData *hashed_process_data = (HashedResourceData*)value;
-  guint x = (guint)(gulong)user_data;
+  guint x = GPOINTER_TO_UINT(user_data);
 
   hashed_process_data->x.over = x;
   hashed_process_data->x.over_used = FALSE;
@@ -521,7 +521,7 @@ void drawing_data_request_begin(EventsRequest *events_request, LttvTracesetState
 
   for(i=0; i<RV_RESOURCE_COUNT; i++) {
     g_hash_table_foreach(cfd->process_list->restypes[i].hash_table, set_last_start,
-                         (gpointer)(gulong)x);
+                         GUINT_TO_POINTER(x));
   }
 
 }
index d174da034883e3701878a547ef10df1ee9546f0e..d0c87f6a485b601c65a0c8ae130962b7a2242969 100644 (file)
@@ -56,6 +56,7 @@
 #include <assert.h>
 #include <string.h>
 #include <stdio.h>
+#include <inttypes.h>
 
 //#include <pango/pango.h>
 
@@ -92,7 +93,6 @@ extern GSList *g_legend_list;
 static gint background_ready(void *hook_data, void *call_data)
 {
   ControlFlowData *resourceview_data = (ControlFlowData *)hook_data;
-  LttvTrace *trace = (LttvTrace*)call_data;
 
   resourceview_data->background_info_waiting--;
   
@@ -621,6 +621,10 @@ int after_schedchange_hook(void *hook_data, void *call_data)
   return 0;
 }
 
+int before_execmode_hook_irq(void *hook_data, void *call_data);
+int before_execmode_hook_soft_irq(void *hook_data, void *call_data);
+int before_execmode_hook_trap(void *hook_data, void *call_data);
+
 /* before_execmode_hook
  * 
  * This function basically draw lines and icons. Two types of lines are drawn :
@@ -861,7 +865,7 @@ int before_execmode_hook_irq(void *hook_data, void *call_data)
   GQuark name;
   {
     gchar *str;
-    str = g_strdup_printf("IRQ %llu [%s]", irq, (char*)g_quark_to_string(ts->irq_names[irq]));
+    str = g_strdup_printf("IRQ %" PRIu64 " [%s]", irq, (char*)g_quark_to_string(ts->irq_names[irq]));
     name = g_quark_from_string(str);
     g_free(str);
   }
@@ -2115,7 +2119,8 @@ int after_chunk(void *hook_data, void *call_data)
   guint nb_trace = lttv_traceset_number(traceset);
 
   /* Only execute when called for the first trace's events request */
-  if(!process_list->current_hash_data) return;
+  if(!process_list->current_hash_data)
+         return 0;
 
   for(i = 0 ; i < nb_trace ; i++) {
     g_free(process_list->current_hash_data[i]);
index ca96455ab7f1abde71c2addfd043bcf037c6e3ee..4b5ae2ce1fa17689c68201150f89bde1da019cef 100644 (file)
@@ -20,6 +20,7 @@
 #include "lttv_plugin_cfv.h"
 #include <lttvwindow/lttvwindow.h>
 #include "drawing.h"
+#include "eventhooks.h"
 
 /* 
  * forward definitions
index dec03cfca844507654a95e53ffd8f6142be0b667..1b07852c47967ea6efa7ebd5264eaa8c19fa6c14 100644 (file)
@@ -246,9 +246,9 @@ void update_pixmap_size(ProcessList *process_list, guint width)
 {
   int i;
   for(i=0; i<RV_RESOURCE_COUNT; i++) {
-    g_hash_table_foreach(process_list->restypes[i].hash_table, 
-                       (GHFunc)update_pixmap_size_each,
-                       (gpointer)width);
+    g_hash_table_foreach(process_list->restypes[i].hash_table,
+                        (GHFunc)update_pixmap_size_each,
+                        GUINT_TO_POINTER(width));
   }
 }
 
index 2070a9c666494fadb2b846fb8fa5fe0975338dd1..ce32e16e868d347617e76e90f4efb11ad35ff7e4 100644 (file)
@@ -299,6 +299,10 @@ static inline GHashTable *resourcelist_get_resource_hash_table(ControlFlowData *
        return resourceview_data->process_list->restypes[type].hash_table;
 }
 
-
+HashedResourceData *resourcelist_obtain_cpu(ControlFlowData *resourceview_data, guint trace_num, guint id);
+HashedResourceData *resourcelist_obtain_irq(ControlFlowData *resourceview_data, guint trace_num, guint id);
+HashedResourceData *resourcelist_obtain_soft_irq(ControlFlowData *resourceview_data, guint trace_num, guint id);
+HashedResourceData *resourcelist_obtain_trap(ControlFlowData *resourceview_data, guint trace_num, guint id);
+HashedResourceData *resourcelist_obtain_bdev(ControlFlowData *resourceview_data, guint trace_num, guint id);
 
 #endif // _PROCESS_LIST_H
index 14b207c0d31d2af3232622da323317aab1363987..f23937b97544db3f9a1a75767158c34de7e3d91b 100644 (file)
@@ -93,7 +93,7 @@ static gboolean write_traceset_footer(void *hook_data, void *call_data)
 {
   LttvTracesetContext *tc = (LttvTracesetContext *)call_data;
   GQuark q;
-  gchar *string;
+  const gchar *string;
 
   if(a_raw) {
 
index ec0c563cb8c687923bf20ffe7c918280a8efd315..ddee070b119e78bcfc40b29610152b483aa22988 100644 (file)
@@ -38,6 +38,7 @@
 #include <ltt/event.h>
 #include <ltt/trace.h>
 #include <stdio.h>
+#include <inttypes.h>
 
 static gboolean
   a_noevent,
@@ -79,7 +80,7 @@ print_path_tree(FILE *fp, GString *indent, LttvAttribute *tree)
     if(is_named) {
       g_string_sprintfa(indent, "/%s", g_quark_to_string(name));
     } else {
-      g_string_sprintfa(indent, "/%s", name);
+           g_string_sprintfa(indent, "/%" PRIu32, (guint32) name);
     }
 
     switch(type) {
@@ -146,7 +147,8 @@ print_tree(FILE *fp, GString *indent, LttvAttribute *tree)
                if(is_named)
            fprintf(fp, "%s%s: ", indent->str, g_quark_to_string(name));
                else
-           fprintf(fp, "%s%lu: ", indent->str, name);
+                       fprintf(fp, "%s%" PRIu32 ": ", indent->str,
+                               (guint32) name);
 
     switch(type) {
       case LTTV_INT:
@@ -205,8 +207,6 @@ print_stats(FILE *fp, LttvTracesetStats *tscs)
 
   GString *indent;
 
-  LttSystemDescription *desc;
-
   if(tscs->stats == NULL) return;
   indent = g_string_new("");
   fprintf(fp, "Traceset statistics:\n\n");
@@ -222,6 +222,7 @@ print_stats(FILE *fp, LttvTracesetStats *tscs)
   for(i = 0 ; i < nb ; i++) {
     tcs = (LttvTraceStats *)(LTTV_TRACESET_CONTEXT(tscs)->traces[i]);
 #if 0 //FIXME
+    LttSystemDescription *desc;
     desc = ltt_trace_system_description(tcs->parent.parent.t);
     LttTime start_time = ltt_trace_system_description_trace_start_time(desc);
     fprintf(fp, "Trace on system %s at time %lu.%09lu :\n", 
@@ -289,8 +290,8 @@ static gboolean write_traceset_footer(void *hook_data, void *call_data)
 
 static gboolean write_trace_header(void *hook_data, void *call_data)
 {
-  LttvTraceContext *tc = (LttvTraceContext *)call_data;
 #if 0 //FIXME
+  LttvTraceContext *tc = (LttvTraceContext *)call_data;
   LttSystemDescription *system = ltt_trace_system_description(tc->t);
 
   fprintf(a_file,"  Trace from %s in %s\n%s\n\n", 
index ca613ac6edf638e48237d48c2e1231c3a7b14b77..4590a76a4ea7d3e2b0b79ebc95995a22eb9e8e42 100644 (file)
@@ -54,7 +54,7 @@ static char
   *a_file_name = NULL,
   *a_string = NULL;
 
-static LttvHooks
+static LttvHooks __attribute__ ((__unused__))
   *before_traceset,
   *event_hook;
 
This page took 0.051148 seconds and 4 git commands to generate.