RSS

(root)/ildjit/libiljitirprofiler : 1 : src/irspecializer_perform.h

« back to all changes in this revision

Viewing changes to src/irspecializer_perform.h

Speziale Ettore
2009-11-18 09:55:46
Revision ID: ettore@mars-20091118095546-yfnbhnvbiw32txil
Initial import into Bazaar.

Show diffs side-by-side

added added

removed removed

 
1
/*
 
2
 * Copyright (C) 2007, 2008  Campanoni Simone, Anelli Stefano
 
3
 *
 
4
 * iljit - This is a Just-in-time for the CIL language specified with the ECMA-335
 
5
 *
 
6
 * This program is free software; you can redistribute it and/or modify
 
7
 * it under the terms of the GNU General Public License as published by
 
8
 * the Free Software Foundation; either version 2 of the License, or
 
9
 * (at your option) any later version.
 
10
 *
 
11
 * This program is distributed in the hope that it will be useful,
 
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
14
 * GNU General Public License for more details.
 
15
 *
 
16
 * You should have received a copy of the GNU General Public License
 
17
 * along with this program; if not, write to the Free Software
 
18
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
19
 */
 
20
 
 
21
#ifndef IRSPECIALIZER_PERFORM_H
 
22
#define IRSPECIALIZER_PERFORM_H
 
23
 
 
24
#include <xanlib.h>
 
25
 
 
26
#include "irprofiler.h"
 
27
#include "irspecializer.h"
 
28
 
 
29
/* Select if you want to use the first or the second way to implement the first profiler */
 
30
#define SPECIALIZER_FIRST_PROFILER_FIRST_WAY
 
31
#ifdef SPECIALIZER_FIRST_PROFILER_FIRST_WAY
 
32
        #undef SPECIALIZER_FIRST_PROFILER_SECOND_WAY
 
33
#else
 
34
        #define SPECIALIZER_FIRST_PROFILER_SECOND_WAY
 
35
#endif
 
36
 
 
37
/* Select if you want to use the first or the second way to implement the second profiler */
 
38
#define SPECIALIZER_SECOND_PROFILER_FIRST_WAY
 
39
#ifdef SPECIALIZER_SECOND_PROFILER_FIRST_WAY
 
40
        #undef SPECIALIZER_SECOND_PROFILER_SECOND_WAY
 
41
#else
 
42
        #define SPECIALIZER_SECOND_PROFILER_SECOND_WAY
 
43
#endif
 
44
 
 
45
/* Select if you want to use the first or the second way to implement the dispatcher */
 
46
#define SPECIALIZER_DISPATCHER_FIRST_WAY
 
47
#ifdef SPECIALIZER_DISPATCHER_FIRST_WAY
 
48
        #undef SPECIALIZER_DISPATCHER_SECOND_WAY
 
49
#else
 
50
        #define SPECIALIZER_DISPATCHER_SECOND_WAY
 
51
#endif
 
52
/* Select if you want to use the first or the second way to implement the type dispatcher */
 
53
#define SPECIALIZER_TYPE_DISPATCHER_FIRST_WAY
 
54
#ifdef SPECIALIZER_TYPE_DISPATCHER_FIRST_WAY
 
55
        #undef SPECIALIZER_TYPE_DISPATCHER_SECOND_WAY
 
56
#else
 
57
        #define SPECIALIZER_TYPE_DISPATCHER_SECOND_WAY
 
58
#endif
 
59
 
 
60
/* ----------------------------------------- Request for recompile method -----------------------------------------*/
 
61
/**
 
62
 * @brief Native call used inside the IR code to request method recompile
 
63
 */
 
64
void specializer_method_recompile_request(specializer_method_wrapper_t* callerWrapper, specializer_method_callSite_t* callSite, ir_specializer_t* specializer);
 
65
 
 
66
/**
 
67
 *@brief Generate the call parameters for a IRICALL to specializer_method_recompile
 
68
 */
 
69
XanList* specializer_method_recompile_getCallParameters(specializer_method_wrapper_t* callerWrapper, specializer_method_callSite_t* callSite, ir_specializer_t* specializer);
 
70
 
 
71
/* ----------------------------------------- First profiler remove and inject --------------------------------------------*/
 
72
void specializer_method_callSite_firstProfiler_inject(specializer_method_callSite_firstProfiler_t* profiler, specializer_method_wrapper_t* callerWrapper, ir_specializer_t* specializer);
 
73
void specializer_method_callSite_firstProfiler_remove(specializer_method_callSite_firstProfiler_t* profiler, specializer_method_wrapper_t* callerWrapper);
 
74
 
 
75
/* ----------------------------------------- Second profiler remove and inject --------------------------------------------*/
 
76
void specializer_method_callSite_secondProfiler_inject(specializer_method_callSite_secondProfiler_t* profiler, specializer_method_wrapper_t* callerWrapper, ir_specializer_t* specializer);
 
77
void specializer_method_callSite_secondProfiler_remove(specializer_method_callSite_secondProfiler_t* profiler, specializer_method_wrapper_t* callerWrapper);
 
78
 
 
79
/* ----------------------------------------- Dispatcher remove and inject --------------------------------------------*/
 
80
void specializer_method_callSite_dispatcher_inject(specializer_method_callSite_dispatcher_t* dispatcher, specializer_method_wrapper_t* callerWrapper, XanList* staticExpressions, ir_specializer_t* specializer);
 
81
void specializer_method_callSite_dispatcher_remove(specializer_method_callSite_dispatcher_t* dispatcher, specializer_method_wrapper_t* callerWrapper);
 
82
 
 
83
/* ----------------------------------------- Type Dispatcher remove and inject --------------------------------------------*/
 
84
JITBOOLEAN specializer_method_callSite_type_dispatcher_inject(specializer_method_callSite_type_dispatcher_t* dispatcher, specializer_method_wrapper_t* callerWrapper, JITUINT32* firstProfilerMemory, JITUINT32 firstProfilerCounter, ir_specializer_t* specializer);
 
85
void specializer_method_callSite_type_dispatcher_remove(specializer_method_callSite_type_dispatcher_t* dispatcher, specializer_method_wrapper_t* callerWrapper);
 
86
 
 
87
#endif

Loggerhead 1.17 is a web-based interface for Bazaar branches