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;
}
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;
}
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;
}
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;
}
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;
}
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,
#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>
#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;
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);
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);
{
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;
GArray *group,
struct compute_tracefile_group_args *args)
{
- int i;
+ unsigned int i;
LttTracefile *tf;
for(i=0; i<group->len; i++) {
static void ltt_tracefile_group_destroy(gpointer data)
{
GArray *group = (GArray *)data;
- int i;
+ unsigned int i;
LttTracefile *tf;
if (group->len > 0)
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++) {
static int ltt_process_metadata_tracefile(LttTracefile *tf)
{
int err;
- guint i;
while(1) {
err = ltt_tracefile_read_seek(tf);
LttTrace * t;
LttTracefile *tf;
GArray *group;
- int i, ret;
+ unsigned int i;
+ int ret;
ltt_subbuffer_header_t *header;
DIR *dir;
struct dirent *entry;
(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;
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);
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
void ltt_update_event_size(LttTracefile *tf)
{
off_t size = 0;
- char *tscdata;
struct marker_info *info;
if (tf->name == LTT_TRACEFILE_NAME_METADATA) {
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);
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;
}
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;
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;
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);
/*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))) {
/*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))) {
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;
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;
#endif
#include <string.h>
+#include <inttypes.h>
#include <lttv/lttv.h>
#include <lttv/attribute.h>
#include <lttv/hook.h>
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,
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,
gboolean lresult = FALSE, rresult = FALSE;
- LttvTraceState *ts;
+ LttvTraceState *ts = NULL;
LttvTracefileState *tfs = (LttvTracefileState*)context;
if(tc)
ts = (LttvTraceState*)tc;
#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)
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;
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;
#include <stdio.h>
#include <string.h>
#include <ltt/ltt-private.h>
+#include <inttypes.h>
/* Comment :
* Mathieu Desnoyers
/* 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,
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);
}
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);
}
}
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);
}
* 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)
} 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);
}
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,
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);
#endif
#include <stdio.h>
+#include <inttypes.h>
#include <lttv/module.h>
#include <lttv/stats.h>
#include <lttv/lttv.h>
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';
{
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;
&x);
g_hash_table_foreach(cfd->process_list->process_hash, set_last_start,
- (gpointer)x);
+ GUINT_TO_POINTER(x));
}
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]);
#include "lttv_plugin_cfv.h"
#include <lttvwindow/lttvwindow.h>
#include "drawing.h"
+#include "eventhooks.h"
/*
* forward definitions
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));
}
#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>
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);
break;
case SCROLL_JUMP:
g_debug("get_events : SCROLL_JUMP");
+ relative_position = 0;
seek_by_time = 1;
break;
case SCROLL_NONE:
*/
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,
#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
/* 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 */
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);
#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
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 =
TRUE,
0,0,
drawing->drawing_area->allocation.width,drawing->drawing_area->allocation.height );
+*/
/* ask for the buffer to be redrawn */
//enabled again for histogram.
{
//g_debug("motion");
//eventually follow mouse and show time here
+ return FALSE;
}
static gboolean
{
//g_debug("motion");
//eventually follow mouse and show time here
+ return FALSE;
}
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);
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)
histo_drawing_update_vertical_ruler(drawing);
*/
+#endif
+
//disabled for histogram, always redraw whole screen.
return 0;
}
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)
guint maxIRQduration;
guint minIRQduration;
double periodInSec;
- int periodInNsec;
+ int periodInNsec = 0;
char maxIrqHandler[80];
char minIrqHandler[80];
InterruptEventData *event_data = (InterruptEventData *)hook_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) ;
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;
}
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;
}
on_trace_facility_activate (GtkMenuItem *menuitem,
gpointer user_data)
{
- g_info("Trace facility selector: %s\n");
+ g_info("Trace facility selector: %s\n", "");
}
GError *error = NULL;
MainWindow * mw_data = get_window_data_struct((GtkWidget*)menuitem);
- LttvLibrary *library;
+ LttvLibrary *library = NULL;
{
GPtrArray *name;
guint nb,i;
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),
*/
static void destroy() {
- LttvAttributeValue value;
- LttvTrace *trace;
- GSList *iter = NULL;
-
lttv_option_remove("trace");
lttv_hooks_remove_data(main_hooks, window_creation_hook, NULL);
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);
}
-
-
-
-
-
+void current_position_change_manager(Tab *tab,
+ LttvTracesetContextPosition *pos);
#endif //LTTVWINDOW_H
#include <sys/stat.h>
#include <unistd.h>
#include <string.h>
+#include <inttypes.h>
#include <ltt/time.h>
#include <ltt/trace.h>
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);
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 =
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,
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),
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,
&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);
return control_flow_data->process_list ;
}
-
+ControlFlowData *resourceview(LttvPluginTab *ptab);
#endif // _CFV_H
{
//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;
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));
}
}
#include <assert.h>
#include <string.h>
#include <stdio.h>
+#include <inttypes.h>
//#include <pango/pango.h>
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--;
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 :
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);
}
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]);
#include "lttv_plugin_cfv.h"
#include <lttvwindow/lttvwindow.h>
#include "drawing.h"
+#include "eventhooks.h"
/*
* forward definitions
{
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));
}
}
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
{
LttvTracesetContext *tc = (LttvTracesetContext *)call_data;
GQuark q;
- gchar *string;
+ const gchar *string;
if(a_raw) {
#include <ltt/event.h>
#include <ltt/trace.h>
#include <stdio.h>
+#include <inttypes.h>
static gboolean
a_noevent,
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) {
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:
GString *indent;
- LttSystemDescription *desc;
-
if(tscs->stats == NULL) return;
indent = g_string_new("");
fprintf(fp, "Traceset statistics:\n\n");
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",
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",
*a_file_name = NULL,
*a_string = NULL;
-static LttvHooks
+static LttvHooks __attribute__ ((__unused__))
*before_traceset,
*event_hook;