Attribute *a;
LttvAttributeValue value;
+ gboolean retval;
nb = src->attributes->len;
dest, a->name), (LttvAttribute *)(a->value.dv_gobject));
}
else {
- if(a->is_named)
- g_assert(lttv_attribute_find(dest, a->name, a->type, &value));
- else
- g_assert(lttv_attribute_find_unnamed(dest, a->name, a->type, &value));
+ if(a->is_named) {
+ retval= lttv_attribute_find(dest, a->name, a->type, &value);
+ g_assert(retval);
+ }
+ else {
+ retval= lttv_attribute_find_unnamed(dest, a->name, a->type, &value);
+ g_assert(retval);
+ }
switch(a->type) {
case LTTV_INT:
*value.v_int += a->value.dv_int;
LttvAttributeValue value;
LttvIAttribute *attributes = LTTV_IATTRIBUTE(lttv_global_attributes());
+ gboolean retval;
g_info("Init batchtest.c");
event_hook = lttv_hooks_new();
- g_assert(lttv_iattribute_find_by_path(attributes, "hooks/traceset/before",
- LTTV_POINTER, &value));
+ retval= lttv_iattribute_find_by_path(attributes, "hooks/traceset/before",
+ LTTV_POINTER, &value);
+ g_assert(retval);
*(value.v_pointer) = before_traceset;
- g_assert(lttv_iattribute_find_by_path(attributes, "hooks/traceset/after",
- LTTV_POINTER, &value));
+ retval= lttv_iattribute_find_by_path(attributes, "hooks/traceset/after",
+ LTTV_POINTER, &value);
+ g_assert(retval);
*(value.v_pointer) = after_traceset;
- g_assert(lttv_iattribute_find_by_path(attributes, "hooks/trace/before",
- LTTV_POINTER, &value));
+ retval= lttv_iattribute_find_by_path(attributes, "hooks/trace/before",
+ LTTV_POINTER, &value);
+ g_assert(retval);
*(value.v_pointer) = before_trace;
- g_assert(lttv_iattribute_find_by_path(attributes, "hooks/trace/after",
- LTTV_POINTER, &value));
+ retval= lttv_iattribute_find_by_path(attributes, "hooks/trace/after",
+ LTTV_POINTER, &value);
+ g_assert(retval);
*(value.v_pointer) = after_trace;
- g_assert(lttv_iattribute_find_by_path(attributes, "hooks/tracefile/before",
- LTTV_POINTER, &value));
+ retval= lttv_iattribute_find_by_path(attributes, "hooks/tracefile/before",
+ LTTV_POINTER, &value);
+ g_assert(retval);
*(value.v_pointer) = before_tracefile;
- g_assert(lttv_iattribute_find_by_path(attributes, "hooks/tracefile/after",
- LTTV_POINTER, &value));
+ retval= lttv_iattribute_find_by_path(attributes, "hooks/tracefile/after",
+ LTTV_POINTER, &value);
+ g_assert(retval);
*(value.v_pointer) = after_tracefile;
- //g_assert(lttv_iattribute_find_by_path(attributes, "hooks/event/before",
- // LTTV_POINTER, &value));
+ //retval= lttv_iattribute_find_by_path(attributes, "hooks/event/before",
+ // LTTV_POINTER, &value);
//*(value.v_pointer) = before_event;
- //g_assert(lttv_iattribute_find_by_path(attributes, "hooks/event/after",
- // LTTV_POINTER, &value));
+ //retval= lttv_iattribute_find_by_path(attributes, "hooks/event/after",
+ // LTTV_POINTER, &value);
//*(value.v_pointer) = after_event;
- g_assert(lttv_iattribute_find_by_path(attributes, "hooks/event",
- LTTV_POINTER, &value));
+ retval= lttv_iattribute_find_by_path(attributes, "hooks/event",
+ LTTV_POINTER, &value);
+ g_assert(retval);
*(value.v_pointer) = event_hook;
- g_assert(lttv_iattribute_find_by_path(attributes, "hooks/main/before",
- LTTV_POINTER, &value));
+ retval= lttv_iattribute_find_by_path(attributes, "hooks/main/before",
+ LTTV_POINTER, &value);
+ g_assert(retval);
g_assert((main_hooks = *(value.v_pointer)) != NULL);
lttv_hooks_add(main_hooks, process_traceset, NULL, LTTV_PRIO_DEFAULT);
}
GString* f = NULL;
if(fp->len < 2) return FALSE;
- g_assert((f=ltt_g_ptr_array_remove_index_slow(fp,0)));
+ f=ltt_g_ptr_array_remove_index_slow(fp,0);
+ g_assert(f);
/*
*profile_memory_long_option = "--memory";
gboolean profile_memory = FALSE;
+ gboolean retval;
LttvAttributeValue value;
/* Create a number of hooks lists */
- g_assert(lttv_iattribute_find_by_path(attributes, "hooks/options/before",
- LTTV_POINTER, &value));
+ retval= lttv_iattribute_find_by_path(attributes, "hooks/options/before",
+ LTTV_POINTER, &value);
+ g_assert(retval);
*(value.v_pointer) = before_options;
- g_assert(lttv_iattribute_find_by_path(attributes, "hooks/options/after",
- LTTV_POINTER, &value));
+ retval= lttv_iattribute_find_by_path(attributes, "hooks/options/after",
+ LTTV_POINTER, &value);
+ g_assert(retval);
*(value.v_pointer) = after_options;
- g_assert(lttv_iattribute_find_by_path(attributes, "hooks/main/before",
- LTTV_POINTER, &value));
+ retval= lttv_iattribute_find_by_path(attributes, "hooks/main/before",
+ LTTV_POINTER, &value);
+ g_assert(retval);
*(value.v_pointer) = before_main;
- g_assert(lttv_iattribute_find_by_path(attributes, "hooks/main/after",
- LTTV_POINTER, &value));
+ retval= lttv_iattribute_find_by_path(attributes, "hooks/main/after",
+ LTTV_POINTER, &value);
+ g_assert(retval);
*(value.v_pointer) = after_main;
LttEventPosition *ep;
LttvTracesetContext *tsc = self->parent.ts_context;
+ int retval;
tracefiles_tree = lttv_attribute_find_subdir(container,
LTTV_STATE_TRACEFILES);
g_tree_remove(tsc->pqueue, tfc);
if(ep != NULL) {
- g_assert(ltt_tracefile_seek_position(tfc->tf, ep) == 0);
+ retval= ltt_tracefile_seek_position(tfc->tf, ep);
+ g_assert_cmpint(retval, ==, 0);
tfc->timestamp = ltt_event_time(ltt_tracefile_get_event(tfc->tf));
- g_assert(ltt_time_compare(tfc->timestamp, ltt_time_infinite) != 0);
+ g_assert_cmpint(ltt_time_compare(tfc->timestamp, ltt_time_infinite), !=, 0);
g_tree_insert(tsc->pqueue, tfc, tfc);
g_info("Restoring state for a tf at time %lu.%lu", tfc->timestamp.tv_sec, tfc->timestamp.tv_nsec);
} else {
*/
void lttv_process_traceset_synchronize_tracefiles(LttvTracesetContext *tsc)
{
- g_assert(lttv_process_traceset_seek_position(tsc, tsc->sync_position) == 0);
+ int retval;
+
+ retval= lttv_process_traceset_seek_position(tsc, tsc->sync_position);
+ g_assert_cmpint(retval, ==, 0);
}
LttTime time_offset;
struct seek_back_data sd;
LttvHooks *hooks = lttv_hooks_new();
+ int retval;
sd.first_event = 0;
sd.events_found = 0;
LttvTracesetContextPosition *pos =
(LttvTracesetContextPosition*)g_ptr_array_index (sd.array,
sd.first_event);
- g_assert(lttv_process_traceset_seek_position(self, pos) == 0);
+ retval= lttv_process_traceset_seek_position(self, pos);
+ g_assert_cmpint(retval, ==, 0);
} else {
/* Will seek to the last saved position : in the worst case, it will be the
* original position (if events_found is 0) */
- g_assert(lttv_process_traceset_seek_position(self, saved_pos) == 0);
+ retval= lttv_process_traceset_seek_position(self, saved_pos);
+ g_assert_cmpint(retval, ==, 0);
}
for(i=0;i<sd.array->len;i++) {
{
PropertiesIcon *properties = (PropertiesIcon*)hook_data;
DrawContext *draw_context = (DrawContext*)call_data;
+ gboolean retval;
LttvIAttribute *attributes = LTTV_IATTRIBUTE(lttv_global_attributes());
LttvAttributeValue value;
strcat(icon_name, properties->icon_name);
- g_assert(lttv_iattribute_find_by_path(attributes, icon_name,
- LTTV_POINTER, &value));
+ retval= lttv_iattribute_find_by_path(attributes, icon_name, LTTV_POINTER,
+ &value);
+ g_assert(retval);
if(unlikely(*(value.v_pointer) == NULL))
{
*(value.v_pointer) = icon_info = g_new(IconStruct,1);
LttvTracesetContext *tsc = (LttvTracesetContext*)tss;
guint i;
gboolean seek_by_time;
+ int retval;
if(lttvwindow_preempt_count > 0) return;
pos);
} else if(relative_position < 0) {
- g_assert(lttv_process_traceset_seek_position(tsc, pos) == 0);
+ retval= lttv_process_traceset_seek_position(tsc, pos);
+ g_assert_cmpint(retval, ==, 0);
}
} else {
/* There is nothing in the list : simply seek to the time value. */
{
histo_PropertiesIcon *properties = (histo_PropertiesIcon*)hook_data;
histo_DrawContext *draw_context = (histo_DrawContext*)call_data;
+ gboolean retval;
LttvIAttribute *attributes = LTTV_IATTRIBUTE(lttv_global_attributes());
LttvAttributeValue value;
strcat(icon_name, properties->icon_name);
- g_assert(lttv_iattribute_find_by_path(attributes, icon_name,
- LTTV_POINTER, &value));
+ retval= lttv_iattribute_find_by_path(attributes, icon_name,
+ LTTV_POINTER, &value);
+ g_assert(retval);
if(unlikely(*(value.v_pointer) == NULL))
{
*(value.v_pointer) = icon_info = g_new(histo_IconStruct,1);
gint retval = 0;
- g_assert( lttv_iattribute_find_by_path(tab->attributes,
- "hooks/updatetraceset", LTTV_POINTER, &value));
+ retval= lttv_iattribute_find_by_path(tab->attributes,
+ "hooks/updatetraceset", LTTV_POINTER, &value);
+ g_assert(retval);
tmp = (LttvHooks*)*(value.v_pointer);
if(tmp == NULL) retval = 1;
{
LttvAttributeValue value;
LttvHooks * tmp;
- g_assert(lttv_iattribute_find_by_path(tab->attributes,
- "hooks/updatetraceset", LTTV_POINTER, &value));
+ gboolean retval;
+
+ retval= lttv_iattribute_find_by_path(tab->attributes,
+ "hooks/updatetraceset", LTTV_POINTER, &value);
+ g_assert(retval);
tmp = (LttvHooks*)*(value.v_pointer);
if(tmp == NULL) return;
lttv_hooks_call(tmp, NULL);
GtkWidget *page = gtk_notebook_get_nth_page(GTK_NOTEBOOK(notebook),
gtk_notebook_get_current_page(GTK_NOTEBOOK(notebook)));
Tab *tab;
+ gboolean retval;
+
if(!page) {
return;
} else {
LttvHooks * tmp;
LttvAttributeValue value;
- g_assert(lttv_iattribute_find_by_path(tab->attributes, "hooks/redraw", LTTV_POINTER, &value));
+ retval= lttv_iattribute_find_by_path(tab->attributes, "hooks/redraw", LTTV_POINTER, &value);
+ g_assert(retval);
tmp = (LttvHooks*)*(value.v_pointer);
if(tmp != NULL)
GtkWidget *page = gtk_notebook_get_nth_page(GTK_NOTEBOOK(notebook),
gtk_notebook_get_current_page(GTK_NOTEBOOK(notebook)));
Tab *tab;
+ gboolean retval;
+
if(!page) {
return;
} else {
LttvHooks * tmp;
LttvAttributeValue value;
- g_assert(lttv_iattribute_find_by_path(tab->attributes,
- "hooks/continue", LTTV_POINTER, &value));
+ retval= lttv_iattribute_find_by_path(tab->attributes, "hooks/continue",
+ LTTV_POINTER, &value);
+ g_assert(retval);
tmp = (LttvHooks*)*(value.v_pointer);
if(tmp != NULL)
MainWindow *main_window = get_window_data_struct(widget);
LttvIAttribute *attributes = main_window->attributes;
LttvAttributeValue value;
+ gboolean retval;
//This is unnecessary, since widgets will be destroyed
//by the main window widget anyway.
//remove_all_menu_toolbar_constructors(main_window, NULL);
- g_assert(lttv_iattribute_find_by_path(attributes,
- "viewers/menu", LTTV_POINTER, &value));
+ retval= lttv_iattribute_find_by_path(attributes, "viewers/menu",
+ LTTV_POINTER, &value);
+ g_assert(retval);
lttv_menus_destroy((LttvMenus*)*(value.v_pointer));
- g_assert(lttv_iattribute_find_by_path(attributes,
- "viewers/toolbar", LTTV_POINTER, &value));
+ retval= lttv_iattribute_find_by_path(attributes, "viewers/toolbar",
+ LTTV_POINTER, &value);
+ g_assert(retval);
lttv_toolbars_destroy((LttvToolbars*)*(value.v_pointer));
g_object_unref(main_window->attributes);
LttvTracesetContext *tsc =
LTTV_TRACESET_CONTEXT(tab->traceset_info->traceset_context);
TimeInterval time_span = tsc->time_span;
+ int retval;
- g_assert(lttv_process_traceset_seek_position(tsc, pos) == 0);
+ retval= lttv_process_traceset_seek_position(tsc, pos);
+ g_assert_cmpint(retval, ==, 0);
LttTime new_time = lttv_traceset_context_position_get_time(pos);
/* Put the context in a state coherent position */
lttv_state_traceset_seek_time_closest((LttvTracesetState*)tsc, ltt_time_zero);
LttvIAttribute *global_attributes = LTTV_IATTRIBUTE(lttv_global_attributes());
LttvIAttribute *attributes = mw->attributes;
GtkWidget * tool_menu_title_menu, *new_widget, *pixmap;
+ gboolean retval;
- g_assert(lttv_iattribute_find_by_path(global_attributes,
- "viewers/menu", LTTV_POINTER, &value));
+ retval= lttv_iattribute_find_by_path(global_attributes, "viewers/menu",
+ LTTV_POINTER, &value);
+ g_assert(retval);
if(*(value.v_pointer) == NULL)
*(value.v_pointer) = lttv_menus_new();
global_menu = (LttvMenus*)*(value.v_pointer);
- g_assert(lttv_iattribute_find_by_path(attributes,
- "viewers/menu", LTTV_POINTER, &value));
+ retval= lttv_iattribute_find_by_path(attributes, "viewers/menu",
+ LTTV_POINTER, &value);
+ g_assert(retval);
if(*(value.v_pointer) == NULL)
*(value.v_pointer) = lttv_menus_new();
instance_menu = (LttvMenus*)*(value.v_pointer);
-
-
- g_assert(lttv_iattribute_find_by_path(global_attributes,
- "viewers/toolbar", LTTV_POINTER, &value));
+ retval= lttv_iattribute_find_by_path(global_attributes, "viewers/toolbar",
+ LTTV_POINTER, &value);
+ g_assert(retval);
if(*(value.v_pointer) == NULL)
*(value.v_pointer) = lttv_toolbars_new();
global_toolbar = (LttvToolbars*)*(value.v_pointer);
- g_assert(lttv_iattribute_find_by_path(attributes,
- "viewers/toolbar", LTTV_POINTER, &value));
+ retval= lttv_iattribute_find_by_path(attributes, "viewers/toolbar",
+ LTTV_POINTER, &value);
+ g_assert(retval);
if(*(value.v_pointer) == NULL)
*(value.v_pointer) = lttv_toolbars_new();
instance_toolbar = (LttvToolbars*)*(value.v_pointer);
MainWindow *construct_main_window(MainWindow * parent)
{
+ gboolean retval;
+
g_debug("construct_main_window()");
GtkWidget * new_window; /* New generated main window */
MainWindow * new_m_window;/* New main window structure */
new_m_window->mwindow = new_window;
new_m_window->attributes = attributes;
- g_assert(lttv_iattribute_find_by_path(attributes,
- "viewers/menu", LTTV_POINTER, &value));
+ retval= lttv_iattribute_find_by_path(attributes, "viewers/menu",
+ LTTV_POINTER, &value);
+ g_assert(retval);
*(value.v_pointer) = lttv_menus_new();
- g_assert(lttv_iattribute_find_by_path(attributes,
- "viewers/toolbar", LTTV_POINTER, &value));
+ retval= lttv_iattribute_find_by_path(attributes, "viewers/toolbar",
+ LTTV_POINTER, &value);
+ g_assert(retval);
*(value.v_pointer) = lttv_toolbars_new();
add_all_menu_toolbar_constructors(new_m_window, NULL);
static void init() {
LttvAttributeValue value;
+ gboolean retval;
// Global attributes only used for interaction with main() here.
LttvIAttribute *attributes = LTTV_IATTRIBUTE(lttv_global_attributes());
"pathname of the directory containing the trace",
LTTV_OPT_STRING, &a_trace, lttv_trace_option, NULL);
- g_assert(lttv_iattribute_find_by_path(attributes, "hooks/main/before",
- LTTV_POINTER, &value));
+ retval= lttv_iattribute_find_by_path(attributes, "hooks/main/before",
+ LTTV_POINTER, &value);
+ g_assert(retval);
g_assert((main_hooks = *(value.v_pointer)) != NULL);
lttv_hooks_add(main_hooks, window_creation_hook, NULL, LTTV_PRIO_DEFAULT);
{
LttvAttributeValue value;
LttvHooks * tmp;
+ gboolean retval;
TimeWindowNotifyData time_window_notify_data;
TimeWindow old_time_window = tab->time_window;
time_window_notify_data.new_time_window =
&(tab->time_window);
- g_assert(lttv_iattribute_find_by_path(tab->attributes,
- "hooks/updatetimewindow", LTTV_POINTER, &value));
+ retval= lttv_iattribute_find_by_path(tab->attributes,
+ "hooks/updatetimewindow", LTTV_POINTER, &value);
+ g_assert(retval);
tmp = (LttvHooks*)*(value.v_pointer);
if(tmp != NULL) lttv_hooks_call(tmp, &time_window_notify_data);
{
LttvAttributeValue value;
LttvHooks * tmp;
+ gboolean retval;
tab->current_time = *current_time;
- g_assert(lttv_iattribute_find_by_path(tab->attributes,
- "hooks/updatecurrenttime", LTTV_POINTER, &value));
+ retval= lttv_iattribute_find_by_path(tab->attributes,
+ "hooks/updatecurrenttime", LTTV_POINTER, &value);
+ g_assert(retval);
tmp = (LttvHooks*)*(value.v_pointer);
if(tmp != NULL) lttv_hooks_call(tmp, &tab->current_time);
}
{
LttvAttributeValue value;
LttvHooks * tmp;
+ gboolean retval;
tab->current_time = lttv_traceset_context_position_get_time(pos);
- g_assert(lttv_iattribute_find_by_path(tab->attributes,
- "hooks/updatecurrentposition", LTTV_POINTER, &value));
+ retval= lttv_iattribute_find_by_path(tab->attributes,
+ "hooks/updatecurrentposition", LTTV_POINTER, &value);
+ g_assert(retval);
tmp = (LttvHooks*)*(value.v_pointer);
if(tmp != NULL) lttv_hooks_call(tmp, pos);
}
lttvwindow_viewer_constructor constructor;
GtkWidget * tool_menu_title_menu, *new_widget, *pixmap;
GdkPixbuf *pixbuf;
+ gboolean retval;
- g_assert(lttv_iattribute_find_by_path(attributes,
- "viewers/toolbar", LTTV_POINTER, &value));
+ retval= lttv_iattribute_find_by_path(attributes, "viewers/toolbar",
+ LTTV_POINTER, &value);
+ g_assert(retval);
if(*(value.v_pointer) == NULL)
*(value.v_pointer) = lttv_toolbars_new();
instance_toolbar = (LttvToolbars*)*(value.v_pointer);
LttvToolbars * instance_menu;
lttvwindow_viewer_constructor constructor;
GtkWidget * tool_menu_title_menu, *new_widget;
+ gboolean retval;
- g_assert(lttv_iattribute_find_by_path(attributes,
- "viewers/menu", LTTV_POINTER, &value));
+ retval= lttv_iattribute_find_by_path(attributes, "viewers/menu",
+ LTTV_POINTER, &value);
+ g_assert(retval);
if(*(value.v_pointer) == NULL)
*(value.v_pointer) = lttv_menus_new();
instance_menu = (LttvMenus*)*(value.v_pointer);
LttvAttributeValue value;
LttvToolbars * instance_toolbar;
GtkWidget * tool_menu_title_menu, *widget;
+ gboolean retval;
- g_assert(lttv_iattribute_find_by_path(attributes,
- "viewers/toolbar", LTTV_POINTER, &value));
+ retval= lttv_iattribute_find_by_path(attributes, "viewers/toolbar",
+ LTTV_POINTER, &value);
+ g_assert(retval);
if(*(value.v_pointer) == NULL)
*(value.v_pointer) = lttv_toolbars_new();
instance_toolbar = (LttvToolbars*)*(value.v_pointer);
LttvAttributeValue value;
LttvMenus * instance_menu;
GtkWidget * tool_menu_title_menu, *widget;
+ gboolean retval;
- g_assert(lttv_iattribute_find_by_path(attributes,
- "viewers/menu", LTTV_POINTER, &value));
+ retval= lttv_iattribute_find_by_path(attributes, "viewers/menu",
+ LTTV_POINTER, &value);
+ g_assert(retval);
if(*(value.v_pointer) == NULL)
*(value.v_pointer) = lttv_menus_new();
instance_menu = (LttvMenus*)*(value.v_pointer);
LttvToolbarClosure toolbar_c;
LttvMenuClosure menu_c;
LttvAttributeValue value;
+ gboolean retval;
if(view_constructor == NULL) return;
if(pixmap != NULL) {
- g_assert(lttv_iattribute_find_by_path(attributes_global,
- "viewers/toolbar", LTTV_POINTER, &value));
+ retval= lttv_iattribute_find_by_path(attributes_global, "viewers/toolbar",
+ LTTV_POINTER, &value);
+ g_assert(retval);
toolbar = (LttvToolbars*)*(value.v_pointer);
if(toolbar == NULL) {
}
if(menu_path != NULL) {
- g_assert(lttv_iattribute_find_by_path(attributes_global,
- "viewers/menu", LTTV_POINTER, &value));
+ retval= lttv_iattribute_find_by_path(attributes_global, "viewers/menu",
+ LTTV_POINTER, &value);
+ g_assert(retval);
menu = (LttvMenus*)*(value.v_pointer);
if(menu == NULL) {
LttvToolbars * toolbar;
LttvMenus * menu;
LttvAttributeValue value;
- gboolean is_named;
+ gboolean is_named;
+ gboolean retval;
- g_assert(lttv_iattribute_find_by_path(attributes_global,
- "viewers/toolbar", LTTV_POINTER, &value));
+ retval= lttv_iattribute_find_by_path(attributes_global, "viewers/toolbar",
+ LTTV_POINTER, &value);
+ g_assert(retval);
toolbar = (LttvToolbars*)*(value.v_pointer);
if(toolbar != NULL) {
lttv_toolbars_remove(toolbar, view_constructor);
}
- g_assert(lttv_iattribute_find_by_path(attributes_global,
- "viewers/menu", LTTV_POINTER, &value));
+ retval= lttv_iattribute_find_by_path(attributes_global, "viewers/menu",
+ LTTV_POINTER, &value);
+ g_assert(retval);
menu = (LttvMenus*)*(value.v_pointer);
if(menu != NULL) {
{
LttvAttributeValue value;
LttvHooks * tmp;
- g_assert(lttv_iattribute_find_by_path(tab->attributes,
- "hooks/updatetimewindow", LTTV_POINTER, &value));
+ gboolean retval;
+
+ retval= lttv_iattribute_find_by_path(tab->attributes,
+ "hooks/updatetimewindow", LTTV_POINTER, &value);
+ g_assert(retval);
tmp = (LttvHooks*)*(value.v_pointer);
if(tmp == NULL){
tmp = lttv_hooks_new();
{
LttvAttributeValue value;
LttvHooks * tmp;
- g_assert(lttv_iattribute_find_by_path(tab->attributes,
- "hooks/updatetimewindow", LTTV_POINTER, &value));
+ gboolean retval;
+
+ retval= lttv_iattribute_find_by_path(tab->attributes,
+ "hooks/updatetimewindow", LTTV_POINTER, &value);
+ g_assert(retval);
tmp = (LttvHooks*)*(value.v_pointer);
if(tmp == NULL) return;
lttv_hooks_remove_data(tmp, hook, hook_data);
{
LttvAttributeValue value;
LttvHooks * tmp;
- g_assert(lttv_iattribute_find_by_path(tab->attributes,
- "hooks/updatetraceset", LTTV_POINTER, &value));
+ gboolean retval;
+
+ retval= lttv_iattribute_find_by_path(tab->attributes,
+ "hooks/updatetraceset", LTTV_POINTER, &value);
+ g_assert(retval);
tmp = (LttvHooks*)*(value.v_pointer);
if(tmp == NULL){
tmp = lttv_hooks_new();
{
LttvAttributeValue value;
LttvHooks * tmp;
- g_assert(lttv_iattribute_find_by_path(tab->attributes,
- "hooks/updatetraceset", LTTV_POINTER, &value));
+ gboolean retval;
+
+ retval= lttv_iattribute_find_by_path(tab->attributes,
+ "hooks/updatetraceset", LTTV_POINTER, &value);
+ g_assert(retval);
tmp = (LttvHooks*)*(value.v_pointer);
if(tmp == NULL) return;
lttv_hooks_remove_data(tmp, hook, hook_data);
{
LttvAttributeValue value;
LttvHooks * tmp;
- g_assert(lttv_iattribute_find_by_path(tab->attributes,
- "hooks/redraw", LTTV_POINTER, &value));
+ gboolean retval;
+
+ retval= lttv_iattribute_find_by_path(tab->attributes, "hooks/redraw",
+ LTTV_POINTER, &value);
+ g_assert(retval);
tmp = (LttvHooks*)*(value.v_pointer);
if(tmp == NULL){
tmp = lttv_hooks_new();
{
LttvAttributeValue value;
LttvHooks * tmp;
- g_assert(lttv_iattribute_find_by_path(tab->attributes,
- "hooks/redraw", LTTV_POINTER, &value));
+ gboolean retval;
+
+ retval= lttv_iattribute_find_by_path(tab->attributes, "hooks/redraw",
+ LTTV_POINTER, &value);
+ g_assert(retval);
tmp = (LttvHooks*)*(value.v_pointer);
if(tmp == NULL) return;
lttv_hooks_remove_data(tmp, hook, hook_data);
{
LttvAttributeValue value;
LttvHooks * tmp;
- g_assert(lttv_iattribute_find_by_path(tab->attributes,
- "hooks/continue", LTTV_POINTER, &value));
+ gboolean retval;
+
+ retval= lttv_iattribute_find_by_path(tab->attributes, "hooks/continue",
+ LTTV_POINTER, &value);
+ g_assert(retval);
tmp = (LttvHooks*)*(value.v_pointer);
if(tmp == NULL){
tmp = lttv_hooks_new();
{
LttvAttributeValue value;
LttvHooks * tmp;
- g_assert(lttv_iattribute_find_by_path(tab->attributes,
- "hooks/continue", LTTV_POINTER, &value));
+ gboolean retval;
+
+ retval= lttv_iattribute_find_by_path(tab->attributes, "hooks/continue",
+ LTTV_POINTER, &value);
+ g_assert(retval);
tmp = (LttvHooks*)*(value.v_pointer);
if(tmp == NULL) return;
lttv_hooks_remove_data(tmp, hook, hook_data);
{
LttvAttributeValue value;
LttvHooks * tmp;
- g_assert(lttv_iattribute_find_by_path(tab->attributes,
- "hooks/updatefilter", LTTV_POINTER, &value));
+ gboolean retval;
+
+ retval= lttv_iattribute_find_by_path(tab->attributes, "hooks/updatefilter",
+ LTTV_POINTER, &value);
+ g_assert(retval);
tmp = (LttvHooks*)*(value.v_pointer);
if(tmp == NULL){
tmp = lttv_hooks_new();
{
LttvAttributeValue value;
LttvHooks * tmp;
- g_assert(lttv_iattribute_find_by_path(tab->attributes,
- "hooks/updatefilter", LTTV_POINTER, &value));
+ gboolean retval;
+
+ retval= lttv_iattribute_find_by_path(tab->attributes, "hooks/updatefilter",
+ LTTV_POINTER, &value);
+ g_assert(retval);
tmp = (LttvHooks*)*(value.v_pointer);
if(tmp == NULL) return;
lttv_hooks_remove_data(tmp, hook, hook_data);
{
LttvAttributeValue value;
LttvHooks * tmp;
- g_assert(lttv_iattribute_find_by_path(tab->attributes,
- "hooks/updatecurrenttime", LTTV_POINTER, &value));
+ gboolean retval;
+
+ retval= lttv_iattribute_find_by_path(tab->attributes,
+ "hooks/updatecurrenttime", LTTV_POINTER, &value);
+ g_assert(retval);
tmp = (LttvHooks*)*(value.v_pointer);
if(tmp == NULL){
tmp = lttv_hooks_new();
{
LttvAttributeValue value;
LttvHooks * tmp;
- g_assert(lttv_iattribute_find_by_path(tab->attributes,
- "hooks/updatecurrenttime", LTTV_POINTER, &value));
+ gboolean retval;
+
+ retval= lttv_iattribute_find_by_path(tab->attributes,
+ "hooks/updatecurrenttime", LTTV_POINTER, &value);
+ g_assert(retval);
tmp = (LttvHooks*)*(value.v_pointer);
if(tmp == NULL) return;
lttv_hooks_remove_data(tmp, hook, hook_data);
{
LttvAttributeValue value;
LttvHooks * tmp;
- g_assert(lttv_iattribute_find_by_path(tab->attributes,
- "hooks/updatecurrentposition", LTTV_POINTER, &value));
+ gboolean retval;
+
+ retval= lttv_iattribute_find_by_path(tab->attributes,
+ "hooks/updatecurrentposition", LTTV_POINTER, &value);
+ g_assert(retval);
tmp = (LttvHooks*)*(value.v_pointer);
if(tmp == NULL){
tmp = lttv_hooks_new();
{
LttvAttributeValue value;
LttvHooks * tmp;
- g_assert(lttv_iattribute_find_by_path(tab->attributes,
- "hooks/updatecurrentposition", LTTV_POINTER, &value));
+ gboolean retval;
+
+ retval= lttv_iattribute_find_by_path(tab->attributes,
+ "hooks/updatecurrentposition", LTTV_POINTER, &value);
+ g_assert(retval);
tmp = (LttvHooks*)*(value.v_pointer);
if(tmp == NULL) return;
lttv_hooks_remove_data(tmp, hook, hook_data);
{
LttvAttributeValue value;
LttvHooks * tmp;
- g_assert(lttv_iattribute_find_by_path(tab->attributes,
- "hooks/showviewer", LTTV_POINTER, &value));
+ gboolean retval;
+
+ retval= lttv_iattribute_find_by_path(tab->attributes, "hooks/showviewer",
+ LTTV_POINTER, &value);
+ g_assert(retval);
tmp = (LttvHooks*)*(value.v_pointer);
if(tmp == NULL){
tmp = lttv_hooks_new();
{
LttvAttributeValue value;
LttvHooks * tmp;
- g_assert(lttv_iattribute_find_by_path(tab->attributes,
- "hooks/showviewer", LTTV_POINTER, &value));
+ gboolean retval;
+
+ retval= lttv_iattribute_find_by_path(tab->attributes, "hooks/showviewer",
+ LTTV_POINTER, &value);
+ g_assert(retval);
tmp = (LttvHooks*)*(value.v_pointer);
if(tmp == NULL) return;
lttv_hooks_remove_data(tmp, hook, hook_data);
{
LttvAttributeValue value;
LttvHooks * tmp;
- g_assert(lttv_iattribute_find_by_path(tab->attributes,
- "hooks/hpanedividor", LTTV_POINTER, &value));
+ gboolean retval;
+
+ retval= lttv_iattribute_find_by_path(tab->attributes, "hooks/hpanedividor",
+ LTTV_POINTER, &value);
+ g_assert(retval);
tmp = (LttvHooks*)*(value.v_pointer);
if(tmp == NULL){
tmp = lttv_hooks_new();
{
LttvAttributeValue value;
LttvHooks * tmp;
- g_assert(lttv_iattribute_find_by_path(tab->attributes,
- "hooks/hpanedividor", LTTV_POINTER, &value));
+ gboolean retval;
+
+ retval= lttv_iattribute_find_by_path(tab->attributes, "hooks/hpanedividor",
+ LTTV_POINTER, &value);
+ g_assert(retval);
tmp = (LttvHooks*)*(value.v_pointer);
if(tmp == NULL) return;
lttv_hooks_remove_data(tmp, hook, hook_data);
{
LttvAttributeValue value;
LttvHooks * tmp;
- g_assert(lttv_iattribute_find_by_path(tab->attributes,
- "hooks/hpanedividor", LTTV_POINTER, &value));
+ gboolean retval;
+
+ retval= lttv_iattribute_find_by_path(tab->attributes, "hooks/hpanedividor",
+ LTTV_POINTER, &value);
+ g_assert(retval);
tmp = (LttvHooks*)*(value.v_pointer);
if(tmp == NULL) return;
lttv_hooks_call(tmp, &position);
{
LttvAttributeValue value;
LttvHooks * tmp;
+ gboolean retval;
//lttv_filter_destroy(tab->filter);
//tab->filter = filter;
- g_assert(lttv_iattribute_find_by_path(tab->attributes,
- "hooks/updatefilter", LTTV_POINTER, &value));
+ retval= lttv_iattribute_find_by_path(tab->attributes, "hooks/updatefilter",
+ LTTV_POINTER, &value);
+ g_assert(retval);
tmp = (LttvHooks*)*(value.v_pointer);
if(tmp == NULL) return;
lttv_hooks_call(tmp, filter);
LttvAttributeValue value;
gchar icon_name[MAX_PATH_LEN] = "icons/";
IconStruct *icon_info;
+ gboolean retval;
strcat(icon_name, properties->icon_name);
- g_assert(lttv_iattribute_find_by_path(attributes, icon_name,
- LTTV_POINTER, &value));
+ retval= lttv_iattribute_find_by_path(attributes, icon_name, LTTV_POINTER,
+ &value);
+ g_assert(retval);
if(unlikely(*(value.v_pointer) == NULL))
{
*(value.v_pointer) = icon_info = g_new(IconStruct,1);
LttvTracesetContext *tc;
LttTime start, end;
+ gboolean retval;
g_info("BatchAnalysis begin process traceset");
lttv_state_add_event_hooks(tc);
if(a_stats) lttv_stats_add_event_hooks(tscs);
- g_assert(lttv_iattribute_find_by_path(attributes, "filter/expression",
- LTTV_POINTER, &value_expression));
+ retval= lttv_iattribute_find_by_path(attributes, "filter/expression",
+ LTTV_POINTER, &value_expression);
+ g_assert(retval);
- g_assert(lttv_iattribute_find_by_path(attributes, "filter/lttv_filter",
- LTTV_POINTER, &value_filter));
+ retval= lttv_iattribute_find_by_path(attributes, "filter/lttv_filter",
+ LTTV_POINTER, &value_filter);
+ g_assert(retval);
*(value_filter.v_pointer) = lttv_filter_new();
//g_debug("Filter string: %s",((GString*)*(value_expression.v_pointer))->str);
LttvAttributeValue value;
LttvIAttribute *attributes = LTTV_IATTRIBUTE(lttv_global_attributes());
+ gboolean retval;
g_info("Init batchAnalysis.c");
//after_event = lttv_hooks_new();
event_hook = lttv_hooks_new();
- g_assert(lttv_iattribute_find_by_path(attributes, "hooks/traceset/before",
- LTTV_POINTER, &value));
+ retval= lttv_iattribute_find_by_path(attributes, "hooks/traceset/before",
+ LTTV_POINTER, &value);
+ g_assert(retval);
*(value.v_pointer) = before_traceset;
- g_assert(lttv_iattribute_find_by_path(attributes, "hooks/traceset/after",
- LTTV_POINTER, &value));
+ retval= lttv_iattribute_find_by_path(attributes, "hooks/traceset/after",
+ LTTV_POINTER, &value);
+ g_assert(retval);
*(value.v_pointer) = after_traceset;
- g_assert(lttv_iattribute_find_by_path(attributes, "hooks/trace/before",
- LTTV_POINTER, &value));
+ retval= lttv_iattribute_find_by_path(attributes, "hooks/trace/before",
+ LTTV_POINTER, &value);
+ g_assert(retval);
*(value.v_pointer) = before_trace;
- g_assert(lttv_iattribute_find_by_path(attributes, "hooks/trace/after",
- LTTV_POINTER, &value));
+ retval= lttv_iattribute_find_by_path(attributes, "hooks/trace/after",
+ LTTV_POINTER, &value);
+ g_assert(retval);
*(value.v_pointer) = after_trace;
- g_assert(lttv_iattribute_find_by_path(attributes, "hooks/tracefile/before",
- LTTV_POINTER, &value));
+ retval= lttv_iattribute_find_by_path(attributes, "hooks/tracefile/before",
+ LTTV_POINTER, &value);
+ g_assert(retval);
*(value.v_pointer) = before_tracefile;
- g_assert(lttv_iattribute_find_by_path(attributes, "hooks/tracefile/after",
- LTTV_POINTER, &value));
+ retval= lttv_iattribute_find_by_path(attributes, "hooks/tracefile/after",
+ LTTV_POINTER, &value);
+ g_assert(retval);
*(value.v_pointer) = after_tracefile;
//g_assert(lttv_iattribute_find_by_path(attributes, "hooks/event/before",
// LTTV_POINTER, &value));
//g_assert(lttv_iattribute_find_by_path(attributes, "hooks/event/after",
// LTTV_POINTER, &value));
//*(value.v_pointer) = after_event;
- g_assert(lttv_iattribute_find_by_path(attributes, "hooks/event",
- LTTV_POINTER, &value));
+ retval= lttv_iattribute_find_by_path(attributes, "hooks/event",
+ LTTV_POINTER, &value);
+ g_assert(retval);
*(value.v_pointer) = event_hook;
- g_assert(lttv_iattribute_find_by_path(attributes, "hooks/main/before",
- LTTV_POINTER, &value));
+ retval= lttv_iattribute_find_by_path(attributes, "hooks/main/before",
+ LTTV_POINTER, &value);
+ g_assert(retval);
g_assert((main_hooks = *(value.v_pointer)) != NULL);
lttv_hooks_add(main_hooks, process_traceset, NULL, LTTV_PRIO_DEFAULT);
}
LttvAttributeValue value;
LttvIAttribute *attributes = LTTV_IATTRIBUTE(lttv_global_attributes());
+ gboolean retval;
g_info("Init precomputeState.c");
"Raw binary",
LTTV_OPT_NONE, &a_raw, NULL, NULL);
- g_assert(lttv_iattribute_find_by_path(attributes, "hooks/event",
- LTTV_POINTER, &value));
+ retval= lttv_iattribute_find_by_path(attributes, "hooks/event",
+ LTTV_POINTER, &value);
+ g_assert(retval);
g_assert((event_hook = *(value.v_pointer)) != NULL);
lttv_hooks_add(event_hook, for_each_event, &a_event_count, LTTV_PRIO_DEFAULT);
- g_assert(lttv_iattribute_find_by_path(attributes, "hooks/trace/before",
- LTTV_POINTER, &value));
+ retval= lttv_iattribute_find_by_path(attributes, "hooks/trace/before",
+ LTTV_POINTER, &value);
+ g_assert(retval);
g_assert((before_trace = *(value.v_pointer)) != NULL);
lttv_hooks_add(before_trace, write_trace_header, NULL, LTTV_PRIO_DEFAULT);
- g_assert(lttv_iattribute_find_by_path(attributes, "hooks/trace/after",
- LTTV_POINTER, &value));
+ retval= lttv_iattribute_find_by_path(attributes, "hooks/trace/after",
+ LTTV_POINTER, &value);
+ g_assert(retval);
g_assert((after_trace = *(value.v_pointer)) != NULL);
lttv_hooks_add(after_trace, write_trace_footer, NULL, LTTV_PRIO_DEFAULT);
- g_assert(lttv_iattribute_find_by_path(attributes, "hooks/traceset/before",
- LTTV_POINTER, &value));
+ retval= lttv_iattribute_find_by_path(attributes, "hooks/traceset/before",
+ LTTV_POINTER, &value);
+ g_assert(retval);
g_assert((before_traceset = *(value.v_pointer)) != NULL);
lttv_hooks_add(before_traceset, write_traceset_header, NULL,
LTTV_PRIO_DEFAULT);
- g_assert(lttv_iattribute_find_by_path(attributes, "hooks/traceset/after",
- LTTV_POINTER, &value));
+ retval= lttv_iattribute_find_by_path(attributes, "hooks/traceset/after",
+ LTTV_POINTER, &value);
+ g_assert(retval);
g_assert((after_traceset = *(value.v_pointer)) != NULL);
lttv_hooks_add(after_traceset, write_traceset_footer, NULL,
LTTV_PRIO_DEFAULT);
LttvAttributeValue value;
LttvIAttribute *attributes = LTTV_IATTRIBUTE(lttv_global_attributes());
+ gboolean retval;
/*
* User may specify filtering options through static file
g_file_get_contents(a_file_name,&a_file_content,NULL,NULL);
- g_assert(lttv_iattribute_find_by_path(attributes, "filter/expression",
- LTTV_POINTER, &value));
if(((GString*)*(value.v_pointer))->len != 0)
g_string_append_c((GString*)*(value.v_pointer),'&');
g_string_append((GString*)*(value.v_pointer),a_file_content);
g_string_append_c((GString*)*(value.v_pointer),')');
+ retval= lttv_iattribute_find_by_path(attributes, "filter/expression",
+ LTTV_POINTER, &value);
+ g_assert(retval);
}
/**
LttvAttributeValue value;
LttvIAttribute *attributes = LTTV_IATTRIBUTE(lttv_global_attributes());
-
+ gboolean retval;
+
/*
* User may specify filtering options through static file
* and/or command line string. From these sources, an
* option string is rebuilded and sent to the filter core
*/
- g_assert(lttv_iattribute_find_by_path(attributes, "filter/expression",
- LTTV_POINTER, &value));
if(((GString*)*(value.v_pointer))->len != 0)
g_string_append_c((GString*)*(value.v_pointer),'&');
g_string_append((GString*)*(value.v_pointer),a_string);
g_string_append_c((GString*)*(value.v_pointer),')');
+ retval= lttv_iattribute_find_by_path(attributes, "filter/expression",
+ LTTV_POINTER, &value);
+ g_assert(retval);
}
/**
LttvAttributeValue value;
LttvIAttribute *attributes = LTTV_IATTRIBUTE(lttv_global_attributes());
+ gboolean retval;
- g_assert(lttv_iattribute_find_by_path(attributes, "filter/expression",
- LTTV_POINTER, &value));
+ retval= lttv_iattribute_find_by_path(attributes, "filter/expression",
+ LTTV_POINTER, &value);
+ g_assert(retval);
*(value.v_pointer) = g_string_new("");
* Destroy the current module
*/
static void destroy() {
+ gboolean retval;
+
g_info("Destroy textFilter");
lttv_option_remove("expression");
LttvIAttribute *attributes = LTTV_IATTRIBUTE(lttv_global_attributes());
- g_assert(lttv_iattribute_find_by_path(attributes, "filter/expression",
- LTTV_POINTER, &value));
+ retval= lttv_iattribute_find_by_path(attributes, "filter/expression",
+ LTTV_POINTER, &value);
+ g_assert(retval);
g_string_free((GString*)*(value.v_pointer),TRUE);