70 // 0x08000000 | 134217728 - impl details: OopMapCache updates |
70 // 0x08000000 | 134217728 - impl details: OopMapCache updates |
71 // 0x10000000 | 268435456 - unused |
71 // 0x10000000 | 268435456 - unused |
72 // 0x20000000 | 536870912 - unused |
72 // 0x20000000 | 536870912 - unused |
73 // 0x40000000 | 1073741824 - unused |
73 // 0x40000000 | 1073741824 - unused |
74 // 0x80000000 | 2147483648 - unused |
74 // 0x80000000 | 2147483648 - unused |
75 // |
|
76 // Note: The ResourceMark is to cleanup resource allocated args. |
|
77 // The "while (0)" is so we can use semi-colon at end of RC_TRACE(). |
|
78 #define RC_TRACE(level, args) \ |
|
79 if ((TraceRedefineClasses & level) != 0) { \ |
|
80 ResourceMark rm; \ |
|
81 tty->print("RedefineClasses-0x%x: ", level); \ |
|
82 tty->print_cr args; \ |
|
83 } while (0) |
|
84 |
|
85 #define RC_TRACE_NO_CR(level, args) \ |
|
86 if ((TraceRedefineClasses & level) != 0) { \ |
|
87 ResourceMark rm; \ |
|
88 tty->print("RedefineClasses-0x%x: ", level); \ |
|
89 tty->print args; \ |
|
90 } while (0) |
|
91 |
|
92 #define RC_TRACE_WITH_THREAD(level, thread, args) \ |
|
93 if ((TraceRedefineClasses & level) != 0) { \ |
|
94 ResourceMark rm(thread); \ |
|
95 tty->print("RedefineClasses-0x%x: ", level); \ |
|
96 tty->print_cr args; \ |
|
97 } while (0) |
|
98 |
|
99 #define RC_TRACE_MESG(args) \ |
|
100 { \ |
|
101 ResourceMark rm; \ |
|
102 tty->print("RedefineClasses: "); \ |
|
103 tty->print_cr args; \ |
|
104 } while (0) |
|
105 |
75 |
106 // Macro for checking if TraceRedefineClasses has a specific bit |
76 // Macro for checking if TraceRedefineClasses has a specific bit |
107 // enabled. Returns true if the bit specified by level is set. |
77 // enabled. Returns true if the bit specified by level is set. |
108 #define RC_TRACE_ENABLED(level) ((TraceRedefineClasses & level) != 0) |
78 #define RC_TRACE_ENABLED(level) ((TraceRedefineClasses & level) != 0) |
109 |
79 |
118 // ~(low - 1) |
88 // ~(low - 1) |
119 // Yields a mask that removes bits lower than the low bit value. |
89 // Yields a mask that removes bits lower than the low bit value. |
120 #define RC_TRACE_IN_RANGE(low, high) \ |
90 #define RC_TRACE_IN_RANGE(low, high) \ |
121 (((TraceRedefineClasses & ((high << 1) - 1)) & ~(low - 1)) != 0) |
91 (((TraceRedefineClasses & ((high << 1) - 1)) & ~(low - 1)) != 0) |
122 |
92 |
123 // Timer support macros. Only do timer operations if timer tracing |
93 // Note: The ResourceMark is to cleanup resource allocated args. |
124 // is enabled. The "while (0)" is so we can use semi-colon at end of |
94 // The "do {...} while (0)" is so we can use semi-colon at end of RC_TRACE(). |
125 // the macro. |
95 #define RC_TRACE(level, args) do { \ |
126 #define RC_TIMER_START(t) \ |
96 if (RC_TRACE_ENABLED(level)) { \ |
|
97 ResourceMark rm; \ |
|
98 tty->print("RedefineClasses-0x%x: ", level); \ |
|
99 tty->print_cr args; \ |
|
100 } \ |
|
101 } while (0) |
|
102 |
|
103 #define RC_TRACE_NO_CR(level, args) do { \ |
|
104 if (RC_TRACE_ENABLED(level)) { \ |
|
105 ResourceMark rm; \ |
|
106 tty->print("RedefineClasses-0x%x: ", level); \ |
|
107 tty->print args; \ |
|
108 } \ |
|
109 } while (0) |
|
110 |
|
111 #define RC_TRACE_WITH_THREAD(level, thread, args) do { \ |
|
112 if (RC_TRACE_ENABLED(level)) { \ |
|
113 ResourceMark rm(thread); \ |
|
114 tty->print("RedefineClasses-0x%x: ", level); \ |
|
115 tty->print_cr args; \ |
|
116 } \ |
|
117 } while (0) |
|
118 |
|
119 #define RC_TRACE_MESG(args) do { \ |
|
120 ResourceMark rm; \ |
|
121 tty->print("RedefineClasses: "); \ |
|
122 tty->print_cr args; \ |
|
123 } while (0) |
|
124 |
|
125 // Timer support macros. Only do timer operations if timer tracing is enabled. |
|
126 // The "do {...} while (0)" is so we can use semi-colon at end of the macro. |
|
127 #define RC_TIMER_START(t) do { \ |
127 if (RC_TRACE_ENABLED(0x00000004)) { \ |
128 if (RC_TRACE_ENABLED(0x00000004)) { \ |
128 t.start(); \ |
129 t.start(); \ |
129 } while (0) |
130 } \ |
130 #define RC_TIMER_STOP(t) \ |
131 } while (0) |
|
132 #define RC_TIMER_STOP(t) do { \ |
131 if (RC_TRACE_ENABLED(0x00000004)) { \ |
133 if (RC_TRACE_ENABLED(0x00000004)) { \ |
132 t.stop(); \ |
134 t.stop(); \ |
133 } while (0) |
135 } \ |
|
136 } while (0) |
134 |
137 |
135 #endif // SHARE_VM_PRIMS_JVMTIREDEFINECLASSESTRACE_HPP |
138 #endif // SHARE_VM_PRIMS_JVMTIREDEFINECLASSESTRACE_HPP |