Running dtrace -h -q myprobes.d, where myprobes.d contains the following:
provider myprobes {
probe mystuff__enter(int, int);
probe mystuff__return(int, int);
};
results in a header file that has the proper macro defines. However the double
underscores are changed into single underscores. This while the convention is
to replace a double underscore with a hyphen in the final probe name.
Is this an oversight? Or intentionally?
I would like to use those reasonably named macro's in my source code, however
since using the hyphen lots of time to create a distinction and enhance
readability I really do not like this behaviour of exchanging double
underscores with a single one.
--Paul
/*
* Generated by dtrace(1M).
*/
#ifndef _MYPROBES_H
#define _MYPROBES_H
#include <unistd.h>
#ifdef __cplusplus
extern "C" {
#endif
#if _DTRACE_VERSION
#define MYPROBES_MYSTUFF_ENTER(arg0, arg1) \
__dtrace_myprobes___mystuff__enter(arg0, arg1)
#define MYPROBES_MYSTUFF_ENTER_ENABLED() \
__dtraceenabled_myprobes___mystuff__enter()
#define MYPROBES_MYSTUFF_RETURN(arg0, arg1) \
__dtrace_myprobes___mystuff__return(arg0, arg1)
#define MYPROBES_MYSTUFF_RETURN_ENABLED() \
__dtraceenabled_myprobes___mystuff__return()
exzxtern void __dtrace_myprobes___mystuff__enter(int, int);
extern int __dtraceenabled_myprobes___mystuff__enter(void);
extern void __dtrace_myprobes___mystuff__return(int, int);
extern int __dtraceenabled_myprobes___mystuff__return(void);
#else
#define MYPROBES_MYSTUFF_ENTER(arg0, arg1)
#define MYPROBES_MYSTUFF_ENTER_ENABLED() (0)
#define MYPROBES_MYSTUFF_RETURN(arg0, arg1)
#define MYPROBES_MYSTUFF_RETURN_ENABLED() (0)
#endif
#ifdef __cplusplus
}
#endif
#endif /* _MYPROBES_H */
--
This message posted from opensolaris.org
_______________________________________________
dtrace-discuss mailing list
[email protected]