changeset 3688:ff6582ef15b3

Merge
author Lukas Stadler <lukas.stadler@jku.at>
date Tue, 22 Nov 2011 10:41:05 +0100
parents 7958ebb561b0 (current diff) 6157f507b7df (diff)
children 9878f53ebe09
files src/share/vm/graal/graalVMEntries.cpp
diffstat 12 files changed, 42 insertions(+), 48 deletions(-) [+]
line wrap: on
line diff
--- a/src/cpu/x86/vm/c1_globals_x86.hpp	Fri Nov 18 17:20:38 2011 +0100
+++ b/src/cpu/x86/vm/c1_globals_x86.hpp	Tue Nov 22 10:41:05 2011 +0100
@@ -46,11 +46,11 @@
 define_pd_global(intx, OnStackReplacePercentage,     933  );
 define_pd_global(intx, FreqInlineSize,               325  );
 define_pd_global(intx, NewSizeThreadIncrease,        4*K  );
-define_pd_global(intx, InitialCodeCacheSize,         160*K);
-define_pd_global(intx, ReservedCodeCacheSize,        32*M );
+define_pd_global(intx, InitialCodeCacheSize,         4*M);      // changed for GRAAL
+define_pd_global(intx, ReservedCodeCacheSize,        50*M );
 define_pd_global(bool, ProfileInterpreter,           true );    // changed for GRAAL
-define_pd_global(intx, CodeCacheExpansionSize,       32*K );
-define_pd_global(uintx,CodeCacheMinBlockLength,      1);
+define_pd_global(intx, CodeCacheExpansionSize,       64*K );    // changed for GRAAL
+define_pd_global(uintx,CodeCacheMinBlockLength,      4);        // changed for GRAAL
 define_pd_global(uintx,PermSize,                     12*M );
 define_pd_global(uintx,MaxPermSize,                  64*M );
 define_pd_global(bool, NeverActAsServerClassMachine, true );
--- a/src/os/windows/vm/os_windows.cpp	Fri Nov 18 17:20:38 2011 +0100
+++ b/src/os/windows/vm/os_windows.cpp	Tue Nov 22 10:41:05 2011 +0100
@@ -2074,9 +2074,9 @@
   PCONTEXT ctx = exceptionInfo->ContextRecord;
   address pc = (address)ctx->Rip;
   NOT_PRODUCT(Events::log("idiv overflow exception at " INTPTR_FORMAT , pc));
-  assert(pc[0] == 0xF7, "not an idiv opcode");
-  assert((pc[1] & ~0x7) == 0xF8, "cannot handle non-register operands");
-  assert(ctx->Rax == min_jint, "unexpected idiv exception");
+  assert(pc[0] == 0xF7 || (pc[1] == 0xF7 && (pc[0] == 0x41 || pc[0] == 0x49)), "not an idiv opcode");
+  //assert((pc[1] & ~0x7) == 0xF8, "cannot handle non-register operands");
+  assert((long)ctx->Rax == (long)min_jint || pc[0] == 0x49, "unexpected idiv exception");
   // set correct result values and continue after idiv instruction
   ctx->Rip = (DWORD)pc + 2;        // idiv reg, reg  is 2 bytes
   ctx->Rax = (DWORD)min_jint;      // result
--- a/src/share/tools/IdealGraphVisualizer/Coordinator/nbproject/project.xml	Fri Nov 18 17:20:38 2011 +0100
+++ b/src/share/tools/IdealGraphVisualizer/Coordinator/nbproject/project.xml	Tue Nov 22 10:41:05 2011 +0100
@@ -48,14 +48,6 @@
                     </run-dependency>
                 </dependency>
                 <dependency>
-                    <code-name-base>org.netbeans.spi.quicksearch</code-name-base>
-                    <build-prerequisite/>
-                    <compile-dependency/>
-                    <run-dependency>
-                        <specification-version>1.0</specification-version>
-                    </run-dependency>
-                </dependency>
-                <dependency>
                     <code-name-base>org.openide.actions</code-name-base>
                     <build-prerequisite/>
                     <compile-dependency/>
