25
#include "precompiled.hpp"
26
#include "cds/archiveBuilder.hpp"
27
#include "cds/lambdaProxyClassDictionary.hpp"
28
#include "classfile/systemDictionaryShared.hpp"
29
#include "memory/resourceArea.hpp"
31
DumpTimeLambdaProxyClassInfo::~DumpTimeLambdaProxyClassInfo() {
32
if (_proxy_klasses != nullptr) {
33
delete _proxy_klasses;
37
void LambdaProxyClassKey::init_for_archive(LambdaProxyClassKey& dumptime_key) {
38
ArchiveBuilder* b = ArchiveBuilder::current();
40
b->write_pointer_in_buffer(&_caller_ik, dumptime_key._caller_ik);
41
b->write_pointer_in_buffer(&_instantiated_method_type, dumptime_key._instantiated_method_type);
42
b->write_pointer_in_buffer(&_invoked_name, dumptime_key._invoked_name);
43
b->write_pointer_in_buffer(&_invoked_type, dumptime_key._invoked_type);
44
b->write_pointer_in_buffer(&_member_method, dumptime_key._member_method);
45
b->write_pointer_in_buffer(&_method_type, dumptime_key._method_type);
48
unsigned int LambdaProxyClassKey::hash() const {
49
return SystemDictionaryShared::hash_for_shared_dictionary((address)_caller_ik) +
50
SystemDictionaryShared::hash_for_shared_dictionary((address)_invoked_name) +
51
SystemDictionaryShared::hash_for_shared_dictionary((address)_invoked_type) +
52
SystemDictionaryShared::hash_for_shared_dictionary((address)_method_type) +
53
SystemDictionaryShared::hash_for_shared_dictionary((address)_instantiated_method_type);
57
void LambdaProxyClassKey::print_on(outputStream* st) const {
59
st->print_cr("LambdaProxyClassKey : " INTPTR_FORMAT " hash: %0x08x", p2i(this), hash());
60
st->print_cr("_caller_ik : %s", _caller_ik->external_name());
61
st->print_cr("_instantiated_method_type : %s", _instantiated_method_type->as_C_string());
62
st->print_cr("_invoked_name : %s", _invoked_name->as_C_string());
63
st->print_cr("_invoked_type : %s", _invoked_type->as_C_string());
64
st->print_cr("_member_method : %s", _member_method->name()->as_C_string());
65
st->print_cr("_method_type : %s", _method_type->as_C_string());
68
void RunTimeLambdaProxyClassInfo::print_on(outputStream* st) const {
73
void RunTimeLambdaProxyClassInfo::init(LambdaProxyClassKey& key, DumpTimeLambdaProxyClassInfo& info) {
74
_key.init_for_archive(key);
75
ArchiveBuilder::current()->write_pointer_in_buffer(&_proxy_klass_head,
76
info._proxy_klasses->at(0));