From 8856f0a2259cc521baeb542f08a4d7e42a21e84f Mon Sep 17 00:00:00 2001 From: Michael Jennings Date: Mon, 6 Dec 1999 17:20:16 +0000 Subject: [PATCH] Mon Dec 6 14:05:36 PST 1999 Michael Jennings Added support for the Pablo Performance Analysis Toolkit (http://www-pablo.cs.uiuc.edu/Software/Pablo/pablo.htm). SVN revision: 1510 --- ChangeLog | 6 ++++++ acconfig.h | 1 + configure.in | 27 +++++++++++++++++++++++++++ src/command.c | 1 + src/feature.h | 20 +++++++++++++++----- src/startup.c | 2 ++ 6 files changed, 52 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index df88945..f2813dd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2872,3 +2872,9 @@ Thu Dec 2 22:18:51 PST 1999 Michael Jennings . ------------------------------------------------------------------------------- +Mon Dec 6 14:05:36 PST 1999 Michael Jennings + + Added support for the Pablo Performance Analysis Toolkit + (http://www-pablo.cs.uiuc.edu/Software/Pablo/pablo.htm). + +------------------------------------------------------------------------------- diff --git a/acconfig.h b/acconfig.h index 8d0cfa4..1d34046 100644 --- a/acconfig.h +++ b/acconfig.h @@ -321,6 +321,7 @@ #undef FONT3 #undef FONT4 #undef DEF_FONT_IDX +#undef IOTRACE /* Leave that blank line there!! Autoheader needs it. diff --git a/configure.in b/configure.in index df1c1e1..966ded6 100644 --- a/configure.in +++ b/configure.in @@ -208,6 +208,33 @@ fi dnl# dnl# FEATURES dnl# +AC_MSG_CHECKING(if Pablo support is wanted) +AC_ARG_WITH(pablo, +[ --with-pablo[=DIR] compile with Pablo I/O Tracing support (using Pablo prefix DIR)], + if test "$withval" != "no"; then + AC_MSG_RESULT(yes) + if test "$withval" != "yes"; then + CPPFLAGS="$CPPFLAGS -I${withval}/include" + LDFLAGS="$LDFLAGS -L${withval}/lib" + fi + AC_CHECK_HEADER(IOTrace.h, + AC_CHECK_LIB(PabloTraceExt, initIOTrace, + AC_DEFINE(IOTRACE) + LIBS="$LIBS -lPabloTraceExt -lPabloTrace" + echo "Pablo support enabled. Headers in ${withval}/include. Libraries in ${withval}/lib." + , + echo "*** ERROR: Pablo support was requested but the Pablo libraries could not be" + echo "*** found. Please check config.log for further information." + echo "*** Pablo support will NOT be included." + , -lPabloTrace) + , + echo "*** ERROR: Pablo support was requested but the Pablo header files could not be" + echo "*** found. Please check the value you passed to --with-pablo." + echo "*** Pablo support will NOT be included.") + else + AC_MSG_RESULT(no) + fi, AC_MSG_RESULT(no) +) AC_MSG_CHECKING(for pixmap support) AC_ARG_WITH(imlib, [ --with-imlib[=DIR] compile with Imlib support (Imlib residing in DIR/lib) (default)], diff --git a/src/command.c b/src/command.c index ab566ae..64ae87e 100644 --- a/src/command.c +++ b/src/command.c @@ -1116,6 +1116,7 @@ clean_exit(void) cleanutent(); #endif privileges(REVERT); + PABLO_STOP_TRACING(); } /* Acquire a pseudo-teletype from the system. */ diff --git a/src/feature.h b/src/feature.h index a00cc38..c8ac9d3 100644 --- a/src/feature.h +++ b/src/feature.h @@ -29,11 +29,6 @@ #ifndef _FEATURE_H_ # define _FEATURE_H_ -# include -# include - -# include "debug.h" - /********************* Miscellaneous OS fixings *********************/ # if defined(hpux) && !defined(_HPUX_SOURCE) @@ -84,6 +79,21 @@ #define OPTIMIZE_HACKS #define USE_EFFECTS +/* For Pablo I/O Trace Library */ +#ifdef IOTRACE +# include +# include +# define PABLO_START_TRACING() do {setTraceProcessorNumber(0); setTraceFileName("Eterm-pablo-trace.sddf"); initIOTrace(); \ + enableLifetimeSummaries(); enableTimeWindowSummaries(0.1); enableFileRegionSummaries(8192); \ + } while (0) +# define PABLO_STOP_TRACING() do {endIOTrace(); endTracing();} while (0) +#endif + +# include +# include + +# include "debug.h" + /********************* Color, screen, and image stuff *********************/ /* Support for background pixmap cycling */ diff --git a/src/startup.c b/src/startup.c index 52358fc..b88e298 100644 --- a/src/startup.c +++ b/src/startup.c @@ -92,6 +92,8 @@ eterm_bootstrap(int argc, char *argv[]) my_rgid = getgid(); my_egid = getegid(); privileges(REVERT); + + PABLO_START_TRACING(); getcwd(initial_dir, PATH_MAX); init_defaults();