--- a/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/Bundle.properties	Fri Nov 18 17:20:38 2011 +0100
+++ b/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/Bundle.properties	Tue Nov 22 10:41:05 2011 +0100
@@ -1,9 +1,6 @@
-
 AdvancedOption_DisplayName_Coordinator=Settings
 AdvancedOption_Tooltip_Coordinator=Visualization Tool Settings
 CTL_OutlineTopComponent=Outline
 CTL_SomeAction=test
 HINT_OutlineTopComponent=Displays loaded groups of graphs.
-OpenIDE-Module-Name=Coordinator
-Toolbars/QuickSearch=Quick Search
-QuickSearch/Nodes/com-sun-hotspot-igv-coordinator-QuickSearch.instance=Nodes
+OpenIDE-Module-Name=Coordinator
\ No newline at end of file
--- a/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/layer.xml	Fri Nov 18 17:20:38 2011 +0100
+++ b/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/layer.xml	Tue Nov 22 10:41:05 2011 +0100
@@ -155,17 +155,7 @@
             <file name="org-netbeans-modules-tasklist-ui-TaskListAction.shadow_hidden"/>
             <file name="CloneDocumentAction.shadow_hidden"/>
         </folder>
-        
-        <file name="Spacer.instance">
-            <attr name="instanceCreate" methodvalue="javax.swing.Box.createHorizontalGlue"/>
-            <attr name="position" intvalue="9980"/>
-        </file>
-        <file name="org-netbeans-modules-quicksearch-QuickSearchAction.shadow">
-            <attr name="displayName" bundlevalue="com.sun.hotspot.igv.coordinator.Bundle#Toolbars/QuickSearch"/>
-            <attr name="originalFile" stringvalue="Actions/Edit/org-netbeans-modules-quicksearch-QuickSearchAction.instance"/>
-            <attr name="position" intvalue="9990"/>
-        </file>
-        
+
         <folder name="Help">
             <!-- Hidden menu entries from other modules -->
             <file name="Separator1.instance_hidden"/>
@@ -176,7 +166,7 @@
             <file name="shortcuts.xml_hidden"/>
         </folder>
     </folder>
-        
+
     <folder name="OptionsDialog">
         <!-- Hidden option tabs from other modules -->
         <file name="Editor.instance_hidden"/>
--- a/src/share/tools/IdealGraphVisualizer/View/src/com/sun/hotspot/igv/view/Bundle.properties	Fri Nov 18 17:20:38 2011 +0100
+++ b/src/share/tools/IdealGraphVisualizer/View/src/com/sun/hotspot/igv/view/Bundle.properties	Tue Nov 22 10:41:05 2011 +0100
@@ -1,4 +1,3 @@
 HINT_EditorTopComponent=Visualizes a graph.
 OpenIDE-Module-Name=View
-CTL_EditorTopComponent=Graph
-QuickSearch/Nodes/com-sun-hotspot-igv-view-NodeQuickSearch.instance=Nodes
+CTL_EditorTopComponent=Graph
\ No newline at end of file
--- a/src/share/tools/IdealGraphVisualizer/View/src/com/sun/hotspot/igv/view/EditorTopComponent.java	Fri Nov 18 17:20:38 2011 +0100
+++ b/src/share/tools/IdealGraphVisualizer/View/src/com/sun/hotspot/igv/view/EditorTopComponent.java	Tue Nov 22 10:41:05 2011 +0100
@@ -54,6 +54,7 @@
 import java.awt.BorderLayout;
 import java.awt.CardLayout;
 import java.awt.Color;
+import java.awt.Component;
 import java.awt.Graphics2D;
 import java.awt.event.HierarchyBoundsListener;
 import java.awt.event.HierarchyEvent;
@@ -74,6 +75,7 @@
 import java.util.List;
 import java.util.Set;
 import javax.swing.Action;
+import javax.swing.Box;
 import javax.swing.ButtonGroup;
 import javax.swing.JComponent;
 import javax.swing.JPanel;
