diff options
author | Vladimir Marko <vmarko@google.com> | 2016-03-30 13:23:58 +0100 |
---|---|---|
committer | Vladimir Marko <vmarko@google.com> | 2016-06-21 15:11:57 +0100 |
commit | dbb7f5bef10138ade0fb202da1d61f562b2df649 (patch) | |
tree | f0aa4b390c534b215a6e000c865783cdd9852353 /compiler/optimizing/graph_visualizer.cc | |
parent | b94b5706f0b8e2e1c7e1db22274f9f4bae0c4b5a (diff) |
Improve HLoadClass code generation.
For classes in the boot image, use either direct pointers
or PC-relative addresses. For other classes, use PC-relative
access to the dex cache arrays for AOT and direct address of
the type's dex cache slot for JIT.
For aosp_flounder-userdebug:
- 32-bit boot.oat: -252KiB (-0.3%)
- 64-bit boot.oat: -412KiB (-0.4%)
- 32-bit dalvik cache total: -392KiB (-0.4%)
- 64-bit dalvik-cache total: -2312KiB (-1.0%)
(contains more files than the 32-bit dalvik cache)
For aosp_flounder-userdebug forced to compile PIC:
- 32-bit boot.oat: -124KiB (-0.2%)
- 64-bit boot.oat: -420KiB (-0.5%)
- 32-bit dalvik cache total: -136KiB (-0.1%)
- 64-bit dalvik-cache total: -1136KiB (-0.5%)
(contains more files than the 32-bit dalvik cache)
Bug: 27950288
Change-Id: I4da991a4b7e53c63c92558b97923d18092acf139
Diffstat (limited to 'compiler/optimizing/graph_visualizer.cc')
-rw-r--r-- | compiler/optimizing/graph_visualizer.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler/optimizing/graph_visualizer.cc b/compiler/optimizing/graph_visualizer.cc index 3084a4ff2b..7d11948f4e 100644 --- a/compiler/optimizing/graph_visualizer.cc +++ b/compiler/optimizing/graph_visualizer.cc @@ -372,6 +372,10 @@ class HGraphVisualizerPrinter : public HGraphDelegateVisitor { } void VisitLoadClass(HLoadClass* load_class) OVERRIDE { + StartAttributeStream("load_kind") << load_class->GetLoadKind(); + const char* descriptor = load_class->GetDexFile().GetTypeDescriptor( + load_class->GetDexFile().GetTypeId(load_class->GetTypeIndex())); + StartAttributeStream("class_name") << PrettyDescriptor(descriptor); StartAttributeStream("gen_clinit_check") << std::boolalpha << load_class->MustGenerateClinitCheck() << std::noboolalpha; StartAttributeStream("needs_access_check") << std::boolalpha |