CACAO
Main Page
Related Pages
Modules
Namespaces
Data Structures
Files
File List
Globals
source
cacao
src
vm
jit
optimizing
profile.hpp
Go to the documentation of this file.
1
/* src/vm/jit/optimizing/profile.hpp - runtime profiling
2
3
Copyright (C) 1996-2005, 2006, 2008, 2009
4
CACAOVM - Verein zur Foerderung der freien virtuellen Maschine CACAO
5
Copyright (C) 2009 Theobroma Systems Ltd.
6
7
This file is part of CACAO.
8
9
This program is free software; you can redistribute it and/or
10
modify it under the terms of the GNU General Public License as
11
published by the Free Software Foundation; either version 2, or (at
12
your option) any later version.
13
14
This program is distributed in the hope that it will be useful, but
15
WITHOUT ANY WARRANTY; without even the implied warranty of
16
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17
General Public License for more details.
18
19
You should have received a copy of the GNU General Public License
20
along with this program; if not, write to the Free Software
21
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
22
02110-1301, USA.
23
24
*/
25
26
27
#ifndef _PROFILE_HPP
28
#define _PROFILE_HPP
29
30
#include "config.h"
31
32
#include "
vm/types.hpp
"
33
34
#include "
vm/global.hpp
"
35
36
37
/* CPU cycle counting macros **************************************************/
38
39
#if defined(ENABLE_PROFILING)
40
41
#define PROFILE_CYCLE_START \
42
do { \
43
if (JITDATA_HAS_FLAG_INSTRUMENT(jd)) { \
44
emit_profile_cycle_start(cd, code); \
45
} \
46
} while (0)
47
48
#define PROFILE_CYCLE_STOP \
49
do { \
50
if (JITDATA_HAS_FLAG_INSTRUMENT(jd)) { \
51
emit_profile_cycle_stop(cd, code); \
52
} \
53
} while (0)
54
55
#else
56
57
#define PROFILE_CYCLE_START
/* nop */
58
#define PROFILE_CYCLE_STOP
/* nop */
59
60
#endif
61
62
63
/* function prototypes ********************************************************/
64
65
bool
profile_init
(
void
);
66
bool
profile_start_thread
(
void
);
67
68
#if !defined(NDEBUG)
69
void
profile_printstats
(
void
);
70
#endif
71
72
#endif
/* _PROFILE_HPP */
73
74
75
/*
76
* These are local overrides for various environment variables in Emacs.
77
* Please do not remove this and leave it at the end of the file, where
78
* Emacs will automagically detect them.
79
* ---------------------------------------------------------------------
80
* Local variables:
81
* mode: c++
82
* indent-tabs-mode: t
83
* c-basic-offset: 4
84
* tab-width: 4
85
* End:
86
*/
types.hpp
profile_printstats
void profile_printstats(void)
Prints profiling statistics gathered during runtime.
Definition:
profile.cpp:209
profile_start_thread
bool profile_start_thread(void)
Definition:
profile.cpp:175
profile_init
bool profile_init(void)
Definition:
profile.cpp:60
global.hpp
Generated on Fri Aug 4 2017 03:01:54 for CACAO by
1.8.5