# include <starlet.h> /* prototype for sys$gettim() */
# include <lib$routines.h>
# define Times(ptr) (dprof_times(aTHX_ ptr))
+# define NEEDS_DPROF_TIMES
#else
# ifndef HZ
# ifdef CLK_TCK
# endif
# ifdef OS2 /* times() has significant overhead */
# define Times(ptr) (dprof_times(aTHX_ ptr))
+# define NEEDS_DPROF_TIMES
# define INCL_DOSPROFILE
# define INCL_DOSERRORS
# include <os2.h>
clock_t tms_utime; /* cpu time spent in user space */
clock_t tms_stime; /* cpu time spent in system */
clock_t realtime; /* elapsed real time, in ticks */
- char *name;
+ const char *name;
U32 id;
opcode ptype;
};
typedef struct {
U32 dprof_ticks;
- char* out_file_name; /* output file (defaults to tmon.out) */
+ const char* out_file_name; /* output file (defaults to tmon.out) */
PerlIO* fp; /* pointer to tmon.out file */
Off_t TIMES_LOCATION; /* Where in the file to store the time totals */
int SAVE_STACK; /* How much data to buffer until end of run */
# define g_start_cnt g_prof_state.start_cnt
#endif
+#ifdef NEEDS_DPROF_TIMES
static clock_t
dprof_times(pTHX_ struct tms *t)
{
# endif
#endif
}
+#endif
static void
prof_dumpa(pTHX_ opcode ptype, U32 id)
CV * const cv = db_get_cv(aTHX_ Sub);
GV * const gv = CvGV(cv);
- pname = GvSTASH(gv) ? HvNAME_get(GvSTASH(gv)) : 0;
+ pname = GvSTASH(gv) ? HvNAME_get(GvSTASH(gv)) : NULL;
pname = pname ? pname : (char *) "(null)";
gname = GvNAME(gv);