summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
Diffstat (limited to 'generic')
-rw-r--r--generic/tclCompile.h8
-rw-r--r--generic/tclDTrace.d54
-rw-r--r--generic/tclInt.h5
3 files changed, 38 insertions, 29 deletions
diff --git a/generic/tclCompile.h b/generic/tclCompile.h
index ac4990e..aba100a 100644
--- a/generic/tclCompile.h
+++ b/generic/tclCompile.h
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclCompile.h,v 1.109 2008/10/07 21:24:43 nijtmans Exp $
+ * RCS: @(#) $Id: tclCompile.h,v 1.110 2008/10/10 04:09:27 das Exp $
*/
#ifndef _TCLCOMPILATION
@@ -1248,8 +1248,6 @@ MODULE_SCOPE int TclWordKnownAtCompileTime(Tcl_Token *tokenPtr,
#ifdef USE_DTRACE
-#include "tclDTrace.h"
-
#if defined(__GNUC__) && __GNUC__ > 2
/* Use gcc branch prediction hint to minimize cost of DTrace ENABLED checks. */
#define unlikely(x) (__builtin_expect((x), 0))
@@ -1285,8 +1283,8 @@ MODULE_SCOPE int TclWordKnownAtCompileTime(Tcl_Token *tokenPtr,
#define TCL_DTRACE_INST_START_ENABLED() unlikely(TCL_INST_START_ENABLED())
#define TCL_DTRACE_INST_DONE_ENABLED() unlikely(TCL_INST_DONE_ENABLED())
-#define TCL_DTRACE_INST_START(a0, a1, a2) TCL_INST_START((char *)a0, a1, a2)
-#define TCL_DTRACE_INST_DONE(a0, a1, a2) TCL_INST_DONE((char *)a0, a1, a2)
+#define TCL_DTRACE_INST_START(a0, a1, a2) TCL_INST_START(a0, a1, a2)
+#define TCL_DTRACE_INST_DONE(a0, a1, a2) TCL_INST_DONE(a0, a1, a2)
#define TCL_DTRACE_TCL_PROBE_ENABLED() unlikely(TCL_TCL_PROBE_ENABLED())
#define TCL_DTRACE_TCL_PROBE(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) \
diff --git a/generic/tclDTrace.d b/generic/tclDTrace.d
index 65c804e..535a9ff 100644
--- a/generic/tclDTrace.d
+++ b/generic/tclDTrace.d
@@ -3,15 +3,16 @@
*
* Tcl DTrace provider.
*
- * Copyright (c) 2007 Daniel A. Steffen <das@users.sourceforge.net>
+ * Copyright (c) 2007-2008 Daniel A. Steffen <das@users.sourceforge.net>
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclDTrace.d,v 1.3 2008/08/14 02:11:51 das Exp $
+ * RCS: @(#) $Id: tclDTrace.d,v 1.4 2008/10/10 04:09:27 das Exp $
*/
typedef struct Tcl_Obj Tcl_Obj;
+typedef const char* TclDTraceStr;
/*
* Tcl DTrace probes
@@ -26,14 +27,14 @@ provider tcl {
* arg1: number of arguments (int)
* arg2: array of proc argument objects (Tcl_Obj**)
*/
- probe proc__entry(char* name, int objc, Tcl_Obj **objv);
+ probe proc__entry(TclDTraceStr name, int objc, Tcl_Obj **objv);
/*
* tcl*:::proc-return probe
* triggered immediately after proc bytecode execution
* arg0: proc name (string)
* arg1: return code (int)
*/
- probe proc__return(char* name, int code);
+ probe proc__return(TclDTraceStr name, int code);
/*
* tcl*:::proc-result probe
* triggered after proc-return probe and result processing
@@ -42,7 +43,8 @@ provider tcl {
* arg2: proc result (string)
* arg3: proc result object (Tcl_Obj*)
*/
- probe proc__result(char* name, int code, char* result, Tcl_Obj *resultobj);
+ probe proc__result(TclDTraceStr name, int code, TclDTraceStr result,
+ Tcl_Obj *resultobj);
/*
* tcl*:::proc-args probe
* triggered before proc-entry probe, gives access to string
@@ -50,9 +52,10 @@ provider tcl {
* arg0: proc name (string)
* arg1-arg9: proc arguments or NULL (strings)
*/
- probe proc__args(char* name, char* arg1, char* arg2, char* arg3,
- char* arg4, char* arg5, char* arg6, char* arg7, char* arg8,
- char* arg9);
+ probe proc__args(TclDTraceStr name, TclDTraceStr arg1, TclDTraceStr arg2,
+ TclDTraceStr arg3, TclDTraceStr arg4, TclDTraceStr arg5,
+ TclDTraceStr arg6, TclDTraceStr arg7, TclDTraceStr arg8,
+ TclDTraceStr arg9);
/*
* tcl*:::proc-info probe
* triggered before proc-entry probe, gives access to TIP 280
@@ -66,8 +69,9 @@ provider tcl {
* arg6: TclOO method (string)
* arg7: TclOO class/object (string)
*/
- probe proc__info(char* cmd, char* type, char* proc, char* file, int line,
- int level, char* method, char* class);
+ probe proc__info(TclDTraceStr cmd, TclDTraceStr type, TclDTraceStr proc,
+ TclDTraceStr file, int line, int level, TclDTraceStr method,
+ TclDTraceStr class);
/***************************** cmd probes ******************************/
/*
@@ -77,14 +81,14 @@ provider tcl {
* arg1: number of arguments (int)
* arg2: array of command argument objects (Tcl_Obj**)
*/
- probe cmd__entry(char* name, int objc, Tcl_Obj **objv);
+ probe cmd__entry(TclDTraceStr name, int objc, Tcl_Obj **objv);
/*
* tcl*:::cmd-return probe
* triggered immediately after commmand execution
* arg0: command name (string)
* arg1: return code (int)
*/
- probe cmd__return(char* name, int code);
+ probe cmd__return(TclDTraceStr name, int code);
/*
* tcl*:::cmd-result probe
* triggered after cmd-return probe and result processing
@@ -93,7 +97,8 @@ provider tcl {
* arg2: command result (string)
* arg3: command result object (Tcl_Obj*)
*/
- probe cmd__result(char* name, int code, char* result, Tcl_Obj *resultobj);
+ probe cmd__result(TclDTraceStr name, int code, TclDTraceStr result,
+ Tcl_Obj *resultobj);
/*
* tcl*:::cmd-args probe
* triggered before cmd-entry probe, gives access to string
@@ -101,9 +106,10 @@ provider tcl {
* arg0: command name (string)
* arg1-arg9: command arguments or NULL (strings)
*/
- probe cmd__args(char* name, char* arg1, char* arg2, char* arg3,
- char* arg4, char* arg5, char* arg6, char* arg7, char* arg8,
- char* arg9);
+ probe cmd__args(TclDTraceStr name, TclDTraceStr arg1, TclDTraceStr arg2,
+ TclDTraceStr arg3, TclDTraceStr arg4, TclDTraceStr arg5,
+ TclDTraceStr arg6, TclDTraceStr arg7, TclDTraceStr arg8,
+ TclDTraceStr arg9);
/*
* tcl*:::cmd-info probe
* triggered before cmd-entry probe, gives access to TIP 280
@@ -117,8 +123,9 @@ provider tcl {
* arg6: TclOO method (string)
* arg7: TclOO class/object (string)
*/
- probe cmd__info(char* cmd, char* type, char* proc, char* file, int line,
- int level, char* method, char* class);
+ probe cmd__info(TclDTraceStr cmd, TclDTraceStr type, TclDTraceStr proc,
+ TclDTraceStr file, int line, int level, TclDTraceStr method,
+ TclDTraceStr class);
/***************************** inst probes *****************************/
/*
@@ -128,7 +135,7 @@ provider tcl {
* arg1: depth of stack (int)
* arg2: top of stack (Tcl_Obj**)
*/
- probe inst__start(char* name, int depth, Tcl_Obj **stack);
+ probe inst__start(TclDTraceStr name, int depth, Tcl_Obj **stack);
/*
* tcl*:::inst-done probe
* triggered immediately after execution of a bytecode
@@ -136,7 +143,7 @@ provider tcl {
* arg1: depth of stack (int)
* arg2: top of stack (Tcl_Obj**)
*/
- probe inst__done(char* name, int depth, Tcl_Obj **stack);
+ probe inst__done(TclDTraceStr name, int depth, Tcl_Obj **stack);
/***************************** obj probes ******************************/
/*
@@ -158,9 +165,10 @@ provider tcl {
* triggered when the ::tcl::dtrace command is called
* arg0-arg9: command arguments (strings)
*/
- probe tcl__probe(char* arg0, char* arg1, char* arg2, char* arg3,
- char* arg4, char* arg5, char* arg6, char* arg7, char* arg8,
- char* arg9);
+ probe tcl__probe(TclDTraceStr arg0, TclDTraceStr arg1, TclDTraceStr arg2,
+ TclDTraceStr arg3, TclDTraceStr arg4, TclDTraceStr arg5,
+ TclDTraceStr arg6, TclDTraceStr arg7, TclDTraceStr arg8,
+ TclDTraceStr arg9);
};
/*
diff --git a/generic/tclInt.h b/generic/tclInt.h
index d33dd1d..2487b68 100644
--- a/generic/tclInt.h
+++ b/generic/tclInt.h
@@ -15,7 +15,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclInt.h,v 1.402 2008/10/07 17:57:43 msofer Exp $
+ * RCS: @(#) $Id: tclInt.h,v 1.403 2008/10/10 04:09:27 das Exp $
*/
#ifndef _TCLINT
@@ -3453,7 +3453,10 @@ MODULE_SCOPE unsigned TclHashObjKey(Tcl_HashTable *tablePtr, void *keyPtr);
*/
#ifdef USE_DTRACE
+#ifndef _TCLDTRACE_H
+typedef const char* TclDTraceStr;
#include "tclDTrace.h"
+#endif
#define TCL_DTRACE_OBJ_CREATE(objPtr) TCL_OBJ_CREATE(objPtr)
#define TCL_DTRACE_OBJ_FREE(objPtr) TCL_OBJ_FREE(objPtr)
#else /* USE_DTRACE */