Profiler.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1996-2017 The Squid Software Foundation and contributors
3  *
4  * Squid software is distributed under GPLv2+ license and includes
5  * contributions from numerous individuals and organizations.
6  * Please see the COPYING and CONTRIBUTORS files for details.
7  */
8 
9 #ifndef _PROFILER_H_
10 #define _PROFILER_H_
11 
12 #ifdef __cplusplus
13 extern "C" {
14 #endif
15 
16 // NP: CPU support for get_tick() determines whether we can profile.
17 // always include get_tick.h first since it may undefine USE_XPROF_STATS
18 
19 #include "profiler/get_tick.h"
20 #include "profiler/xprof_type.h"
21 
22 #if !USE_XPROF_STATS
23 
24 #define PROF_start(probename) ((void)0)
25 #define PROF_stop(probename) ((void)0)
26 
27 #else /* USE_XPROF_STATS */
28 
29 #define XP_NOBEST (hrtime_t)-1
30 
32 
34 
43  int64_t summ;
44 };
45 
47  const char *name;
50 };
51 
53 
54 /* public Data */
55 extern TimersArray *xprof_Timers;
56 
57 /* Exported functions */
58 extern void xprof_start(xprof_type type, const char *timer);
59 extern void xprof_stop(xprof_type type, const char *timer);
60 extern void xprof_event(void *data);
61 
62 #define PROF_start(probename) xprof_start(XPROF_##probename, #probename)
63 #define PROF_stop(probename) xprof_stop(XPROF_##probename, #probename)
64 
65 #endif /* USE_XPROF_STATS */
66 
67 #ifdef __cplusplus
68 }
69 #endif
70 #endif /* _PROFILING_H_ */
71 
int type
Definition: errorpage.cc:79
xprof_stats_node TimersArray[1]
Definition: Profiler.h:52
void xprof_event(void *data)
Definition: ProfStats.cc:271
hrtime_t count
Definition: Profiler.h:41
hrtime_t delta
Definition: Profiler.h:38
hrtime_t worst
Definition: Profiler.h:40
xprof_stats_data hist
Definition: Profiler.h:49
void const char HLPCB void * data
Definition: stub_helper.cc:16
hrtime_t best
Definition: Profiler.h:39
hrtime_t start
Definition: Profiler.h:36
TimersArray * xprof_Timers
Definition: Profiler.cc:108
xprof_stats_data accu
Definition: Profiler.h:48
void xprof_stop(xprof_type type, const char *timer)
Definition: Profiler.cc:190
int64_t summ
Definition: Profiler.h:43
xprof_type
Definition: xprof_type.h:13
hrtime_t stop
Definition: Profiler.h:37
hrtime_t accum
Definition: Profiler.h:42
const char * name
Definition: Profiler.h:47
int64_t hrtime_t
Definition: get_tick.h:19
void xprof_start(xprof_type type, const char *timer)
Definition: Profiler.cc:158

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors