diff options
author | jfrijters <jfrijters> | 2007-09-19 13:35:57 +0400 |
---|---|---|
committer | jfrijters <jfrijters> | 2007-09-19 13:35:57 +0400 |
commit | 220166a19ebcc23c4a8a5802067e0079c42ae156 (patch) | |
tree | b819efe33a066b92f864e3fa0b49bbcaaab22b2c /openjdk/map.xml | |
parent | 18bc6c071825297c11138ca4269ecdf25672f2ee (diff) |
Changed LibraryVMInterfaceImpl.getWrapperFromClass() and getWrapperFromClassLoader() from using reflection to a map.xml implementation to improve performance.
It turns out that Constructor.newInstance() calls Class.getModifiers() which indirectly uses getWrapperFromClass() and using reflection significantly affected deserialization performance.
Diffstat (limited to 'openjdk/map.xml')
-rw-r--r-- | openjdk/map.xml | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/openjdk/map.xml b/openjdk/map.xml index af3709e6..c1eb184e 100644 --- a/openjdk/map.xml +++ b/openjdk/map.xml @@ -1159,7 +1159,7 @@ </class> <!-- Here we are adding/replacing methods to existing classes --> <class name="java.lang.Class"> - <field name="typeWrapper" sig="Ljava.lang.Object;" modifiers="private" /> + <field name="typeWrapper" sig="Ljava.lang.Object;" modifiers="" /> <field name="pd" sig="Ljava.security.ProtectionDomain;" modifiers="private" /> <field name="signers" sig="[Ljava.lang.Object;" modifiers="private" /> <field name="constantPool" sig="Ljava.lang.Object;" modifiers="private" /> @@ -1173,7 +1173,7 @@ </method> </class> <class name="java.lang.ClassLoader"> - <field name="wrapper" sig="Ljava.lang.Object;" modifiers="private" /> + <field name="wrapper" sig="Ljava.lang.Object;" modifiers="" /> <method name="getBootstrapResource" sig="(Ljava.lang.String;)Ljava.net.URL;"> <body> <ldarg_0 /> @@ -1532,6 +1532,24 @@ </body> </method> </class> + <class name="java.lang.LibraryVMInterfaceImpl"> + <method name="getWrapperFromClass" sig="(Ljava.lang.Object;)Ljava.lang.Object;"> + <body> + <ldarg_1 /> + <castclass class="java.lang.Class" /> + <ldfld class="java.lang.Class" name="typeWrapper" sig="Ljava.lang.Object;" /> + <ret /> + </body> + </method> + <method name="getWrapperFromClassLoader" sig="(Ljava.lang.Object;)Ljava.lang.Object;"> + <body> + <ldarg_1 /> + <castclass class="java.lang.ClassLoader" /> + <ldfld class="java.lang.ClassLoader" name="wrapper" sig="Ljava.lang.Object;" /> + <ret /> + </body> + </method> + </class> <class name="sun.misc.Launcher"> <method name="<init>" sig="()V"> <replace-method-call class="sun.misc.Launcher$ExtClassLoader" name="getExtClassLoader" sig="()Lsun.misc.Launcher$ExtClassLoader;"> |