Mercurial > hg > graal-jvmci-8
comparison src/share/vm/runtime/stubCodeGenerator.cpp @ 3464:be4ca325525a
Merge.
author | Thomas Wuerthinger <thomas@wuerthinger.net> |
---|---|
date | Wed, 27 Jul 2011 17:32:44 -0700 |
parents | a9b8b43b115f |
children | cd3d6a6b95d9 |
comparison
equal
deleted
inserted
replaced
3239:7c4b4daac19b | 3464:be4ca325525a |
---|---|
78 st->print(" [" INTPTR_FORMAT ", " INTPTR_FORMAT "[ (%d bytes)", begin(), end(), size_in_bytes()); | 78 st->print(" [" INTPTR_FORMAT ", " INTPTR_FORMAT "[ (%d bytes)", begin(), end(), size_in_bytes()); |
79 } | 79 } |
80 | 80 |
81 // Implementation of StubCodeGenerator | 81 // Implementation of StubCodeGenerator |
82 | 82 |
83 StubCodeGenerator::StubCodeGenerator(CodeBuffer* code) { | 83 StubCodeGenerator::StubCodeGenerator(CodeBuffer* code, bool print_code) { |
84 _masm = new MacroAssembler(code); | 84 _masm = new MacroAssembler(code); |
85 _first_stub = _last_stub = NULL; | 85 _first_stub = _last_stub = NULL; |
86 _print_code = print_code; | |
86 } | 87 } |
87 | 88 |
88 extern "C" { | 89 extern "C" { |
89 static int compare_cdesc(const void* void_a, const void* void_b) { | 90 static int compare_cdesc(const void* void_a, const void* void_b) { |
90 int ai = (*((StubCodeDesc**) void_a))->index(); | 91 int ai = (*((StubCodeDesc**) void_a))->index(); |
92 return ai - bi; | 93 return ai - bi; |
93 } | 94 } |
94 } | 95 } |
95 | 96 |
96 StubCodeGenerator::~StubCodeGenerator() { | 97 StubCodeGenerator::~StubCodeGenerator() { |
97 if (PrintStubCode) { | 98 if (PrintStubCode || _print_code) { |
98 CodeBuffer* cbuf = _masm->code(); | 99 CodeBuffer* cbuf = _masm->code(); |
99 CodeBlob* blob = CodeCache::find_blob_unsafe(cbuf->insts()->start()); | 100 CodeBlob* blob = CodeCache::find_blob_unsafe(cbuf->insts()->start()); |
100 if (blob != NULL) { | 101 if (blob != NULL) { |
101 blob->set_comments(cbuf->comments()); | 102 blob->set_comments(cbuf->comments()); |
102 } | 103 } |