X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=lttv%2Fmodules%2Fgui%2Flttvwindow%2Flttvwindow%2Flttvwindowtraces.c;h=fdcee7a6fb4d6dd938e3b54b9556845a558dc9f7;hb=b9ce0bad7daf7c0a2333c91fdb1e35d602afe17f;hp=0cd5d5f587886bf672dc72621b8c1abbf4ec492a;hpb=190724cdfc53eeebfd895b594f875b53a72adf37;p=lttv.git diff --git a/lttv/modules/gui/lttvwindow/lttvwindow/lttvwindowtraces.c b/lttv/modules/gui/lttvwindow/lttvwindow/lttvwindowtraces.c index 0cd5d5f5..fdcee7a6 100644 --- a/lttv/modules/gui/lttvwindow/lttvwindow/lttvwindowtraces.c +++ b/lttv/modules/gui/lttvwindow/lttvwindow/lttvwindowtraces.c @@ -12,8 +12,8 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, - * MA 02111-1307, USA. + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. */ /* This file is the API used to launch any background computation on a trace */ @@ -139,15 +139,15 @@ __EXPORT guint lttvwindowtraces_get_number() void lttvwindowtraces_add_trace(LttvTrace *trace) { +#ifdef BABEL_CLEANUP + LttvAttribute *attribute; + LttvAttribute *g_attribute = lttv_global_attributes(); - LttvAttribute *attribute; - LttvAttributeValue value; struct stat buf; gchar attribute_path[PATH_MAX]; int result; gboolean result_b; - #ifdef BABEL_CLEANUP if(stat(g_quark_to_string(ltt_trace_name(lttv_trace(trace))), &buf)) { g_warning("lttvwindowtraces_add_trace: Trace %s not found", g_quark_to_string(ltt_trace_name(lttv_trace(trace)))); @@ -195,7 +195,7 @@ void lttvwindowtraces_add_trace(LttvTrace *trace) *(value.v_pointer) = tss; lttv_context_init(LTTV_TRACESET_CONTEXT(tss), ts); -#endif + #if 0 result_b = lttv_iattribute_find(LTTV_IATTRIBUTE(attribute), LTTV_COMPUTATION_SYNC_POSITION, @@ -206,21 +206,22 @@ void lttvwindowtraces_add_trace(LttvTrace *trace) sync_position = lttv_traceset_context_position_new(); *(value.v_pointer) = sync_position; #endif //0 - value = lttv_attribute_add(attribute, + lttv_attribute_add(attribute, LTTV_REQUESTS_QUEUE, LTTV_POINTER); - value = lttv_attribute_add(attribute, + lttv_attribute_add(attribute, LTTV_REQUESTS_CURRENT, LTTV_POINTER); - value = lttv_attribute_add(attribute, + lttv_attribute_add(attribute, LTTV_NOTIFY_QUEUE, LTTV_POINTER); - value = lttv_attribute_add(attribute, + lttv_attribute_add(attribute, LTTV_NOTIFY_CURRENT, LTTV_POINTER); +#endif } /* Remove a trace from the global attributes */ @@ -835,6 +836,8 @@ void lttvwindowtraces_call_before_chunk(LttvAttributeName module_name, void lttvwindowtraces_call_after_chunk(LttvAttributeName module_name, LttvTraceset *ts) { +#warning "lttvwindowtraces_call_after_chunk does nothing" +#ifdef BABEL_CLEANUP LttvAttribute *g_attribute = lttv_global_attributes(); LttvAttribute *module_attribute; LttvAttributeType type; @@ -886,7 +889,6 @@ void lttvwindowtraces_call_after_chunk(LttvAttributeName module_name, type = lttv_iattribute_get_by_name(LTTV_IATTRIBUTE(module_attribute), LTTV_EVENT_HOOK_BY_ID_CHANNEL, &value); - #ifdef BABEL_CLEANUP lttv_process_traceset_end(tsc, after_chunk_traceset, after_chunk_trace, @@ -1002,13 +1004,13 @@ __EXPORT gboolean lttvwindowtraces_get_ready(LttvAttributeName module_name, else return TRUE; } - +#ifdef BABEL_CLEANUP static gint find_window_widget(MainWindow *a, GtkWidget *b) { if(a->mwindow == b) return 0; else return -1; } - +#endif /* lttvwindowtraces_process_pending_requests * @@ -1022,14 +1024,14 @@ static gint find_window_widget(MainWindow *a, GtkWidget *b) gboolean lttvwindowtraces_process_pending_requests(LttvTrace *trace) { - LttvTraceset *tsc; - LttvTraceset *ts; + gboolean ret_val = FALSE; +#ifdef BABEL_CLEANUP LttvAttribute *attribute; LttvAttribute *g_attribute = lttv_global_attributes(); GSList **list_out, **list_in, **notify_in, **notify_out; LttvAttributeValue value; LttvAttributeType type; - gboolean ret_val; + if(trace == NULL) return FALSE; @@ -1066,8 +1068,9 @@ gboolean lttvwindowtraces_process_pending_requests(LttvTrace *trace) LTTV_COMPUTATION_TRACESET, &value); g_assert(type == LTTV_POINTER); +#ifdef BABEL_CLEANUP ts = (LttvTraceset*)*(value.v_pointer); - +#endif #if 0 type = lttv_iattribute_get_by_name(LTTV_IATTRIBUTE(attribute), LTTV_COMPUTATION_SYNC_POSITION, @@ -1075,7 +1078,7 @@ gboolean lttvwindowtraces_process_pending_requests(LttvTrace *trace) g_assert(type == LTTV_POINTER); sync_position = (LttvTracesetContextPosition*)*(value.v_pointer); #endif //0 -#ifdef BABEL_CLEANUP +//#ifdef BABEL_CLEANUP moved at the beginning of the function /* There is no events requests pending : we should never have been called! */ g_assert(g_slist_length(*list_out) != 0 || g_slist_length(*list_in) != 0); /* 0.1 Lock traces */