Mercurial > hg > truffle
comparison src/share/vm/runtime/stubCodeGenerator.cpp @ 100:c7c777385a15
6667042: PrintAssembly option does not work without special plugin
Summary: remove old private plugin interface, simplify, rework old plugin to use unchanged Gnu sources
Reviewed-by: kvn, rasbold
author | jrose |
---|---|
date | Wed, 02 Apr 2008 12:09:59 -0700 |
parents | a61af66fc99e |
children | d1605aabd0a1 |
comparison
equal
deleted
inserted
replaced
99:8a4ef4e001d3 | 100:c7c777385a15 |
---|---|
67 StubCodeGenerator::StubCodeGenerator(CodeBuffer* code) { | 67 StubCodeGenerator::StubCodeGenerator(CodeBuffer* code) { |
68 _masm = new MacroAssembler(code); | 68 _masm = new MacroAssembler(code); |
69 _first_stub = _last_stub = NULL; | 69 _first_stub = _last_stub = NULL; |
70 } | 70 } |
71 | 71 |
72 #ifndef PRODUCT | |
73 extern "C" { | 72 extern "C" { |
74 static int compare_cdesc(const void* void_a, const void* void_b) { | 73 static int compare_cdesc(const void* void_a, const void* void_b) { |
75 int ai = (*((StubCodeDesc**) void_a))->index(); | 74 int ai = (*((StubCodeDesc**) void_a))->index(); |
76 int bi = (*((StubCodeDesc**) void_b))->index(); | 75 int bi = (*((StubCodeDesc**) void_b))->index(); |
77 return ai - bi; | 76 return ai - bi; |
78 } | 77 } |
79 } | 78 } |
80 #endif | |
81 | 79 |
82 StubCodeGenerator::~StubCodeGenerator() { | 80 StubCodeGenerator::~StubCodeGenerator() { |
83 #ifndef PRODUCT | |
84 if (PrintStubCode) { | 81 if (PrintStubCode) { |
85 CodeBuffer* cbuf = _masm->code(); | 82 CodeBuffer* cbuf = _masm->code(); |
86 CodeBlob* blob = CodeCache::find_blob_unsafe(cbuf->insts()->start()); | 83 CodeBlob* blob = CodeCache::find_blob_unsafe(cbuf->insts()->start()); |
87 if (blob != NULL) { | 84 if (blob != NULL) { |
88 blob->set_comments(cbuf->comments()); | 85 blob->set_comments(cbuf->comments()); |
103 tty->cr(); | 100 tty->cr(); |
104 Disassembler::decode(cdesc->begin(), cdesc->end()); | 101 Disassembler::decode(cdesc->begin(), cdesc->end()); |
105 tty->cr(); | 102 tty->cr(); |
106 } | 103 } |
107 } | 104 } |
108 #endif //PRODUCT | |
109 } | 105 } |
110 | 106 |
111 | 107 |
112 void StubCodeGenerator::stub_prolog(StubCodeDesc* cdesc) { | 108 void StubCodeGenerator::stub_prolog(StubCodeDesc* cdesc) { |
113 // default implementation - do nothing | 109 // default implementation - do nothing |