src/share/vm/compiler/compileBroker.hpp

changeset 1
2d8a650513c2
parent 0
f90c822e73f8
child 26
ed5b982c0b0e
equal deleted inserted replaced
0:f90c822e73f8 1:2d8a650513c2
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
25 #ifndef SHARE_VM_COMPILER_COMPILEBROKER_HPP 31 #ifndef SHARE_VM_COMPILER_COMPILEBROKER_HPP
26 #define SHARE_VM_COMPILER_COMPILEBROKER_HPP 32 #define SHARE_VM_COMPILER_COMPILEBROKER_HPP
27 33
28 #include "ci/compilerInterface.hpp" 34 #include "ci/compilerInterface.hpp"
29 #include "compiler/abstractCompiler.hpp" 35 #include "compiler/abstractCompiler.hpp"
42 private: 48 private:
43 Monitor* _lock; 49 Monitor* _lock;
44 uint _compile_id; 50 uint _compile_id;
45 Method* _method; 51 Method* _method;
46 jobject _method_holder; 52 jobject _method_holder;
53 #ifdef MIPS64
54 int _method_code_size;
55 #endif
47 int _osr_bci; 56 int _osr_bci;
48 bool _is_complete; 57 bool _is_complete;
49 bool _is_success; 58 bool _is_success;
50 bool _is_blocking; 59 bool _is_blocking;
51 int _comp_level; 60 int _comp_level;
52 int _num_inlined_bytecodes; 61 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
53 nmethodLocker* _code_handle; // holder of eventual result 69 nmethodLocker* _code_handle; // holder of eventual result
54 CompileTask* _next, *_prev; 70 CompileTask* _next, *_prev;
55 71
56 // Fields used for logging why the compilation was initiated: 72 // Fields used for logging why the compilation was initiated:
57 jlong _time_queued; // in units of os::elapsed_counter() 73 jlong _time_queued; // in units of os::elapsed_counter()
69 methodHandle hot_method, int hot_count, const char* comment, 85 methodHandle hot_method, int hot_count, const char* comment,
70 bool is_blocking); 86 bool is_blocking);
71 87
72 void free(); 88 void free();
73 89
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
74 int compile_id() const { return _compile_id; } 103 int compile_id() const { return _compile_id; }
75 Method* method() const { return _method; } 104 Method* method() const { return _method; }
76 int osr_bci() const { return _osr_bci; } 105 int osr_bci() const { return _osr_bci; }
77 bool is_complete() const { return _is_complete; } 106 bool is_complete() const { return _is_complete; }
78 bool is_blocking() const { return _is_blocking; } 107 bool is_blocking() const { return _is_blocking; }
79 bool is_success() const { return _is_success; } 108 bool is_success() const { return _is_success; }
80 109
81 nmethodLocker* code_handle() const { return _code_handle; } 110 nmethodLocker* code_handle() const { return _code_handle; }
82 void set_code_handle(nmethodLocker* l) { _code_handle = l; } 111 void set_code_handle(nmethodLocker* l) { _code_handle = l; }
83 nmethod* code() const; // _code_handle->code() 112 nmethod* code() const; // _code_handle->code()
113 #ifdef MIPS64
114 int method_code_size() const { return _method_code_size; }
115 #endif
84 void set_code(nmethod* nm); // _code_handle->set_code(nm) 116 void set_code(nmethod* nm); // _code_handle->set_code(nm)
85 117
86 Monitor* lock() const { return _lock; } 118 Monitor* lock() const { return _lock; }
87 119
88 void mark_complete() { _is_complete = true; } 120 void mark_complete() { _is_complete = true; }
187 219
188 CompileTask* _first; 220 CompileTask* _first;
189 CompileTask* _last; 221 CompileTask* _last;
190 222
191 int _size; 223 int _size;
224 #ifdef MIPS64
225 int _queued_method_size;
226 #endif
192 public: 227 public:
193 CompileQueue(const char* name, Monitor* lock) { 228 CompileQueue(const char* name, Monitor* lock) {
194 _name = name; 229 _name = name;
195 _lock = lock; 230 _lock = lock;
196 _first = NULL; 231 _first = NULL;
197 _last = NULL; 232 _last = NULL;
198 _size = 0; 233 _size = 0;
234 #ifdef MIPS64
235 _queued_method_size = 0;
236 #endif
199 } 237 }
200 238
201 const char* name() const { return _name; } 239 const char* name() const { return _name; }
202 Monitor* lock() const { return _lock; } 240 Monitor* lock() const { return _lock; }
203 241

mercurial