Mercurial > hg > graal-jvmci-8
comparison src/share/vm/compiler/compileBroker.hpp @ 6725:da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
Summary: Remove PermGen, allocate meta-data in metaspace linked to class loaders, rewrite GC walking, rewrite and rename metadata to be C++ classes
Reviewed-by: jmasa, stefank, never, coleenp, kvn, brutisso, mgerdin, dholmes, jrose, twisti, roland
Contributed-by: jmasa <jon.masamitsu@oracle.com>, stefank <stefan.karlsson@oracle.com>, mgerdin <mikael.gerdin@oracle.com>, never <tom.rodriguez@oracle.com>
author | coleenp |
---|---|
date | Sat, 01 Sep 2012 13:25:18 -0400 |
parents | 1d7922586cf6 |
children | 9191895df19d |
comparison
equal
deleted
inserted
replaced
6724:36d1d483d5d6 | 6725:da91efe96a93 |
---|---|
40 friend class VMStructs; | 40 friend class VMStructs; |
41 | 41 |
42 private: | 42 private: |
43 Monitor* _lock; | 43 Monitor* _lock; |
44 uint _compile_id; | 44 uint _compile_id; |
45 jobject _method; | 45 Method* _method; |
46 jobject _method_loader; | |
46 int _osr_bci; | 47 int _osr_bci; |
47 bool _is_complete; | 48 bool _is_complete; |
48 bool _is_success; | 49 bool _is_success; |
49 bool _is_blocking; | 50 bool _is_blocking; |
50 int _comp_level; | 51 int _comp_level; |
52 nmethodLocker* _code_handle; // holder of eventual result | 53 nmethodLocker* _code_handle; // holder of eventual result |
53 CompileTask* _next, *_prev; | 54 CompileTask* _next, *_prev; |
54 | 55 |
55 // Fields used for logging why the compilation was initiated: | 56 // Fields used for logging why the compilation was initiated: |
56 jlong _time_queued; // in units of os::elapsed_counter() | 57 jlong _time_queued; // in units of os::elapsed_counter() |
57 jobject _hot_method; // which method actually triggered this task | 58 Method* _hot_method; // which method actually triggered this task |
59 jobject _hot_method_loader; | |
58 int _hot_count; // information about its invocation counter | 60 int _hot_count; // information about its invocation counter |
59 const char* _comment; // more info about the task | 61 const char* _comment; // more info about the task |
60 | 62 |
61 public: | 63 public: |
62 CompileTask() { | 64 CompileTask() { |
68 bool is_blocking); | 70 bool is_blocking); |
69 | 71 |
70 void free(); | 72 void free(); |
71 | 73 |
72 int compile_id() const { return _compile_id; } | 74 int compile_id() const { return _compile_id; } |
73 jobject method_handle() const { return _method; } | 75 Method* method() const { return _method; } |
74 int osr_bci() const { return _osr_bci; } | 76 int osr_bci() const { return _osr_bci; } |
75 bool is_complete() const { return _is_complete; } | 77 bool is_complete() const { return _is_complete; } |
76 bool is_blocking() const { return _is_blocking; } | 78 bool is_blocking() const { return _is_blocking; } |
77 bool is_success() const { return _is_success; } | 79 bool is_success() const { return _is_success; } |
78 | 80 |
96 void set_next(CompileTask* next) { _next = next; } | 98 void set_next(CompileTask* next) { _next = next; } |
97 CompileTask* prev() const { return _prev; } | 99 CompileTask* prev() const { return _prev; } |
98 void set_prev(CompileTask* prev) { _prev = prev; } | 100 void set_prev(CompileTask* prev) { _prev = prev; } |
99 | 101 |
100 private: | 102 private: |
101 static void print_compilation_impl(outputStream* st, methodOop method, int compile_id, int comp_level, | 103 static void print_compilation_impl(outputStream* st, Method* method, int compile_id, int comp_level, |
102 bool is_osr_method = false, int osr_bci = -1, bool is_blocking = false, | 104 bool is_osr_method = false, int osr_bci = -1, bool is_blocking = false, |
103 const char* msg = NULL, bool short_form = false); | 105 const char* msg = NULL, bool short_form = false); |
104 | 106 |
105 public: | 107 public: |
106 void print_compilation(outputStream* st = tty, bool short_form = false); | 108 void print_compilation(outputStream* st = tty, bool short_form = false); |
112 | 114 |
113 static void print_inlining(outputStream* st, ciMethod* method, int inline_level, int bci, const char* msg = NULL); | 115 static void print_inlining(outputStream* st, ciMethod* method, int inline_level, int bci, const char* msg = NULL); |
114 static void print_inlining(ciMethod* method, int inline_level, int bci, const char* msg = NULL) { | 116 static void print_inlining(ciMethod* method, int inline_level, int bci, const char* msg = NULL) { |
115 print_inlining(tty, method, inline_level, bci, msg); | 117 print_inlining(tty, method, inline_level, bci, msg); |
116 } | 118 } |
119 | |
120 // Redefine Classes support | |
121 void mark_on_stack(); | |
117 | 122 |
118 static void print_inline_indent(int inline_level, outputStream* st = tty); | 123 static void print_inline_indent(int inline_level, outputStream* st = tty); |
119 | 124 |
120 void print(); | 125 void print(); |
121 void print_line(); | 126 void print_line(); |
203 | 208 |
204 CompileTask* get(); | 209 CompileTask* get(); |
205 | 210 |
206 bool is_empty() const { return _first == NULL; } | 211 bool is_empty() const { return _first == NULL; } |
207 int size() const { return _size; } | 212 int size() const { return _size; } |
213 | |
214 // Redefine Classes support | |
215 void mark_on_stack(); | |
208 | 216 |
209 void print(); | 217 void print(); |
210 }; | 218 }; |
211 | 219 |
212 // CompileTaskWrapper | 220 // CompileTaskWrapper |
398 // Return total compilation ticks | 406 // Return total compilation ticks |
399 static jlong total_compilation_ticks() { | 407 static jlong total_compilation_ticks() { |
400 return _perf_total_compilation != NULL ? _perf_total_compilation->get_value() : 0; | 408 return _perf_total_compilation != NULL ? _perf_total_compilation->get_value() : 0; |
401 } | 409 } |
402 | 410 |
411 // Redefine Classes support | |
412 static void mark_on_stack(); | |
413 | |
403 // Print a detailed accounting of compilation time | 414 // Print a detailed accounting of compilation time |
404 static void print_times(); | 415 static void print_times(); |
405 | 416 |
406 // Debugging output for failure | 417 // Debugging output for failure |
407 static void print_last_compile(); | 418 static void print_last_compile(); |