Author: jsdelfino
Date: Mon Apr  2 06:24:05 2012
New Revision: 1308248

URL: http://svn.apache.org/viewvc?rev=1308248&view=rev
Log:
Add more fine grain debug options and remove overhead in debug log macros when 
logging is turned off.

Modified:
    tuscany/sca-cpp/trunk/components/queue/client-test.cpp
    tuscany/sca-cpp/trunk/components/queue/qpid-test.cpp
    tuscany/sca-cpp/trunk/components/queue/qpid.hpp
    tuscany/sca-cpp/trunk/components/queue/queue-listener.cpp
    tuscany/sca-cpp/trunk/components/queue/queue-sender.cpp
    tuscany/sca-cpp/trunk/components/webservice/axis2-service.cpp
    tuscany/sca-cpp/trunk/components/webservice/axis2.hpp
    tuscany/sca-cpp/trunk/components/webservice/webservice-listener.cpp
    tuscany/sca-cpp/trunk/configure.ac
    tuscany/sca-cpp/trunk/kernel/config.hpp
    tuscany/sca-cpp/trunk/kernel/fstream.hpp
    tuscany/sca-cpp/trunk/kernel/function.hpp
    tuscany/sca-cpp/trunk/kernel/gc.hpp
    tuscany/sca-cpp/trunk/kernel/list.hpp
    tuscany/sca-cpp/trunk/kernel/monad.hpp
    tuscany/sca-cpp/trunk/kernel/stream.hpp
    tuscany/sca-cpp/trunk/kernel/string.hpp
    tuscany/sca-cpp/trunk/kernel/value.hpp
    tuscany/sca-cpp/trunk/modules/http/mod-ssltunnel.cpp
    tuscany/sca-cpp/trunk/modules/java/eval.hpp
    tuscany/sca-cpp/trunk/modules/js/eval.hpp
    tuscany/sca-cpp/trunk/modules/opencl/eval.hpp
    tuscany/sca-cpp/trunk/modules/server/mod-eval.hpp

Modified: tuscany/sca-cpp/trunk/components/queue/client-test.cpp
URL: 
http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/components/queue/client-test.cpp?rev=1308248&r1=1308247&r2=1308248&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/components/queue/client-test.cpp (original)
+++ tuscany/sca-cpp/trunk/components/queue/client-test.cpp Mon Apr  2 06:24:05 
2012
@@ -35,7 +35,7 @@
 #include "qpid.hpp"
 
 // Ignore conversion issues and redundant declarations in Qpid headers
-#ifdef WANT_MAINTAINER_MODE
+#ifdef WANT_MAINTAINER_WARNINGS
 #pragma GCC diagnostic ignored "-Wconversion"
 #pragma GCC diagnostic ignored "-Wredundant-decls"
 #endif

Modified: tuscany/sca-cpp/trunk/components/queue/qpid-test.cpp
URL: 
http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/components/queue/qpid-test.cpp?rev=1308248&r1=1308247&r2=1308248&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/components/queue/qpid-test.cpp (original)
+++ tuscany/sca-cpp/trunk/components/queue/qpid-test.cpp Mon Apr  2 06:24:05 
2012
@@ -34,7 +34,7 @@
 #include "qpid.hpp"
 
 // Ignore conversion issues and redundant declarations in Qpid headers
-#ifdef WANT_MAINTAINER_MODE
+#ifdef WANT_MAINTAINER_WARNINGS
 #pragma GCC diagnostic ignored "-Wconversion"
 #pragma GCC diagnostic ignored "-Wredundant-decls"
 #endif

Modified: tuscany/sca-cpp/trunk/components/queue/qpid.hpp
URL: 
http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/components/queue/qpid.hpp?rev=1308248&r1=1308247&r2=1308248&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/components/queue/qpid.hpp (original)
+++ tuscany/sca-cpp/trunk/components/queue/qpid.hpp Mon Apr  2 06:24:05 2012
@@ -27,7 +27,7 @@
  */
 
 // Ignore conversion issues and redundant declarations in Qpid headers
