X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=lttv%2Flttv%2Fbatchtest.c;h=6b2dc95a50049828fa0a37d56eb5fc7223d9e832;hb=b9ce0bad7daf7c0a2333c91fdb1e35d602afe17f;hp=08b892beb43d1894c02d7d333bae403fe052ad9f;hpb=90e19f82bca635a1ba52b8a50b64e484bd19c14f;p=lttv.git diff --git a/lttv/lttv/batchtest.c b/lttv/lttv/batchtest.c index 08b892be..6b2dc95a 100644 --- a/lttv/lttv/batchtest.c +++ b/lttv/lttv/batchtest.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 module inserts a hook in the program main loop. This hook processes @@ -31,11 +31,9 @@ #include #include #include -#include #include -#include -#include -#include +#include +#include #define __UNUSED__ __attribute__((__unused__)) @@ -98,6 +96,7 @@ typedef struct _save_state { static void lttv_trace_option(void __UNUSED__ *hook_data) { +#ifdef BABEL_CLEANUP LttTrace *trace; trace = ltt_trace_open(a_trace); @@ -106,6 +105,11 @@ static void lttv_trace_option(void __UNUSED__ *hook_data) } else { lttv_traceset_add(traceset, lttv_trace_new(trace)); } +#endif + + if(lttv_traceset_add_path(traceset, a_trace) < 0) { + g_critical("cannot open trace %s", a_trace); + } } static double get_time() @@ -390,6 +394,7 @@ close: fclose(fp); } +// TODO mdenis: adapt to babeltrace static gboolean process_traceset(void __UNUSED__ *hook_data, void __UNUSED__ *call_data) { @@ -408,10 +413,11 @@ static gboolean process_traceset(void __UNUSED__ *hook_data, //guint i, j, count, nb_control, nb_tracefile, nb_block, nb_event, nb_equal; guint i, j, count; - LttTrace *trace; - LttTime max_time = { G_MAXULONG, G_MAXULONG }; +#ifdef BABEL_CLEANUP + LttTrace *trace; + a_event_position = ltt_event_position_new(); GData **tracefiles_groups; @@ -431,6 +437,7 @@ static gboolean process_traceset(void __UNUSED__ *hook_data, } } +#endif tscs = g_object_new(LTTV_TRACESET_STATS_TYPE, NULL); ts = &tscs->parent; @@ -998,8 +1005,10 @@ static void destroy() for(i = 0 ; i < nb ; i++) { trace = lttv_traceset_get(traceset, i); lttv_traceset_remove(traceset,i); +#ifdef BABEL_CLEANUP ltt_trace_close(lttv_trace(trace)); lttv_trace_destroy(trace); +#endif } lttv_traceset_destroy(traceset);