/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*
*/
#include "precompiled.hpp"
#include "opto/chaitin.hpp"
#include "opto/idealGraphPrinter.hpp"
#include "opto/machnode.hpp"
#include "runtime/threadCritical.hpp"
#ifndef PRODUCT
// Constants
// Keep consistent with Java constants
if (PrintIdealGraphLevel == 0) return NULL;
}
return compiler_thread->ideal_graph_printer();
}
JavaThread *p;
if (p->is_Compiler_thread()) {
CompilerThread *c = (CompilerThread *)p;
if (printer) {
delete printer;
}
}
}
}
// Constructor, either file or network output
// By default dump both ins and outs since dead or unreachable code
// needs to appear in the graph. There are also some special cases
// in the mach where kill projections have no users but should
// appear in the dump.
_traverse_outs = true;
_should_send_method = true;
buffer[0] = 0;
_depth = 0;
if (PrintIdealGraphFile != NULL) {
// User wants all output to go to files
if (_file_count != 0) {
if (dot) {
} else {
}
} else {
}
_file_count++;
} else {
// Try to connect to visualizer
char c = 0;
if (c != 'y') {
delete _stream;
return;
}
} else {
// It would be nice if we could shut down cleanly but it should
// be an error if we can't connect to the visualizer.
}
}
}
// Destructor, close file or network stream
// tty->print_cr("Walk time: %d", (int)_walk_time.milliseconds());
// tty->print_cr("Output time: %d", (int)_output_time.milliseconds());
// tty->print_cr("Build blocks time: %d", (int)_build_blocks_time.milliseconds());
if(_xml) {
delete _xml;
}
if (_stream) {
delete _stream;
}
}
if (_output) {
delete _output;
}
}
_xml->begin_elem(s);
}
}
_xml->begin_head(s);
}
}
}
}
}
}
}
}
end_head();
}
end_head();
}
}
}
}
// Print inline tree
if (_should_send_method) {
if (inlineTree != NULL) {
} else {
// print this method only
}
}
}
// Has to be called whenever a method is compiled
// Print properties
// Add method name
}
}
if (_stream) {
char answer = 0;
}
this->_current_method = method;
}
// Has to be called whenever a method has finished compilation
}
// Print indent
for (int i = 0; i < _depth; i++) {
}
}
return _traverse_outs;
}
_traverse_outs = b;
}
return (intptr_t)(n);
}
if (edges) {
// Output edge
if ( n->in(i) ) {
print_attr(INDEX_PROPERTY, i);
end_elem();
}
}
} else {
// Output node
end_head();
#ifndef PRODUCT
node->_in_dump_cnt++;
#ifdef ASSERT
#endif
} else {
}
}
}
}
}
}
}
}
}
}
}
} else {
}
} else {
}
#ifdef ASSERT
}
#endif
}
}
}
buffer[0] = 0;
} else if( toop ) {
} else if( tkls ) {
}
}
if (node->is_block_proj()) {
}
if (node->is_block_start()) {
}
if (index >= 10) {
} else {
}
// max. 2 chars allowed
} else {
}
// max. 2 chars allowed
} else {
}
}
}
if (node->is_SafePoint()) {
} else {
}
}
int last_bci;
while(caller) {
if (caller->has_method()) {
}
}
}
}
#ifdef ASSERT
}
}
#endif
buffer[0] = 0;
}
node->_in_dump_cnt--;
#endif
}
}
// once we have a CFG there are some nodes that aren't really
// reachable but are in the CFG so add them here.
}
}
}
if (_traverse_outs) {
}
}
}
if ( n->in(i) ) {
}
}
}
}
}
void IdealGraphPrinter::print_method(Compile* compile, const char *name, int level, bool clear_nodes) {
}
// Print current ideal graph
void IdealGraphPrinter::print(Compile* compile, const char *name, Node *node, int level, bool clear_nodes) {
this->C = compile;
// Warning, unsafe cast?
end_head();
end_head();
for (uint s = 0; s < b->_num_succs; s++) {
end_elem();
}
end_elem();
}
}
}
}
extern const char *NodeClassNames[];
return _xml;
}
#endif