17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 #include "precompiled.hpp"
26 #include "asm/macroAssembler.hpp"
27 #include "asm/macroAssembler.inline.hpp"
28 #include "code/codeCache.hpp"
29 #include "compiler/disassembler.hpp"
30 #include "oops/oop.inline.hpp"
31 #include "prims/forte.hpp"
32 #include "runtime/stubCodeGenerator.hpp"
33
34
35 // Implementation of StubCodeDesc
36
37 StubCodeDesc* StubCodeDesc::_list = NULL;
38 int StubCodeDesc::_count = 0;
39
40
41 StubCodeDesc* StubCodeDesc::desc_for(address pc) {
42 StubCodeDesc* p = _list;
43 while (p != NULL && !p->contains(pc)) p = p->_next;
44 // p == NULL || p->contains(pc)
45 return p;
46 }
47
48
49 StubCodeDesc* StubCodeDesc::desc_for_index(int index) {
50 StubCodeDesc* p = _list;
51 while (p != NULL && p->index() != index) p = p->_next;
52 return p;
53 }
54
55
56 const char* StubCodeDesc::name_for(address pc) {
57 StubCodeDesc* p = desc_for(pc);
58 return p == NULL ? NULL : p->name();
59 }
60
61
62 void StubCodeDesc::print_on(outputStream* st) const {
63 st->print("%s", group());
64 st->print("::");
65 st->print("%s", name());
66 st->print(" [" INTPTR_FORMAT ", " INTPTR_FORMAT "[ (%d bytes)", p2i(begin()), p2i(end()), size_in_bytes());
67 }
68
69 // Implementation of StubCodeGenerator
70
|
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 #include "precompiled.hpp"
26 #include "asm/macroAssembler.hpp"
27 #include "asm/macroAssembler.inline.hpp"
28 #include "code/codeCache.hpp"
29 #include "compiler/disassembler.hpp"
30 #include "oops/oop.inline.hpp"
31 #include "prims/forte.hpp"
32 #include "runtime/stubCodeGenerator.hpp"
33
34
35 // Implementation of StubCodeDesc
36
37 StubCodeDesc* volatile StubCodeDesc::_list = NULL;
38 int StubCodeDesc::_count = 0;
39
40
41 StubCodeDesc* StubCodeDesc::desc_for(address pc) {
42 StubCodeDesc* p = (StubCodeDesc*)OrderAccess::load_ptr_acquire(&_list);
43 while (p != NULL && !p->contains(pc)) p = p->_next;
44 // p == NULL || p->contains(pc)
45 return p;
46 }
47
48
49 StubCodeDesc* StubCodeDesc::desc_for_index(int index) {
50 StubCodeDesc* p = (StubCodeDesc*)OrderAccess::load_ptr_acquire(&_list);
51 while (p != NULL && p->index() != index) p = p->_next;
52 return p;
53 }
54
55
56 const char* StubCodeDesc::name_for(address pc) {
57 StubCodeDesc* p = desc_for(pc);
58 return p == NULL ? NULL : p->name();
59 }
60
61
62 void StubCodeDesc::print_on(outputStream* st) const {
63 st->print("%s", group());
64 st->print("::");
65 st->print("%s", name());
66 st->print(" [" INTPTR_FORMAT ", " INTPTR_FORMAT "[ (%d bytes)", p2i(begin()), p2i(end()), size_in_bytes());
67 }
68
69 // Implementation of StubCodeGenerator
70
|