-#ifdef WANT_MAINTAINER_MODE
+#ifdef WANT_MAINTAINER_WARNINGS
 #pragma GCC diagnostic ignored "-Wconversion"
 #pragma GCC diagnostic ignored "-Wredundant-decls"
 #endif
@@ -260,7 +260,7 @@ const failable<bool> stop(QpidSubscripti
 }
 
 // Re-enable conversion and redundant declarations warnings
-#ifdef WANT_MAINTAINER_MODE
+#ifdef WANT_MAINTAINER_WARNINGS
 #pragma GCC diagnostic warning "-Wconversion"
 #pragma GCC diagnostic warning "-Wredundant-decls"
 #endif

Modified: tuscany/sca-cpp/trunk/components/queue/queue-listener.cpp
URL: 
http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/components/queue/queue-listener.cpp?rev=1308248&r1=1308247&r2=1308248&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/components/queue/queue-listener.cpp (original)
+++ tuscany/sca-cpp/trunk/components/queue/queue-listener.cpp Mon Apr  2 
06:24:05 2012
@@ -33,7 +33,7 @@
 #include "qpid.hpp"
 
 // Ignore conversion issues and redundant declarations in Qpid headers
-#ifdef WANT_MAINTAINER_MODE
+#ifdef WANT_MAINTAINER_WARNINGS
 #pragma GCC diagnostic ignored "-Wconversion"
 #pragma GCC diagnostic ignored "-Wredundant-decls"
 #endif

Modified: tuscany/sca-cpp/trunk/components/queue/queue-sender.cpp
URL: 
http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/components/queue/queue-sender.cpp?rev=1308248&r1=1308247&r2=1308248&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/components/queue/queue-sender.cpp (original)
+++ tuscany/sca-cpp/trunk/components/queue/queue-sender.cpp Mon Apr  2 06:24:05 
2012
@@ -32,7 +32,7 @@
 #include "qpid.hpp"
 
 // Ignore conversion issues and redundant declarations in Qpid headers
-#ifdef WANT_MAINTAINER_MODE
+#ifdef WANT_MAINTAINER_WARNINGS
 #pragma GCC diagnostic ignored "-Wconversion"
 #pragma GCC diagnostic ignored "-Wredundant-decls"
 #endif

