From 21ff84a0d872ff069d4ec62d0a5bed21bcfeeac5 Mon Sep 17 00:00:00 2001 From: compudj Date: Thu, 19 Aug 2004 00:49:49 +0000 Subject: [PATCH] remove lib math because of bad interaction with gtk git-svn-id: http://ltt.polymtl.ca/svn@808 04897980-b3bd-0310-b5e0-8ef037075253 --- ltt/branches/poly/configure.in | 2 +- ltt/branches/poly/ltt/Makefile.am | 3 +-- ltt/branches/poly/ltt/time.h | 6 +++--- ltt/branches/poly/ltt/tracefile.c | 16 ++++++++-------- ltt/branches/poly/lttv/lttv/Makefile.am | 2 +- .../lttv/modules/gui/controlflow/Makefile.am | 3 +-- .../lttv/modules/gui/detailedevents/Makefile.am | 3 +-- .../gui/lttvwindow/lttvwindow/Makefile.am | 4 ++-- .../poly/lttv/modules/gui/statistics/Makefile.am | 3 +-- ltt/branches/poly/lttv/modules/text/Makefile.am | 4 +--- 10 files changed, 20 insertions(+), 26 deletions(-) diff --git a/ltt/branches/poly/configure.in b/ltt/branches/poly/configure.in index d54bc2df..e70eec63 100644 --- a/ltt/branches/poly/configure.in +++ b/ltt/branches/poly/configure.in @@ -36,7 +36,7 @@ AC_PROG_CC # Checks for libraries. AC_CHECK_LIB([popt], [poptGetNextOpt], POPT_LIBS="-lpopt",AC_MSG_ERROR([libpopt is required in order to compile LinuxTraceToolkit]) ) -AC_CHECK_LIB([m], [round], M_LIBS="-lm",AC_MSG_ERROR([Mathematical libraries are missing.]) ) +#AC_CHECK_LIB([m], [round], M_LIBS="-lm",AC_MSG_ERROR([Mathematical libraries are missing.]) ) # Checks for header files. diff --git a/ltt/branches/poly/ltt/Makefile.am b/ltt/branches/poly/ltt/Makefile.am index eda40575..cc5eed55 100644 --- a/ltt/branches/poly/ltt/Makefile.am +++ b/ltt/branches/poly/ltt/Makefile.am @@ -9,11 +9,10 @@ SUBDIRS = convert libdir = ${lttlibdir} AM_CFLAGS = $(GLIB_CFLAGS) -LIBS += $(GLIB_LIBS) $(M_LIBS) +LIBS += $(GLIB_LIBS) lib_LTLIBRARIES = libtraceread.la libtraceread_la_SOURCES = event.c facility.c parser.c tracefile.c type.c -libtraceread_la_LIBADD = -lm noinst_HEADERS = parser.h ltt-private.h lttinclude_HEADERS = \ diff --git a/ltt/branches/poly/ltt/time.h b/ltt/branches/poly/ltt/time.h index 6622dece..2aafdb23 100644 --- a/ltt/branches/poly/ltt/time.h +++ b/ltt/branches/poly/ltt/time.h @@ -116,9 +116,9 @@ static inline double ltt_time_to_double(LttTime t1) if(t1.tv_sec > MAX_TV_SEC_TO_DOUBLE) g_warning("Precision loss in conversion LttTime to double"); #endif //EXTRA_CHECK - return round(((double)((guint64)t1.tv_sec<> DOUBLE_SHIFT; - res.tv_nsec = (round(t1) - (((guint64)res.tv_sec<overflow_nsec = round( + tf->overflow_nsec = (-((double)(tf->a_block_start->cycle_count&0xFFFFFFFF)) - * tf->nsec_per_cycle)); + * tf->nsec_per_cycle); tf->current_event_time = getEventTime(tf); @@ -1228,8 +1228,8 @@ void updateTracefile(LttTracefile * tf) tf->prev_event_time.tv_nsec = 0; tf->count = 0; - tf->overflow_nsec = round((-((double)tf->a_block_start->cycle_count) - * tf->nsec_per_cycle)); + tf->overflow_nsec = (-((double)tf->a_block_start->cycle_count) + * tf->nsec_per_cycle); } @@ -1310,7 +1310,7 @@ void getCyclePerNsec(LttTracefile * t) t->nsec_per_cycle = (double)lBufTotalNSec / (double)lBufTotalCycle; /* Pre-multiply one overflow (2^32 cycles) by nsec_per_cycle */ - t->one_overflow_nsec = round(t->nsec_per_cycle * (double)0x100000000ULL); + t->one_overflow_nsec = t->nsec_per_cycle * (double)0x100000000ULL; } @@ -1350,9 +1350,9 @@ static inline LttTime getEventTime(LttTracefile * tf) if(unlikely(evId == TRACE_BLOCK_START)) { lEventNSec = 0; } else if(unlikely(evId == TRACE_BLOCK_END)) { - lEventNSec = round(((double) + lEventNSec = ((double) (tf->a_block_end->cycle_count - tf->a_block_start->cycle_count) - * tf->nsec_per_cycle)); + * tf->nsec_per_cycle); } #if 0 /* If you want to make heart beat a special case and use their own 64 bits @@ -1367,7 +1367,7 @@ static inline LttTime getEventTime(LttTracefile * tf) } #endif //0 else { - lEventNSec = (gint64)round(((double)cycle_count * tf->nsec_per_cycle)) + lEventNSec = (gint64)((double)cycle_count * tf->nsec_per_cycle) +tf->overflow_nsec; } diff --git a/ltt/branches/poly/lttv/lttv/Makefile.am b/ltt/branches/poly/lttv/lttv/Makefile.am index eade3959..3ccb55c3 100644 --- a/ltt/branches/poly/lttv/lttv/Makefile.am +++ b/ltt/branches/poly/lttv/lttv/Makefile.am @@ -1,5 +1,5 @@ AM_CFLAGS = $(GLIB_CFLAGS) -LIBS += $(M_LIBS) $(POPT_LIBS) $(GLIB_LIBS) -lgobject-2.0 -L$(top_srcdir)/ltt -ltraceread +LIBS += $(POPT_LIBS) $(GLIB_LIBS) -lgobject-2.0 -L$(top_srcdir)/ltt -ltraceread bin_PROGRAMS = lttv diff --git a/ltt/branches/poly/lttv/modules/gui/controlflow/Makefile.am b/ltt/branches/poly/lttv/modules/gui/controlflow/Makefile.am index ee0fec10..7b4dc273 100644 --- a/ltt/branches/poly/lttv/modules/gui/controlflow/Makefile.am +++ b/ltt/branches/poly/lttv/modules/gui/controlflow/Makefile.am @@ -24,7 +24,7 @@ AM_CFLAGS = $(GLIB_CFLAGS) AM_CFLAGS += $(GTK_CFLAGS) -LIBS += $(M_LIBS) $(GLIB_LIBS) +LIBS += $(GLIB_LIBS) LIBS += $(GTK_LIBS) -L${top_srcdir}/lttv/modules/gui/lttvwindow/lttvwindow -llttvwindow libdir = ${lttvplugindir} @@ -33,7 +33,6 @@ lib_LTLIBRARIES = libguicontrolflow.la libguicontrolflow_la_LDFLAGS = -module libguicontrolflow_la_SOURCES = module.c eventhooks.c cfv.c processlist.c\ drawing.c drawitem.c -libguicontrolflow_la_LIBADD = -lm noinst_HEADERS = eventhooks.h cfv.h processlist.h\ drawing.h drawitem.h diff --git a/ltt/branches/poly/lttv/modules/gui/detailedevents/Makefile.am b/ltt/branches/poly/lttv/modules/gui/detailedevents/Makefile.am index 4f9d4899..9c081980 100644 --- a/ltt/branches/poly/lttv/modules/gui/detailedevents/Makefile.am +++ b/ltt/branches/poly/lttv/modules/gui/detailedevents/Makefile.am @@ -25,7 +25,7 @@ AM_CFLAGS = $(GLIB_CFLAGS) AM_CFLAGS += $(GTK_CFLAGS) -LIBS += $(M_LIBS) $(GLIB_LIBS) +LIBS += $(GLIB_LIBS) LIBS += $(GTK_LIBS) -L${top_srcdir}/lttv/modules/gui/lttvwindow/lttvwindow -llttvwindow libdir = ${lttvplugindir} @@ -33,7 +33,6 @@ libdir = ${lttvplugindir} lib_LTLIBRARIES = libguievents.la libguievents_la_LDFLAGS = -module libguievents_la_SOURCES = events.c -libguievents_la_LIBADD = -lm EXTRA_DIST = \ hGuiEventsInsert.xpm diff --git a/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/Makefile.am b/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/Makefile.am index 0c7a47a3..05bd3a37 100644 --- a/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/Makefile.am +++ b/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/Makefile.am @@ -2,7 +2,7 @@ AM_CFLAGS = $(GLIB_CFLAGS) AM_CFLAGS += $(GTK_CFLAGS) -LIBS += $(M_LIBS) $(GLIB_LIBS) +LIBS += $(GLIB_LIBS) LIBS += $(GTK_LIBS) INCLUDES = \ @@ -43,5 +43,5 @@ lttvwindowinclude_HEADERS = \ menu.h\ toolbar.h -liblttvwindow_la_LIBADD = -lm @PACKAGE_LIBS@ $(INTLLIBS) +liblttvwindow_la_LIBADD = @PACKAGE_LIBS@ $(INTLLIBS) diff --git a/ltt/branches/poly/lttv/modules/gui/statistics/Makefile.am b/ltt/branches/poly/lttv/modules/gui/statistics/Makefile.am index 50883600..cf582c23 100644 --- a/ltt/branches/poly/lttv/modules/gui/statistics/Makefile.am +++ b/ltt/branches/poly/lttv/modules/gui/statistics/Makefile.am @@ -6,7 +6,7 @@ AM_CFLAGS = $(GLIB_CFLAGS) AM_CFLAGS += $(GTK_CFLAGS) -LIBS += $(M_LIBS) $(GLIB_LIBS) +LIBS += $(GLIB_LIBS) LIBS += $(GTK_LIBS) -L${top_srcdir}/lttv/modules/gui/lttvwindow/lttvwindow -llttvwindow libdir = ${lttvplugindir} @@ -14,7 +14,6 @@ libdir = ${lttvplugindir} lib_LTLIBRARIES = libguistatistics.la libguistatistics_la_LDFLAGS = -module libguistatistics_la_SOURCES = statistics.c -libguistatistics_la_LIBADD = -lm EXTRA_DIST = \ hGuiStatisticInsert.xpm diff --git a/ltt/branches/poly/lttv/modules/text/Makefile.am b/ltt/branches/poly/lttv/modules/text/Makefile.am index 9954beca..88f9235f 100644 --- a/ltt/branches/poly/lttv/modules/text/Makefile.am +++ b/ltt/branches/poly/lttv/modules/text/Makefile.am @@ -1,17 +1,15 @@ AM_CFLAGS = $(GLIB_CFLAGS) -LIBS += $(M_LIBS) $(GLIB_LIBS) -lgobject-2.0 -L$(top_srcdir)/ltt -ltraceread +LIBS += $(GLIB_LIBS) -lgobject-2.0 -L$(top_srcdir)/ltt -ltraceread libdir = ${lttvplugindir} lib_LTLIBRARIES = libtextDump.la libbatchAnalysis.la libtextDump_la_LDFLAGS = -module libtextDump_la_SOURCES = textDump.c -libtextDump_la_LIBADD = -lm libbatchAnalysis_la_LDFLAGS = -module libbatchAnalysis_la_SOURCES = batchAnalysis.c -libbatchAnalysis_la_LIBADD = -lm noinst_HEADERS = \ batchanalysis.h -- 2.34.1