@@ -96,6 +98,8 @@
 import org.openide.windows.TopComponent;
 import org.openide.windows.WindowManager;
 import org.openide.NotifyDescriptor;
+import org.openide.util.Utilities;
+import org.openide.util.actions.Presenter;
 
 /**
  * 
@@ -235,7 +239,6 @@
         rangeSliderModel.getDiagramChangedEvent().addListener(diagramChangedListener);
         rangeSliderModel.selectGraph(diagram.getGraph());
 
-
         toolBar.add(NextDiagramAction.get(NextDiagramAction.class));
         toolBar.add(PrevDiagramAction.get(PrevDiagramAction.class));
         toolBar.addSeparator();
@@ -285,6 +288,12 @@
         toolBar.add(button);
         selectionModeAction.addPropertyChangeListener(this);
 
+        toolBar.add(Box.createHorizontalGlue());
+        Action action = Utilities.actionsForPath("QuickSearchShadow").get(0);
+        Component quicksearch = ((Presenter.Toolbar) action).getToolbarPresenter();
+        quicksearch.setMinimumSize(quicksearch.getPreferredSize()); // necessary for GTK LAF
+        toolBar.add(quicksearch);
+
         centerPanel = new JPanel();
         this.add(centerPanel, BorderLayout.CENTER);
         cardLayout = new CardLayout();
--- a/src/share/tools/IdealGraphVisualizer/View/src/com/sun/hotspot/igv/view/NodeQuickSearch.java	Fri Nov 18 17:20:38 2011 +0100
+++ b/src/share/tools/IdealGraphVisualizer/View/src/com/sun/hotspot/igv/view/NodeQuickSearch.java	Tue Nov 22 10:41:05 2011 +0100
@@ -23,11 +23,9 @@
  */
 package com.sun.hotspot.igv.view;
 
-import com.sun.hotspot.igv.data.InputGraph;
 import com.sun.hotspot.igv.data.InputNode;
 import com.sun.hotspot.igv.data.Properties;
 import com.sun.hotspot.igv.data.Properties.RegexpPropertyMatcher;
-import com.sun.hotspot.igv.data.Property;
 import com.sun.hotspot.igv.data.services.InputGraphProvider;
 import com.sun.hotspot.igv.util.LookupHistory;
 import java.util.HashSet;
--- a/src/share/tools/IdealGraphVisualizer/View/src/com/sun/hotspot/igv/view/layer.xml	Fri Nov 18 17:20:38 2011 +0100
+++ b/src/share/tools/IdealGraphVisualizer/View/src/com/sun/hotspot/igv/view/layer.xml	Tue Nov 22 10:41:05 2011 +0100
@@ -63,14 +63,18 @@
         </folder>
     </folder>
 
-    
     <folder name="QuickSearch">
         <folder name="Nodes">
             <attr name="command" stringvalue="n"/>
             <attr name="position" intvalue="0"/>
-            <file name="com-sun-hotspot-igv-view-NodeQuickSearch.instance">
-                <attr name="SystemFileSystem.localizingBundle" stringvalue="com.sun.hotspot.igv.view.Bundle"/>
-            </file>
+            <file name="com-sun-hotspot-igv-view-NodeQuickSearch.instance" />
         </folder>
     </folder>
+    
+    <folder name="QuickSearchShadow">
+        <file name="org-netbeans-modules-quicksearch-QuickSearchAction.shadow">
+            <attr name="originalFile" stringvalue="Actions/Edit/org-netbeans-modules-quicksearch-QuickSearchAction.instance"/>
+            
+        </file>    
+    </folder>
 </filesystem>
--- a/src/share/vm/graal/graalEnv.cpp	Fri Nov 18 17:20:38 2011 +0100
+++ b/src/share/vm/graal/graalEnv.cpp	Tue Nov 22 10:41:05 2011 +0100
@@ -49,7 +49,7 @@
 //
 // Note: the logic of this method should mirror the logic of
 // constantPoolOopDesc::verify_constant_pool_resolve.
