Changeset: 040680bfe5f7 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/040680bfe5f7
Modified Files:
        clients/Tests/exports.stable.out
        ctest/monetdb5/mal/test_malInclude.c
        monetdb5/mal/mal_profiler.c
        monetdb5/mal/mal_profiler.h
        monetdb5/optimizer/opt_fastpath.c
Branch: default
Log Message:

Unexport a bunch of stuff from mal_profiler.h.
The file is not installed, so the stuff was not externally available
anyway.


diffs (220 lines):

diff --git a/clients/Tests/exports.stable.out b/clients/Tests/exports.stable.out
--- a/clients/Tests/exports.stable.out
+++ b/clients/Tests/exports.stable.out
@@ -773,7 +773,6 @@ int MCpushClientInput(Client c, bstream 
 void MCstopClients(Client c);
 str MCsuspendClient(int id);
 int MCvalid(Client c);
-void MPresetProfiler(stream *fdout);
 char *MSP_locate_sqlscript(const char *mod_name, bit recurse);
 str MSinitClientPrg(Client cntxt, const char *mod, const char *nme);
 void MSresetInstructions(MalBlkPtr mb, int start);
@@ -851,12 +850,10 @@ int chkInstruction(Module s, MalBlkPtr m
 str chkProgram(Module s, MalBlkPtr mb);
 str chkTypes(Module s, MalBlkPtr mb, int silent);
 const char *claimRef;
-str cleanupTraces(Client cntxt);
 void clearTrace(Client cntxt);
 void clearVariable(MalBlkPtr mb, int varid);
 const char *clear_tableRef;
 int cloneVariable(MalBlkPtr dst, MalBlkPtr src, int varid);
-str closeProfilerStream(Client cntxt);
 void clrDeclarations(MalBlkPtr mb);
 void clrFunction(InstrPtr p);
 void clrInstruction(InstrPtr p);
@@ -966,9 +963,6 @@ int getBlockExit(MalBlkPtr mb, int pc);
 int getBteConstant(MalBlkPtr mb, bte val);
 Client getClientContext(void);
 int getDblConstant(MalBlkPtr mb, dbl val);
-lng getDiskReads(void);
-lng getDiskSpace(void);
-lng getDiskWrites(void);
 str getExceptionMessage(const char *);
 str getExceptionMessageAndState(const char *);
 str getExceptionPlace(const char *);
@@ -994,16 +988,12 @@ const char *getRef;
 str getScenarioLanguage(Client c);
 int getShtConstant(MalBlkPtr mb, sht val);
 int getStrConstant(MalBlkPtr mb, str val);
-lng getSystemTime(void);
-BAT *getTrace(Client cntxt, const char *nme);
 const char *getTraceRef;
 malType getType(MalBlkPtr mb, const char *nme);
 str getTypeIdentifier(malType tpe);
 str getTypeName(malType tpe);
-lng getUserTime(void);
 char *getVarName(MalBlkPtr mb, int idx);
 const char *getVariableRef;
-int getprofilerlimit(void);
 Module globalModule(const char *nme);
 const char *grantRef;
 const char *grant_functionRef;
@@ -1017,10 +1007,8 @@ const char *hgeRef;
 const char *identityRef;
 const char *ifthenelseRef;
 const char *importColumnRef;
-void initHeartbeat(void);
 void initNamespace(void);
 void initParser(void);
-void initProfiler(void);
 void insertSymbol(Module scope, Symbol prg);
 str instruction2str(MalBlkPtr mb, MalStkPtr stl, InstrPtr p, int hidden);
 const char *intRef;
@@ -1148,7 +1136,6 @@ const char *not_likeRef;
 const char *not_uniqueRef;
 const char *nth_valueRef;
 const char *ntileRef;
-str openProfilerStream(Client cntxt, int m);
 str operatorName(int i);
 void opt_pipes_reset(void);
 str optimizeMALBlock(Client cntxt, MalBlkPtr mb);
@@ -1170,8 +1157,6 @@ void printSignature(stream *fd, Symbol s
 void printStack(stream *f, MalBlkPtr mb, MalStkPtr s);
 const char *prodRef;
 void profilerEvent(MalEvent *me, NonMalEvent *nme);
-void profilerGetCPUStat(lng *user, lng *nice, lng *sys, lng *idle, lng 
*iowait);
-void profilerHeartbeatEvent(char *alter);
 int profilerMode;
 const char *profilerRef;
 int profilerStatus;
@@ -1255,7 +1240,6 @@ const char *seriesRef;
 const char *setAccessRef;
 void setArgType(MalBlkPtr mb, InstrPtr p, int i, int tpe);
 InstrPtr setArgument(MalBlkPtr mb, InstrPtr p, int idx, int varid);
-void setHeartbeat(int delay);
 void setPolymorphic(InstrPtr p, int tpe, int force);
 void setReturnArgument(InstrPtr p, int varid);
 str setScenario(Client c, str nme);
@@ -1263,7 +1247,6 @@ const char *setVariableRef;
 void setVariableScope(MalBlkPtr mb);
 void setVariableType(MalBlkPtr mb, const int idx, malType type);
 const char *set_protocolRef;
-void setprofilerlimit(int limit);
 void showAllScenarios(stream *f);
 void showCurrentScenario(void);
 void showMalBlkHistory(stream *out, MalBlkPtr mb);
@@ -1278,9 +1261,7 @@ const char *sortRef;
 const char *sortReverseRef;
 const char *sqlRef;
 const char *sqlcatalogRef;
-str startProfiler(Client cntxt);
 str startTrace(Client cntxt);
-str stopProfiler(Client cntxt);
 str stopTrace(Client cntxt);
 const char *stoptraceRef;
 void strAfterCall(ValPtr v, ValPtr bak);
diff --git a/ctest/monetdb5/mal/test_malInclude.c 
b/ctest/monetdb5/mal/test_malInclude.c
--- a/ctest/monetdb5/mal/test_malInclude.c
+++ b/ctest/monetdb5/mal/test_malInclude.c
@@ -10,7 +10,6 @@
 #include "mal.h"
 #include "mal_import.h"
 #include "mal_parser.h"
-#include "mal_profiler.h"
 
 int
 main(void)
diff --git a/monetdb5/mal/mal_profiler.c b/monetdb5/mal/mal_profiler.c
--- a/monetdb5/mal/mal_profiler.c
+++ b/monetdb5/mal/mal_profiler.c
@@ -50,6 +50,7 @@ static struct timeval startup_time;
 static ATOMIC_TYPE hbdelay = ATOMIC_VAR_INIT(0);
 
 #ifdef HAVE_SYS_RESOURCE_H
+#include <sys/resource.h>
 struct rusage infoUsage;
 static struct rusage prevUsage;
 #endif
diff --git a/monetdb5/mal/mal_profiler.h b/monetdb5/mal/mal_profiler.h
--- a/monetdb5/mal/mal_profiler.h
+++ b/monetdb5/mal/mal_profiler.h
@@ -11,16 +11,6 @@
 
 #include "mal_client.h"
 
-#ifdef HAVE_SYS_TIMES_H
-# include <sys/times.h>
-#endif
-
-#ifdef HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-typedef struct rusage Rusage;
-#endif
-
-
 enum event_phase {
        MAL_ENGINE = 0,
        CLIENT_START,
@@ -57,34 +47,39 @@ typedef struct MalEvent {
 mal_export int profilerStatus;
 mal_export int profilerMode;
 
-mal_export void initProfiler(void);
-mal_export str openProfilerStream(Client cntxt, int m);
-mal_export str closeProfilerStream(Client cntxt);
-
 mal_export void profilerEvent(MalEvent *me, NonMalEvent *nme);
 mal_export oid runtimeProfileSetTag(Client cntxt);
 
-mal_export str startProfiler(Client cntxt);
-mal_export str stopProfiler(Client cntxt);
 mal_export str startTrace(Client cntxt);
 mal_export str stopTrace(Client cntxt);
-mal_export void setHeartbeat(int delay);
-mal_export void initHeartbeat(void);
-mal_export void profilerHeartbeatEvent(char *alter);
-mal_export int getprofilerlimit(void);
-mal_export void setprofilerlimit(int limit);
-
-mal_export void MPresetProfiler(stream *fdout);
-
 mal_export void clearTrace(Client cntxt);
 mal_export int TRACEtable(Client cntxt, BAT **r);
-mal_export str cleanupTraces(Client cntxt);
-mal_export BAT *getTrace(Client cntxt, const char *nme);
+
+#ifdef LIBMONETDB5
+/* only available in monetdb5 */
+extern void initProfiler(void);
+extern str openProfilerStream(Client cntxt, int m);
+extern str closeProfilerStream(Client cntxt);
+
+extern str startProfiler(Client cntxt);
+extern str stopProfiler(Client cntxt);
+extern void setHeartbeat(int delay);
+extern void initHeartbeat(void);
+extern void profilerHeartbeatEvent(char *alter);
+extern int getprofilerlimit(void);
+extern void setprofilerlimit(int limit);
 
-mal_export lng getDiskSpace(void);
-mal_export lng getDiskReads(void);
-mal_export lng getDiskWrites(void);
-mal_export lng getUserTime(void);
-mal_export lng getSystemTime(void);
-mal_export void profilerGetCPUStat(lng *user, lng *nice, lng *sys, lng *idle, 
lng *iowait);
+extern void MPresetProfiler(stream *fdout);
+
+extern str cleanupTraces(Client cntxt);
+extern BAT *getTrace(Client cntxt, const char *nme);
+
+extern lng getDiskSpace(void);
+extern lng getDiskReads(void);
+extern lng getDiskWrites(void);
+extern lng getUserTime(void);
+extern lng getSystemTime(void);
+extern void profilerGetCPUStat(lng *user, lng *nice, lng *sys, lng *idle, lng 
*iowait);
 #endif
+
+#endif
diff --git a/monetdb5/optimizer/opt_fastpath.c 
b/monetdb5/optimizer/opt_fastpath.c
--- a/monetdb5/optimizer/opt_fastpath.c
+++ b/monetdb5/optimizer/opt_fastpath.c
@@ -43,7 +43,6 @@
 #include "opt_fastpath.h"
 #include "optimizer_private.h"
 #include "mal_interpreter.h"
-#include "mal_profiler.h"
 #include "opt_prelude.h"
 
 #define optcall(TEST, OPT) \
_______________________________________________
checkin-list mailing list -- checkin-list@monetdb.org
To unsubscribe send an email to checkin-list-le...@monetdb.org

Reply via email to