comparison src/share/vm/compiler/compileLog.hpp @ 7066:7d815d842ee0

Merge.
author Christian Haeubl <haeubl@ssw.jku.at>
date Fri, 23 Nov 2012 11:50:27 +0100
parents c3e799c37717
children 813f26e34135
comparison
equal deleted inserted replaced
7065:cfacf5d5bade 7066:7d815d842ee0
1 /* 1 /*
2 * Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
25 #ifndef SHARE_VM_COMPILER_COMPILELOG_HPP 25 #ifndef SHARE_VM_COMPILER_COMPILELOG_HPP
26 #define SHARE_VM_COMPILER_COMPILELOG_HPP 26 #define SHARE_VM_COMPILER_COMPILELOG_HPP
27 27
28 #include "utilities/xmlstream.hpp" 28 #include "utilities/xmlstream.hpp"
29 29
30 class ciBaseObject;
30 class ciObject; 31 class ciObject;
32 class ciMetadata;
31 class ciSymbol; 33 class ciSymbol;
32 34
33 // CompileLog 35 // CompileLog
34 // 36 //
35 // An open stream for logging information about activities in a 37 // An open stream for logging information about activities in a
58 CompileLog(const char* file, FILE* fp, intx thread_id); 60 CompileLog(const char* file, FILE* fp, intx thread_id);
59 ~CompileLog(); 61 ~CompileLog();
60 62
61 intx thread_id() { return _thread_id; } 63 intx thread_id() { return _thread_id; }
62 const char* file() { return _file; } 64 const char* file() { return _file; }
65
66 // Optional context marker, to help place actions that occur during
67 // parsing. If there is no log output until the next context string
68 // or reset, context string will be silently ignored
63 stringStream* context() { return &_context; } 69 stringStream* context() { return &_context; }
70 void clear_context() { context()->reset(); }
71 void set_context(const char* format, ...);
64 72
65 void name(ciSymbol* s); // name='s' 73 void name(ciSymbol* s); // name='s'
66 void name(Symbol* s) { xmlStream::name(s); } 74 void name(Symbol* s) { xmlStream::name(s); }
67 75
68 // Output an object description, return obj->ident(). 76 // Output an object description, return obj->ident().
69 int identify(ciObject* obj); 77 int identify(ciBaseObject* obj);
70 void clear_identities(); 78 void clear_identities();
79
80 void inline_fail (const char* reason);
81 void inline_success(const char* reason);
71 82
72 // virtuals 83 // virtuals
73 virtual void see_tag(const char* tag, bool push); 84 virtual void see_tag(const char* tag, bool push);
74 virtual void pop_tag(const char* tag); 85 virtual void pop_tag(const char* tag);
75 86
76 // make a provisional end of log mark 87 // make a provisional end of log mark
77 void mark_file_end() { _file_end = out()->count(); } 88 void mark_file_end() { _file_end = out()->count(); }
78 89
90 // Print code cache statistics
91 void code_cache_state();
92
79 // copy all logs to the given stream 93 // copy all logs to the given stream
80 static void finish_log(outputStream* out); 94 static void finish_log(outputStream* out);
81 static void finish_log_on_error(outputStream* out, char *buf, int buflen); 95 static void finish_log_on_error(outputStream* out, char *buf, int buflen);
82 }; 96 };
83 97