beta-0.89.2
[luatex.git] / source / texk / web2c / luatexdir / luaprofiler / stack.h
blobac27aaa2907aa008751ba635019673455e6fa1f7
1 /*
2 ** LuaProfiler
3 ** Copyright Kepler Project 2005-2007 (http://www.keplerproject.org/luaprofiler)
4 ** $Id: stack.h,v 1.5 2007/08/22 19:23:53 carregal Exp $
5 */
7 /*****************************************************************************
8 stack.h:
9 Simple stack manipulation
10 *****************************************************************************/
12 #ifndef _STACK_H
13 #define _STACK_H
15 #include <time.h>
17 typedef struct lprofS_sSTACK_RECORD lprofS_STACK_RECORD;
19 struct lprofS_sSTACK_RECORD {
20 clock_t time_marker_function_local_time;
21 clock_t time_marker_function_total_time;
22 char *file_defined;
23 char *function_name;
24 char *source_code;
25 long line_defined;
26 long current_line;
27 float local_time;
28 float total_time;
29 lprofS_STACK_RECORD *next;
32 typedef lprofS_STACK_RECORD *lprofS_STACK;
34 typedef struct lprofP_sSTATE lprofP_STATE;
36 struct lprofP_sSTATE {
37 int stack_level;
38 lprofS_STACK stack_top;
41 void lprofS_push(lprofS_STACK *p, lprofS_STACK_RECORD r);
42 lprofS_STACK_RECORD lprofS_pop(lprofS_STACK *p);
44 #endif