equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
38 #include "oops/oop.inline.hpp" |
38 #include "oops/oop.inline.hpp" |
39 #include "prims/methodHandles.hpp" |
39 #include "prims/methodHandles.hpp" |
40 #include "prims/jvmtiRedefineClassesTrace.hpp" |
40 #include "prims/jvmtiRedefineClassesTrace.hpp" |
41 #include "runtime/compilationPolicy.hpp" |
41 #include "runtime/compilationPolicy.hpp" |
42 #include "runtime/javaCalls.hpp" |
42 #include "runtime/javaCalls.hpp" |
|
43 #include "runtime/logTimer.hpp" |
43 #include "runtime/reflection.hpp" |
44 #include "runtime/reflection.hpp" |
44 #include "runtime/signature.hpp" |
45 #include "runtime/signature.hpp" |
45 #include "runtime/stubRoutines.hpp" |
46 #include "runtime/stubRoutines.hpp" |
46 #include "utilities/exceptions.hpp" |
47 #include "utilities/exceptions.hpp" |
47 |
48 |
70 void MethodHandles::generate_adapters() { |
71 void MethodHandles::generate_adapters() { |
71 assert(SystemDictionary::MethodHandle_klass() != NULL, "should be present"); |
72 assert(SystemDictionary::MethodHandle_klass() != NULL, "should be present"); |
72 assert(_adapter_code == NULL, "generate only once"); |
73 assert(_adapter_code == NULL, "generate only once"); |
73 |
74 |
74 ResourceMark rm; |
75 ResourceMark rm; |
75 TraceTime timer("MethodHandles adapters generation", TraceStartupTime); |
76 TraceStartupTime timer("MethodHandles adapters generation"); |
76 _adapter_code = MethodHandlesAdapterBlob::create(adapter_code_size); |
77 _adapter_code = MethodHandlesAdapterBlob::create(adapter_code_size); |
77 CodeBuffer code(_adapter_code); |
78 CodeBuffer code(_adapter_code); |
78 MethodHandlesAdapterGenerator g(&code); |
79 MethodHandlesAdapterGenerator g(&code); |
79 g.generate(); |
80 g.generate(); |
80 code.log_section_sizes("MethodHandlesAdapterBlob"); |
81 code.log_section_sizes("MethodHandlesAdapterBlob"); |