Branch: Tag:

2011-05-18

2011-05-18 23:31:17 by Jonas Walldén <jonasw@roxen.com>

Implement --with-dtrace to enable source-level tracing of Pike programs using
e.g. Apple Instruments. (It's not yet balancing entry/exit properly.)

2296:    my_strcat (s->u.efun->name->str); \    do_trace_call(args_, &save_buf); \    } \ +  if (PIKE_FN_START_ENABLED()) { \ +  /* DTrace enter probe \ +  arg0: function name \ +  arg1: object \ +  */ \ +  PIKE_FN_START(s->u.efun->name->size_shift == 0 ? \ +  s->u.efun->name->str : "[widestring fn name]", \ +  ""); \ +  } \    (*(s->u.efun->function))(args_); \    DO_IF_PROFILING (s->u.efun->runs++); \    if(Pike_sp != expected_stack + !s->u.efun->may_return_void) \
2325:    my_strcat ("() "); \    do_trace_return (Pike_sp>expected_stack, &save_buf); \    } \ +  if (PIKE_FN_DONE_ENABLED()) { \ +  /* DTrace leave probe \ +  arg0: function name \ +  */ \ +  PIKE_FN_DONE(s->u.efun->name->size_shift == 0 ? \ +  s->u.efun->name->str : "[widestring fn name]"); \ +  } \   }while(0)   #else   #define DO_CALL_BUILTIN(ARGS) do { \