diff options
Diffstat (limited to 'gcc/jit/libgccjit.h')
-rw-r--r-- | gcc/jit/libgccjit.h | 84 |
1 files changed, 84 insertions, 0 deletions
diff --git a/gcc/jit/libgccjit.h b/gcc/jit/libgccjit.h index 32f2a5d..88e4ff3 100644 --- a/gcc/jit/libgccjit.h +++ b/gcc/jit/libgccjit.h @@ -1266,6 +1266,90 @@ gcc_jit_context_enable_dump (gcc_jit_context *ctxt, const char *dumpname, char **out_ptr); +/********************************************************************** + Timing support. + **********************************************************************/ + +/* The timing API was added in LIBGCCJIT_ABI_4; you can test for its + presence using + #ifdef LIBGCCJIT_HAVE_TIMING_API +*/ +#define LIBGCCJIT_HAVE_TIMING_API + +typedef struct gcc_jit_timer gcc_jit_timer; + +/* Create a gcc_jit_timer instance, and start timing. + + This API entrypoint was added in LIBGCCJIT_ABI_4; you can test for its + presence using + #ifdef LIBGCCJIT_HAVE_TIMING_API +*/ +extern gcc_jit_timer * +gcc_jit_timer_new (void); + +/* Release a gcc_jit_timer instance. + + This API entrypoint was added in LIBGCCJIT_ABI_4; you can test for its + presence using + #ifdef LIBGCCJIT_HAVE_TIMING_API +*/ +extern void +gcc_jit_timer_release (gcc_jit_timer *timer); + +/* Associate a gcc_jit_timer instance with a context. + + This API entrypoint was added in LIBGCCJIT_ABI_4; you can test for its + presence using + #ifdef LIBGCCJIT_HAVE_TIMING_API +*/ +extern void +gcc_jit_context_set_timer (gcc_jit_context *ctxt, + gcc_jit_timer *timer); + +/* Get the timer associated with a context (if any). + + This API entrypoint was added in LIBGCCJIT_ABI_4; you can test for its + presence using + #ifdef LIBGCCJIT_HAVE_TIMING_API +*/ + +extern gcc_jit_timer * +gcc_jit_context_get_timer (gcc_jit_context *ctxt); + +/* Push the given item onto the timing stack. + + This API entrypoint was added in LIBGCCJIT_ABI_4; you can test for its + presence using + #ifdef LIBGCCJIT_HAVE_TIMING_API +*/ + +extern void +gcc_jit_timer_push (gcc_jit_timer *timer, + const char *item_name); + +/* Pop the top item from the timing stack. + + This API entrypoint was added in LIBGCCJIT_ABI_4; you can test for its + presence using + #ifdef LIBGCCJIT_HAVE_TIMING_API +*/ + +extern void +gcc_jit_timer_pop (gcc_jit_timer *timer, + const char *item_name); + +/* Print timing information to the given stream about activity since + the timer was started. + + This API entrypoint was added in LIBGCCJIT_ABI_4; you can test for its + presence using + #ifdef LIBGCCJIT_HAVE_TIMING_API +*/ + +extern void +gcc_jit_timer_print (gcc_jit_timer *timer, + FILE *f_out); + #ifdef __cplusplus } #endif /* __cplusplus */ |