aboutsummaryrefslogtreecommitdiff
path: root/src/share/vm/utilities
diff options
context:
space:
mode:
authorkvn <none@none>2014-03-25 17:07:36 -0700
committerkvn <none@none>2014-03-25 17:07:36 -0700
commit6a20205f3a1d90d86c4bfaebc0eefd3ad6a8b9ce (patch)
tree8ed6a072f1ba8c4e4f19c237dc0700e95900bb92 /src/share/vm/utilities
parent89cdf14168e1faa10ab69e21868547dd09e4231b (diff)
parent21dbb81f55ac0015963edc549bd64c3d876651aa (diff)
Merge
Diffstat (limited to 'src/share/vm/utilities')
-rw-r--r--src/share/vm/utilities/globalDefinitions.hpp15
-rw-r--r--src/share/vm/utilities/hashtable.cpp4
-rw-r--r--src/share/vm/utilities/hashtable.hpp6
-rw-r--r--src/share/vm/utilities/vmError.cpp23
4 files changed, 37 insertions, 11 deletions
diff --git a/src/share/vm/utilities/globalDefinitions.hpp b/src/share/vm/utilities/globalDefinitions.hpp
index 6461d8303..d65990e47 100644
--- a/src/share/vm/utilities/globalDefinitions.hpp
+++ b/src/share/vm/utilities/globalDefinitions.hpp
@@ -373,6 +373,21 @@ const uint64_t KlassEncodingMetaspaceMax = (uint64_t(max_juint) + 1) << LogKlass
// Machine dependent stuff
+#if defined(X86) && defined(COMPILER2) && !defined(JAVASE_EMBEDDED)
+// Include Restricted Transactional Memory lock eliding optimization
+#define INCLUDE_RTM_OPT 1
+#define RTM_OPT_ONLY(code) code
+#else
+#define INCLUDE_RTM_OPT 0
+#define RTM_OPT_ONLY(code)
+#endif
+// States of Restricted Transactional Memory usage.
+enum RTMState {
+ NoRTM = 0x2, // Don't use RTM
+ UseRTM = 0x1, // Use RTM
+ ProfileRTM = 0x0 // Use RTM with abort ratio calculation
+};
+
#ifdef TARGET_ARCH_x86
# include "globalDefinitions_x86.hpp"
#endif
diff --git a/src/share/vm/utilities/hashtable.cpp b/src/share/vm/utilities/hashtable.cpp
index 3e1413f61..40fb3b153 100644
--- a/src/share/vm/utilities/hashtable.cpp
+++ b/src/share/vm/utilities/hashtable.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -93,7 +93,7 @@ template <MEMFLAGS F> bool BasicHashtable<F>::check_rehash_table(int count) {
return false;
}
-template <class T, MEMFLAGS F> jint Hashtable<T, F>::_seed = 0;
+template <class T, MEMFLAGS F> juint Hashtable<T, F>::_seed = 0;
// Create a new table and using alternate hash code, populate the new table
// with the existing elements. This can be used to change the hash code
diff --git a/src/share/vm/utilities/hashtable.hpp b/src/share/vm/utilities/hashtable.hpp
index 468965dab..aa4510024 100644
--- a/src/share/vm/utilities/hashtable.hpp
+++ b/src/share/vm/utilities/hashtable.hpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -280,7 +280,7 @@ protected:
// Function to move these elements into the new table.
void move_to(Hashtable<T, F>* new_table);
static bool use_alternate_hashcode() { return _seed != 0; }
- static jint seed() { return _seed; }
+ static juint seed() { return _seed; }
static int literal_size(Symbol *symbol);
static int literal_size(oop oop);
@@ -296,7 +296,7 @@ public:
void dump_table(outputStream* st, const char *table_name);
private:
- static jint _seed;
+ static juint _seed;
};
diff --git a/src/share/vm/utilities/vmError.cpp b/src/share/vm/utilities/vmError.cpp
index 4b0953ae4..e950d3386 100644
--- a/src/share/vm/utilities/vmError.cpp
+++ b/src/share/vm/utilities/vmError.cpp
@@ -592,13 +592,24 @@ void VMError::report(outputStream* st) {
st->cr();
// Compiled code may use EBP register on x86 so it looks like
// non-walkable C frame. Use frame.sender() for java frames.
- if (_thread && _thread->is_Java_thread() && fr.is_java_frame()) {
- RegisterMap map((JavaThread*)_thread, false); // No update
- fr = fr.sender(&map);
- continue;
+ if (_thread && _thread->is_Java_thread()) {
+ // Catch very first native frame by using stack address.
+ // For JavaThread stack_base and stack_size should be set.
+ if (!_thread->on_local_stack((address)(fr.sender_sp() + 1))) {
+ break;
+ }
+ if (fr.is_java_frame()) {
+ RegisterMap map((JavaThread*)_thread, false); // No update
+ fr = fr.sender(&map);
+ } else {
+ fr = os::get_sender_for_C_frame(&fr);
+ }
+ } else {
+ // is_first_C_frame() does only simple checks for frame pointer,
+ // it will pass if java compiled code has a pointer in EBP.
+ if (os::is_first_C_frame(&fr)) break;
+ fr = os::get_sender_for_C_frame(&fr);
}
- if (os::is_first_C_frame(&fr)) break;
- fr = os::get_sender_for_C_frame(&fr);
}
if (count > StackPrintLimit) {