-bool GraalEnv::check_klass_accessibility(KlassHandle& accessing_klass, KlassHandle& resolved_klass) {
+bool GraalEnv::check_klass_accessibility(KlassHandle accessing_klass, KlassHandle resolved_klass) {
   if (accessing_klass->oop_is_objArray()) {
     accessing_klass = objArrayKlass::cast(accessing_klass())->bottom_klass();
   }
@@ -203,13 +203,16 @@
     if (k.is_null()) {
       is_accessible = false;
     } else if (k->class_loader() != accessor->class_loader() &&
-               get_klass_by_name_impl(accessor, cpool, k->name(), true) == NULL) {
+               get_klass_by_name_impl(accessor, cpool, k->name(), true).is_null()) {
       // Loaded only remotely.  Not linked yet.
       is_accessible = false;
     } else {
       // Linked locally, and we must also check public/private, etc.
       is_accessible = check_klass_accessibility(accessor, k);
     }
+    if (!is_accessible) {
+      return KlassHandle();
+    }
     return k;
   }
 
@@ -227,7 +230,8 @@
                                    bool& is_accessible,
                                    KlassHandle& accessor) {
   ResourceMark rm;
-  return get_klass_by_index_impl(cpool, index, is_accessible, accessor);
+  KlassHandle result = get_klass_by_index_impl(cpool, index, is_accessible, accessor);
+  return result;
 }
 
 // ------------------------------------------------------------------
--- a/src/share/vm/graal/graalEnv.hpp	Fri Nov 18 17:20:38 2011 +0100
+++ b/src/share/vm/graal/graalEnv.hpp	Tue Nov 22 10:41:05 2011 +0100
@@ -91,7 +91,7 @@
                                       instanceKlassHandle& loading_klass);
 
   // Helper methods
-  static bool       check_klass_accessibility(KlassHandle& accessing_klass, KlassHandle& resolved_klassOop);
+  static bool       check_klass_accessibility(KlassHandle accessing_klass, KlassHandle resolved_klassOop);
   static methodHandle  lookup_method(instanceKlassHandle&  accessor,
                            instanceKlassHandle&  holder,
                            Symbol*         name,
--- a/src/share/vm/graal/graalVMEntries.cpp	Fri Nov 18 17:20:38 2011 +0100
+++ b/src/share/vm/graal/graalVMEntries.cpp	Tue Nov 22 10:41:05 2011 +0100
@@ -496,7 +496,7 @@
 
 // public void RiConstantPool_loadReferencedType(long vmId, int cpi);
 JNIEXPORT void JNICALL Java_com_oracle_graal_hotspot_VMEntries_RiConstantPool_1loadReferencedType(JNIEnv *env, jobject, jobject type, jint index, jbyte op) {
-  TRACE_graal_3("VMEntries::RiConstantPool_lookupType");
+  TRACE_graal_3("VMEntries::RiConstantPool_loadReferencedType");
   VM_ENTRY_MARK;
   
   constantPoolOop cp = instanceKlass::cast(java_lang_Class::as_klassOop(HotSpotTypeResolved::javaMirror(type)))->constants();
@@ -724,9 +724,10 @@
   VM_ENTRY_MARK;
 
   KlassHandle klass_handle(java_lang_Class::as_klassOop(HotSpotTypeResolved::javaMirror(klass)));
-  KlassHandle array = klass_handle->array_klass(THREAD);
-  Handle name = VmIds::toString<Handle>(array->name(), CHECK_NULL);
-  return JNIHandles::make_local(THREAD, GraalCompiler::createHotSpotTypeResolved(array, name, THREAD)());
+  KlassHandle arr = klass_handle->array_klass(THREAD);
+  Handle name = VmIds::toString<Handle>(arr->name(), CHECK_NULL);
+  assert(arr->oop_is_array(), "");
+  return JNIHandles::make_local(THREAD, GraalCompiler::createHotSpotTypeResolved(arr, name, THREAD)());
 }
 
 // public RiField[] RiType_fields(HotSpotTypeResolved klass);