8027429.01 Sdiff src/share/vm/utilities (original) (raw)
178 BREAKPOINT;
179 } while (0)
180
181 #define Unimplemented()
182 do {
183 report_unimplemented(FILE, LINE);
184 BREAKPOINT;
185 } while (0)
186
187 #define Untested(msg)
188 do {
189 report_untested(FILE, LINE, msg);
190 BREAKPOINT;
191 } while (0);
192
193
194 // types of VM error - originally in vmError.hpp
195 enum VMErrorType {
196 INTERNAL_ERROR = 0xe0000000,
197 OOM_MALLOC_ERROR = 0xe0000001,
198 OOM_MMAP_ERROR = 0xe0000002
199 }; 200 201 // error reporting helper functions 202 void report_vm_error(const char* file, int line, const char* error_msg); 203 #if !defined(GNUC) || defined (clang_major) || (((GNUC == 4) && (GNUC_MINOR >= 8)) || GNUC > 4) 204 // ATTRIBUTE_PRINTF works with gcc >= 4.8 and any other compiler. 205 void report_vm_error(const char* file, int line, const char* error_msg, 206 const char* detail_fmt, ...) ATTRIBUTE_PRINTF(4, 5); 207 #else 208 // GCC < 4.8 warns because of empty format string. Warning can not be switched off selectively. 209 void report_vm_error(const char* file, int line, const char* error_msg, 210 const char* detail_fmt, ...); 211 #endif 212 void report_fatal(const char* file, int line, const char* detail_fmt, ...) ATTRIBUTE_PRINTF(3, 4); 213 void report_vm_out_of_memory(const char* file, int line, size_t size, VMErrorType vm_err_type, 214 const char* detail_fmt, ...) ATTRIBUTE_PRINTF(5, 6); 215 void report_should_not_call(const char* file, int line); 216 void report_should_not_reach_here(const char* file, int line); 217 void report_unimplemented(const char* file, int line); 218 void report_untested(const char* file, int line, const char* message);
178 BREAKPOINT;
179 } while (0)
180
181 #define Unimplemented()
182 do {
183 report_unimplemented(FILE, LINE);
184 BREAKPOINT;
185 } while (0)
186
187 #define Untested(msg)
188 do {
189 report_untested(FILE, LINE, msg);
190 BREAKPOINT;
191 } while (0);
192
193
194 // types of VM error - originally in vmError.hpp
195 enum VMErrorType {
196 INTERNAL_ERROR = 0xe0000000,
197 OOM_MALLOC_ERROR = 0xe0000001,
198 OOM_MMAP_ERROR = 0xe0000002,
199 VM_INFO = 0xe0000003
200 };
201
202 // error reporting helper functions
203 void report_vm_error(const char* file, int line, const char* error_msg);
204 #if !defined(GNUC) || defined (clang_major) || (((GNUC == 4) && (GNUC_MINOR >= 8)) || GNUC > 4)
205 // ATTRIBUTE_PRINTF works with gcc >= 4.8 and any other compiler.
206 void report_vm_error(const char* file, int line, const char* error_msg,
207 const char* detail_fmt, ...) ATTRIBUTE_PRINTF(4, 5);
208 #else
209 // GCC < 4.8 warns because of empty format string. Warning can not be switched off selectively.
210 void report_vm_error(const char* file, int line, const char* error_msg,
211 const char* detail_fmt, ...);
212 #endif
213 void report_fatal(const char* file, int line, const char* detail_fmt, ...) ATTRIBUTE_PRINTF(3, 4);
214 void report_vm_out_of_memory(const char* file, int line, size_t size, VMErrorType vm_err_type,
215 const char* detail_fmt, ...) ATTRIBUTE_PRINTF(5, 6);
216 void report_should_not_call(const char* file, int line);
217 void report_should_not_reach_here(const char* file, int line);
218 void report_unimplemented(const char* file, int line);
219 void report_untested(const char* file, int line, const char* message);