300 // Just allocate a buffer and call finish_log_on_error(). |
300 // Just allocate a buffer and call finish_log_on_error(). |
301 void CompileLog::finish_log(outputStream* file) { |
301 void CompileLog::finish_log(outputStream* file) { |
302 char buf[4 * K]; |
302 char buf[4 * K]; |
303 finish_log_on_error(file, buf, sizeof(buf)); |
303 finish_log_on_error(file, buf, sizeof(buf)); |
304 } |
304 } |
|
305 |
|
306 // ------------------------------------------------------------------ |
|
307 // CompileLog::inline_success |
|
308 // |
|
309 // Print about successful method inlining. |
|
310 void CompileLog::inline_success(const char* reason) { |
|
311 begin_elem("inline_success reason='"); |
|
312 text(reason); |
|
313 end_elem("'"); |
|
314 } |
|
315 |
|
316 // ------------------------------------------------------------------ |
|
317 // CompileLog::inline_fail |
|
318 // |
|
319 // Print about failed method inlining. |
|
320 void CompileLog::inline_fail(const char* reason) { |
|
321 begin_elem("inline_fail reason='"); |
|
322 text(reason); |
|
323 end_elem("'"); |
|
324 } |
|
325 |
|
326 // ------------------------------------------------------------------ |
|
327 // CompileLog::set_context |
|
328 // |
|
329 // Set XML tag as an optional marker - it is printed only if |
|
330 // there are other entries after until it is reset. |
|
331 void CompileLog::set_context(const char* format, ...) { |
|
332 va_list ap; |
|
333 va_start(ap, format); |
|
334 clear_context(); |
|
335 _context.print("<"); |
|
336 _context.vprint(format, ap); |
|
337 _context.print_cr("/>"); |
|
338 va_end(ap); |
|
339 } |
|
340 |
|
341 // ------------------------------------------------------------------ |
|
342 // CompileLog::code_cache_state |
|
343 // |
|
344 // Print code cache state. |
|
345 void CompileLog::code_cache_state() { |
|
346 begin_elem("code_cache"); |
|
347 CodeCache::log_state(this); |
|
348 end_elem(""); |
|
349 } |