Modified: tuscany/sca-cpp/trunk/components/webservice/axis2-service.cpp
URL: 
http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/components/webservice/axis2-service.cpp?rev=1308248&r1=1308247&r2=1308248&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/components/webservice/axis2-service.cpp (original)
+++ tuscany/sca-cpp/trunk/components/webservice/axis2-service.cpp Mon Apr  2 
06:24:05 2012
@@ -85,7 +85,7 @@ axiom_node_t *AXIS2_CALL serviceInvoke(u
     axis2_out_transport_info_t* tinfo = 
axis2_msg_ctx_get_out_transport_info(msg_ctx, env);
     axis2_apache2_out_transport_info_t* httpinfo = 
(axis2_apache2_out_transport_info_t*)tinfo;
     request_rec* r = httpinfo->request;
-    httpdDebugRequest(r, "webservice::serviceInvoke");
+    debug_httpdRequest(r, "webservice::serviceInvoke");
 
     // Parse the request Axiom node and construct request expression
     Axis2Context ax(env);

Modified: tuscany/sca-cpp/trunk/components/webservice/axis2.hpp
URL: 
http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/components/webservice/axis2.hpp?rev=1308248&r1=1308247&r2=1308248&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/components/webservice/axis2.hpp (original)
+++ tuscany/sca-cpp/trunk/components/webservice/axis2.hpp Mon Apr  2 06:24:05 
2012
@@ -28,7 +28,7 @@
 #include "config.hpp"
 
 // Ignore redundant declarations in Axiom headers
-#ifdef WANT_MAINTAINER_MODE
+#ifdef WANT_MAINTAINER_WARNINGS
 #pragma GCC diagnostic ignored "-Wredundant-decls"
 #endif
 #include <axiom.h>
@@ -38,7 +38,7 @@
 #include <axis2_conf_ctx.h>
 #include <axis2_disp.h>
 #include <axis2_http_out_transport_info.h>
-#ifdef WANT_MAINTAINER_MODE
+#ifdef WANT_MAINTAINER_WARNINGS
 #pragma GCC diagnostic warning "-Wredundant-decls"
 #endif
 

Modified: tuscany/sca-cpp/trunk/components/webservice/webservice-listener.cpp
URL: 
http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/components/webservice/webservice-listener.cpp?rev=1308248&r1=1308247&r2=1308248&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/components/webservice/webservice-listener.cpp 
(original)
+++ tuscany/sca-cpp/trunk/components/webservice/webservice-listener.cpp Mon Apr 
 2 06:24:05 2012
@@ -59,7 +59,7 @@ const failable<value> handle(const list<
 
     // Extract HTTPD request from the params
     request_rec* r = httpd::request(car(params));
-    httpdDebugRequest(r, "webservice::handle");
+    debug_httpdRequest(r, "webservice::handle");
 
     // Extract the relay lambda from the params and store it in the HTTPD 
request,
     // for later retrieval by our Axis2 service

Modified: tuscany/sca-cpp/trunk/configure.ac
URL: 
http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/configure.ac?rev=1308248&r1=1308247&r2=1308248&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/configure.ac (original)
+++ tuscany/sca-cpp/trunk/configure.ac Mon Apr  2 06:24:05 2012
@@ -117,7 +117,7 @@ AC_ARG_ENABLE(maintainer-mode, [AS_HELP_
   esac ],
 [ AC_MSG_RESULT(no)])
 if test "${want_maintainer_mode}" = "true"; then
-  cxxflags="${cxxflags} -D_DEBUG -ggdb -g3 -Werror -Wall -Wextra 
-Wno-ignored-qualifiers -Wno-strict-aliasing -Winit-self -Wmissing-include-dirs 
-Wcast-qual -Wcast-align -Wwrite-strings -Wpointer-arith -Waddress 
-Wredundant-decls -std=c++0x -fmessage-length=0"
+  cxxflags="${cxxflags} -ggdb -g3 -Werror -Wall -Wextra 
-Wno-ignored-qualifiers -Wno-strict-aliasing -Winit-self -Wmissing-include-dirs 
-Wcast-qual -Wcast-align -Wwrite-strings -Wpointer-arith -Waddress 
-Wredundant-decls -std=c++0x -fmessage-length=0"
   if test "${cxxtype}" = "clang"; then
     cxxflags="${cxxflags} -O1 -stdlib=libc++"
   else

Modified: tuscany/sca-cpp/trunk/kernel/config.hpp
URL: 
http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/kernel/config.hpp?rev=1308248&r1=1308247&r2=1308248&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/kernel/config.hpp (original)
+++ tuscany/sca-cpp/trunk/kernel/config.hpp Mon Apr  2 06:24:05 2012
@@ -67,13 +67,32 @@ namespace tuscany
 #ifdef WANT_MAINTAINER_MODE
 
 /**
+ * Strict compile warnings.
+ */
+#define WANT_MAINTAINER_WARNINGS
+
+/**
+ * Fast fail assertion.
+ */
+#define WANT_MAINTAINER_ASSERT
+
+/**
+ * Debug log.
+ */
+#define WANT_MAINTAINER_LOG
+
+/**
  * Add string watch members to important classes to help watch them in a 
debugger.
  */
 //#define WANT_MAINTAINER_WATCH
 
 /**
- * Increment/decrement a debug counter.
+ * Maintain counters of important objects to help test garbage collection.
  */
+//#define WANT_MAINTAINER_COUNTERS
+
+#ifdef WANT_MAINTAINER_COUNTERS
+
 bool debug_inc(long int& c) {
     c++;
     return true;
@@ -91,5 +110,12 @@ bool debug_dec(long int& c) {
 
 #endif
 
+#else
+
+#define debug_inc(c)
+#define debug_dec(c)
+
+#endif
+
 }
 #endif /* tuscany_config_hpp */

Modified: tuscany/sca-cpp/trunk/kernel/fstream.hpp
URL: 
http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/kernel/fstream.hpp?rev=1308248&r1=1308247&r2=1308248&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/kernel/fstream.hpp (original)
+++ tuscany/sca-cpp/trunk/kernel/fstream.hpp Mon Apr  2 06:24:05 2012
@@ -224,7 +224,7 @@ private:
 loghstream cinfo(APLOG_INFO);
 loghstream cfailure(APLOG_ERR);
 
-#ifdef WANT_MAINTAINER_MODE
+#ifdef WANT_MAINTAINER_LOG
 
 /**
  * Debug log stream.
@@ -234,9 +234,7 @@ loghstream cdebug(APLOG_DEBUG);
 /**
  * Return true if debug log is enabled.
  */
-const bool isDebugLog() {
-    return APLOG_MODULE_IS_LEVEL(ap_server_conf, APLOG_NO_MODULE, APLOG_DEBUG);
-}
+#define debug_islogging() (bool)(APLOG_MODULE_IS_LEVEL(ap_server_conf, 
APLOG_NO_MODULE, APLOG_DEBUG))
 
 #endif
 
@@ -321,7 +319,7 @@ private:
 logfstream cinfo(stderr, "info");
 logfstream cfailure(stderr, "error");
 
-#ifdef WANT_MAINTAINER_MODE
+#ifdef WANT_MAINTAINER_LOG
 
 /**
  * Debug log stream.
@@ -331,22 +329,18 @@ logfstream cdebug(stderr, "debug");
 /**
  * Return true if debug log is enabled.
  */
-const bool isDebugLog() {
-    return true;
-}
+#define debug_islogging() true
 
 #endif
 
 #endif
 
-#ifdef WANT_MAINTAINER_MODE
+#ifdef WANT_MAINTAINER_LOG
 
 /**
  * Log a debug message.
  */
 const bool debugLog(const string& msg) {
-    if (!isDebugLog())
-        return true;
     gc_scoped_pool();
     cdebug << msg << endl;
     return true;
@@ -356,17 +350,16 @@ const bool debugLog(const string& msg) {
  * Log a debug message and a value.
  */
 template<typename V> const bool debugLog(const V& v, const string& msg) {
-    if (!isDebugLog())
-        return true;
     gc_scoped_pool();
     cdebug << msg << ": " << v << endl;
     return true;
 }
 
-#define debug(...) tuscany::debugLog(__VA_ARGS__)
+#define debug(...) if (debug_islogging()) tuscany::debugLog(__VA_ARGS__)
 
 #else
 
+#define debug_islogging() false
 #define debug(...)
 
 #endif

Modified: tuscany/sca-cpp/trunk/kernel/function.hpp
URL: 
http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/kernel/function.hpp?rev=1308248&r1=1308247&r2=1308248&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/kernel/function.hpp (original)
+++ tuscany/sca-cpp/trunk/kernel/function.hpp Mon Apr  2 06:24:05 2012
@@ -33,7 +33,7 @@
 
 namespace tuscany {
 
-#ifdef WANT_MAINTAINER_MODE
+#ifdef WANT_MAINTAINER_COUNTERS
 
 /**
  * Debug counters.

Modified: tuscany/sca-cpp/trunk/kernel/gc.hpp
URL: 
http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/kernel/gc.hpp?rev=1308248&r1=1308247&r2=1308248&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/kernel/gc.hpp (original)
+++ tuscany/sca-cpp/trunk/kernel/gc.hpp Mon Apr  2 06:24:05 2012
@@ -44,7 +44,7 @@
 namespace tuscany
 {
 
-#ifdef WANT_MAINTAINER_MODE
+#ifdef WANT_MAINTAINER_ASSERT
 
 /**
  * Force a core dump on assertion violation.

Modified: tuscany/sca-cpp/trunk/kernel/list.hpp
URL: 
http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/kernel/list.hpp?rev=1308248&r1=1308247&r2=1308248&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/kernel/list.hpp (original)
+++ tuscany/sca-cpp/trunk/kernel/list.hpp Mon Apr  2 06:24:05 2012
@@ -33,12 +33,10 @@
 
 namespace tuscany {
 
-#ifdef WANT_MAINTAINER_MODE
+#ifdef WANT_MAINTAINER_COUNTERS
 
 /**
- * Debug utilities. Counters used to track instances of lists, and
- * macro used to write the contents of a list in a string, easier to
- * watch in a debugger than the list itself.
+ * Debug utilities. Counters used to track instances of lists.
  */
 long countLists = 0;
 long countILists = 0;
@@ -72,6 +70,10 @@ bool printListCounters() {
 
 #ifdef WANT_MAINTAINER_WATCH
 
+/**
+ * Debug utilities. Macro used to write the contents of a list to
+ * a string, easier to watch in a debugger than the list itself.
+ */
 #define debug_watchList() do { \
         this->watch = watchList(*this); \
     } while (0)

Modified: tuscany/sca-cpp/trunk/kernel/monad.hpp
URL: 
http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/kernel/monad.hpp?rev=1308248&r1=1308247&r2=1308248&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/kernel/monad.hpp (original)
+++ tuscany/sca-cpp/trunk/kernel/monad.hpp Mon Apr  2 06:24:05 2012
@@ -277,7 +277,7 @@ template<typename V, typename F> const l
  * Returns a failable monad with a failure in it.
  */
 template<typename V, typename F> const failable<V, F> mkfailure(const F& f, 
const bool log = true) {
-#ifdef WANT_MAINTAINER_MODE
+#ifdef WANT_MAINTAINER_LOG
     if (!log)
         debug(f, "failable::mkfailure");
 #endif

Modified: tuscany/sca-cpp/trunk/kernel/stream.hpp
URL: 
http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/kernel/stream.hpp?rev=1308248&r1=1308247&r2=1308248&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/kernel/stream.hpp (original)
+++ tuscany/sca-cpp/trunk/kernel/stream.hpp Mon Apr  2 06:24:05 2012
@@ -152,7 +152,7 @@ template<typename T> ostream& operator<<
     return out << p.ptr;
 }
 
-#ifdef WANT_MAINTAINER_MODE
+#ifdef WANT_MAINTAINER_LOG
 
 /**
  * Debug stream implementation with no dependencies on anything else.

Modified: tuscany/sca-cpp/trunk/kernel/string.hpp
URL: 
http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/kernel/string.hpp?rev=1308248&r1=1308247&r2=1308248&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/kernel/string.hpp (original)
+++ tuscany/sca-cpp/trunk/kernel/string.hpp Mon Apr  2 06:24:05 2012
@@ -34,7 +34,7 @@
 
 namespace tuscany {
 
-#ifdef WANT_MAINTAINER_MODE
+#ifdef WANT_MAINTAINER_COUNTERS
 
 /**
  * Debug utilities. Counters used to track string copies.
@@ -67,7 +67,7 @@ bool printStringCopyCounters() {
  * Instrumented memcpy.
  */
 void* string_memcpy(void* t, const void* s, const size_t n) {
-#ifdef WANT_MAINTAINER_MODE
+#ifdef WANT_MAINTAINER_COUNTERS
     countStringCopies += 1;
 #endif
     return memcpy(t, s, n);
@@ -172,7 +172,7 @@ public:
     }
 
 private:
-#ifdef WANT_MAINTAINER_MODE
+#ifdef WANT_MAINTAINER_LOG
     friend class odebugstream;
 #endif
     friend class ostringstream;

Modified: tuscany/sca-cpp/trunk/kernel/value.hpp
URL: 
http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/kernel/value.hpp?rev=1308248&r1=1308247&r2=1308248&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/kernel/value.hpp (original)
+++ tuscany/sca-cpp/trunk/kernel/value.hpp Mon Apr  2 06:24:05 2012
@@ -40,12 +40,10 @@
 namespace tuscany
 {
 
-#ifdef WANT_MAINTAINER_MODE
+#ifdef WANT_MAINTAINER_COUNTERS
 
 /**
- * Debug utilities. Counters used to track instances of values, and
- * macro used to write the contents of a value in a string, easier to
- * watch in a debugger than the value itself.
+ * Debug utilities. Counters used to track instances of values
  */
 long int countValues = 0;
 long int countEValues = 0;
@@ -79,6 +77,11 @@ bool printValueCounters() {
 
 #ifdef WANT_MAINTAINER_WATCH
 
+/**
+ * Debug utilities. Macro used to write the contents of a value to
+ * a string, easier to watch in a debugger than the value itself.
+ */
+
 #define debug_watchValue() do { \
         this->watch = watchValue(*this); \
     } while (0)

Modified: tuscany/sca-cpp/trunk/modules/http/mod-ssltunnel.cpp
URL: 
http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/http/mod-ssltunnel.cpp?rev=1308248&r1=1308247&r2=1308248&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/modules/http/mod-ssltunnel.cpp (original)
+++ tuscany/sca-cpp/trunk/modules/http/mod-ssltunnel.cpp Mon Apr  2 06:24:05 
2012
@@ -36,7 +36,7 @@
 #include "http.hpp"
 
 // Ignore cast align warnings in APR macros
-#ifdef WANT_MAINTAINER_MODE
+#ifdef WANT_MAINTAINER_WARNINGS
 #pragma GCC diagnostic ignored "-Wcast-align"
 #endif
 
@@ -373,7 +373,7 @@ module AP_MODULE_DECLARE_DATA mod_tuscan
 }
 
 // Reenable cast align warnings
-#ifdef WANT_MAINTAINER_MODE
+#ifdef WANT_MAINTAINER_WARNINGS
 #pragma GCC diagnostic warning "-Wcast-align"
 #endif
 

Modified: tuscany/sca-cpp/trunk/modules/java/eval.hpp
URL: 
http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/java/eval.hpp?rev=1308248&r1=1308247&r2=1308248&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/modules/java/eval.hpp (original)
+++ tuscany/sca-cpp/trunk/modules/java/eval.hpp Mon Apr  2 06:24:05 2012
@@ -72,7 +72,7 @@ public:
             options[args.nOptions].optionString = const_cast<char*>(c_str(cp));
             options[args.nOptions++].extraInfo = NULL;
 
-#ifdef WANT_MAINTAINER_MODE
+#ifdef WANT_MAINTAINER_ASSERT
             // Enable assertions
             options[args.nOptions++].optionString = const_cast<char*>("-ea");
 #endif

Modified: tuscany/sca-cpp/trunk/modules/js/eval.hpp
URL: 
http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/js/eval.hpp?rev=1308248&r1=1308247&r2=1308248&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/modules/js/eval.hpp (original)
+++ tuscany/sca-cpp/trunk/modules/js/eval.hpp Mon Apr  2 06:24:05 2012
@@ -27,13 +27,13 @@
  */
 
 #define XP_UNIX
-#ifdef WANT_MAINTAINER_MODE
+#ifdef WANT_MAINTAINER_WARNINGS
 #pragma GCC diagnostic ignored "-Wunused-parameter"
 #pragma GCC diagnostic ignored "-Wsign-compare"
 #pragma GCC diagnostic ignored "-Wredundant-decls"
 #endif
 #include <jsapi.h>
-#ifdef WANT_MAINTAINER_MODE
+#ifdef WANT_MAINTAINER_WARNINGS
 #pragma GCC diagnostic warning "-Wunused-parameter"
 #pragma GCC diagnostic warning "-Wsign-compare"
 #pragma GCC diagnostic ignored "-Wredundant-decls"

Modified: tuscany/sca-cpp/trunk/modules/opencl/eval.hpp
URL: 
http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/opencl/eval.hpp?rev=1308248&r1=1308247&r2=1308248&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/modules/opencl/eval.hpp (original)
+++ tuscany/sca-cpp/trunk/modules/opencl/eval.hpp Mon Apr  2 06:24:05 2012
@@ -47,11 +47,11 @@ const string clError(const cl_int e) {
     return str(s);
 }
 
-#ifdef WANT_MAINTAINER_MODE
-
 /**
  * OpenCL profiling counters.
  */
+#ifdef WANT_MAINTAINER_OPENCL_PROF
+
 cl_ulong memtime = 0;
 cl_ulong kernelqtime = 0;
 cl_ulong kerneltime = 0;
@@ -209,7 +209,7 @@ public:
 
         for (cl_uint i = 0; i < ndevs; i++) {
             cl_int cqerr;
-#ifdef WANT_MAINTAINER_MODE
+#ifdef WANT_MAINTAINER_OPENCL_PROF
             cq[i] = clCreateCommandQueue(ctx, devid[i], 
CL_QUEUE_PROFILING_ENABLE, &cqerr);
 #else
             cq[i] = clCreateCommandQueue(ctx, devid[i], 0, &cqerr);
@@ -594,7 +594,7 @@ const failable<OpenCLKernel> createKerne
  */
 const failable<value> evalKernel(const failable<OpenCLKernel>& fkernel, const 
value& expr, const size_t gwsize, const value::ValueType type, const size_t n, 
const OpenCLContext& cl) {
 
-#ifdef WANT_MAINTAINER_MODE
+#ifdef WANT_MAINTAINER_OPENCL_PROF
     const cl_uint estart = (cl_uint)timens();
     const cl_uint pstart = estart;
 #endif
@@ -643,7 +643,7 @@ const failable<value> evalKernel(const f
         return mkfailure<value>(string("Couldn't read from OpenCL device 
memory: ") + clError(rerr));
     }
 
-#ifdef WANT_MAINTAINER_MODE
+#ifdef WANT_MAINTAINER_OPENCL_PROF
     const cl_uint pend = (cl_uint)timens();
     preptime += (pend - pstart);
 #endif
@@ -656,7 +656,7 @@ const failable<value> evalKernel(const f
         return mkfailure<value>(string("Couldn't wait for kernel completion: 
") + clError(werr));
     }
 
-#ifdef WANT_MAINTAINER_MODE
+#ifdef WANT_MAINTAINER_OPENCL_PROF
     profileMemEvents(nwevt, wevt);
     profileKernelEvent(kevt);
     profileMemEvent(revt);
@@ -669,7 +669,7 @@ const failable<value> evalKernel(const f
     clReleaseEvent(revt);
     clReleaseEvent(kevt);
 
-#ifdef WANT_MAINTAINER_MODE
+#ifdef WANT_MAINTAINER_OPENCL_PROF
     const cl_uint eend = (cl_uint)timens();
     evaltime += (eend - estart);
 #endif

Modified: tuscany/sca-cpp/trunk/modules/server/mod-eval.hpp
URL: 
http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/server/mod-eval.hpp?rev=1308248&r1=1308247&r2=1308248&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/modules/server/mod-eval.hpp (original)
+++ tuscany/sca-cpp/trunk/modules/server/mod-eval.hpp Mon Apr  2 06:24:05 2012
@@ -1043,7 +1043,7 @@ int translate(request_rec *r) {
     // Create a scoped memory pool
     gc_scoped_pool pool(r->pool);
 
-    httpdDebugRequest(r, "modeval::translate::input");
+    debug_httpdRequest(r, "modeval::translate::input");
 
     // Get the server configuration
     const ServerConf& sc = httpd::serverConf<ServerConf>(r, &mod_tuscany_eval);
@@ -1142,7 +1142,7 @@ int handler(request_rec *r) {
     gc_scoped_pool pool(r->pool);
     ScopedRequest sr(r);
 
-    httpdDebugRequest(r, "modeval::handler::input");
+    debug_httpdRequest(r, "modeval::handler::input");
 
     // Get the request configuration
     RequestConf& reqc = httpd::requestConf<RequestConf>(r, &mod_tuscany_eval);


Reply via email to