src/share/vm/compiler/compileBroker.hpp

changeset 26
ed5b982c0b0e
parent 1
2d8a650513c2
child 6876
710a3c8b516e
equal deleted inserted replaced
25:873fd82b133d 26:ed5b982c0b0e
20 * or visit www.oracle.com if you need additional information or have any 20 * or visit www.oracle.com if you need additional information or have any
21 * questions. 21 * questions.
22 * 22 *
23 */ 23 */
24 24
25 /*
26 * This file has been modified by Loongson Technology in 2015. These
27 * modifications are Copyright (c) 2015 Loongson Technology, and are made
28 * available on the same license terms set forth above.
29 */
30
31 #ifndef SHARE_VM_COMPILER_COMPILEBROKER_HPP 25 #ifndef SHARE_VM_COMPILER_COMPILEBROKER_HPP
32 #define SHARE_VM_COMPILER_COMPILEBROKER_HPP 26 #define SHARE_VM_COMPILER_COMPILEBROKER_HPP
33 27
34 #include "ci/compilerInterface.hpp" 28 #include "ci/compilerInterface.hpp"
35 #include "compiler/abstractCompiler.hpp" 29 #include "compiler/abstractCompiler.hpp"
48 private: 42 private:
49 Monitor* _lock; 43 Monitor* _lock;
50 uint _compile_id; 44 uint _compile_id;
51 Method* _method; 45 Method* _method;
52 jobject _method_holder; 46 jobject _method_holder;
53 #ifdef MIPS64
54 int _method_code_size;
55 #endif
56 int _osr_bci; 47 int _osr_bci;
57 bool _is_complete; 48 bool _is_complete;
58 bool _is_success; 49 bool _is_success;
59 bool _is_blocking; 50 bool _is_blocking;
60 int _comp_level; 51 int _comp_level;
61 int _num_inlined_bytecodes; 52 int _num_inlined_bytecodes;
62 #ifdef MIPS64
63 int _prev_ic_count;
64 int _prev_bc_count;
65 jlong _prev_time;
66 double _speed;
67 int _weight;
68 #endif
69 nmethodLocker* _code_handle; // holder of eventual result 53 nmethodLocker* _code_handle; // holder of eventual result
70 CompileTask* _next, *_prev; 54 CompileTask* _next, *_prev;
71 55
72 // Fields used for logging why the compilation was initiated: 56 // Fields used for logging why the compilation was initiated:
73 jlong _time_queued; // in units of os::elapsed_counter() 57 jlong _time_queued; // in units of os::elapsed_counter()
85 methodHandle hot_method, int hot_count, const char* comment, 69 methodHandle hot_method, int hot_count, const char* comment,
86 bool is_blocking); 70 bool is_blocking);
87 71
88 void free(); 72 void free();
89 73
90 #ifdef MIPS64
91 int prev_ic_count() const { return _prev_ic_count; }
92 void set_prev_ic_count(int c) { _prev_ic_count = c; }
93 int prev_bc_count() const { return _prev_bc_count; }
94 void set_prev_bc_count(int c) { _prev_bc_count = c; }
95 jlong prev_time() const { return _prev_time; }
96 void set_prev_time(jlong t) { _prev_time = t; }
97 double speed() const { return _speed; }
98 void set_speed(double s) { _speed = s; };
99 int weight() const { return _weight;}
100 void set_weight();
101 void set_weight(int w) { _weight = w;}
102 #endif
103 int compile_id() const { return _compile_id; } 74 int compile_id() const { return _compile_id; }
104 Method* method() const { return _method; } 75 Method* method() const { return _method; }
105 int osr_bci() const { return _osr_bci; } 76 int osr_bci() const { return _osr_bci; }
106 bool is_complete() const { return _is_complete; } 77 bool is_complete() const { return _is_complete; }
107 bool is_blocking() const { return _is_blocking; } 78 bool is_blocking() const { return _is_blocking; }
108 bool is_success() const { return _is_success; } 79 bool is_success() const { return _is_success; }
109 80
110 nmethodLocker* code_handle() const { return _code_handle; } 81 nmethodLocker* code_handle() const { return _code_handle; }
111 void set_code_handle(nmethodLocker* l) { _code_handle = l; } 82 void set_code_handle(nmethodLocker* l) { _code_handle = l; }
112 nmethod* code() const; // _code_handle->code() 83 nmethod* code() const; // _code_handle->code()
113 #ifdef MIPS64
114 int method_code_size() const { return _method_code_size; }
115 #endif
116 void set_code(nmethod* nm); // _code_handle->set_code(nm) 84 void set_code(nmethod* nm); // _code_handle->set_code(nm)
117 85
118 Monitor* lock() const { return _lock; } 86 Monitor* lock() const { return _lock; }
119 87
120 void mark_complete() { _is_complete = true; } 88 void mark_complete() { _is_complete = true; }
219 187
220 CompileTask* _first; 188 CompileTask* _first;
221 CompileTask* _last; 189 CompileTask* _last;
222 190
223 int _size; 191 int _size;
224 #ifdef MIPS64
225 int _queued_method_size;
226 #endif
227 public: 192 public:
228 CompileQueue(const char* name, Monitor* lock) { 193 CompileQueue(const char* name, Monitor* lock) {
229 _name = name; 194 _name = name;
230 _lock = lock; 195 _lock = lock;
231 _first = NULL; 196 _first = NULL;
232 _last = NULL; 197 _last = NULL;
233 _size = 0; 198 _size = 0;
234 #ifdef MIPS64
235 _queued_method_size = 0;
236 #endif
237 } 199 }
238 200
239 const char* name() const { return _name; } 201 const char* name() const { return _name; }
240 Monitor* lock() const { return _lock; } 202 Monitor* lock() const { return _lock; }
241 203

mercurial