aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordholmes <none@none>2013-05-08 21:06:46 -0400
committerdholmes <none@none>2013-05-08 21:06:46 -0400
commit8de5cb9affed2e0147c01294162004e1d27e44cf (patch)
tree9ec0fc4d530a8225fa9b6c5a0712279830d5aa4e
parent30f017ee3b4e8fece095164e2c9334c85864d799 (diff)
parentad85346c016931703a166f21a56da6d8cb60654f (diff)
Merge
-rw-r--r--src/share/vm/runtime/arguments.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/share/vm/runtime/arguments.cpp b/src/share/vm/runtime/arguments.cpp
index a23a3b523..182b361cb 100644
--- a/src/share/vm/runtime/arguments.cpp
+++ b/src/share/vm/runtime/arguments.cpp
@@ -2088,6 +2088,26 @@ bool Arguments::check_vm_args_consistency() {
#endif
}
+ // Need to limit the extent of the padding to reasonable size.
+ // 8K is well beyond the reasonable HW cache line size, even with the
+ // aggressive prefetching, while still leaving the room for segregating
+ // among the distinct pages.
+ if (ContendedPaddingWidth < 0 || ContendedPaddingWidth > 8192) {
+ jio_fprintf(defaultStream::error_stream(),
+ "ContendedPaddingWidth=" INTX_FORMAT " must be the between %d and %d\n",
+ ContendedPaddingWidth, 0, 8192);
+ status = false;
+ }
+
+ // Need to enforce the padding not to break the existing field alignments.
+ // It is sufficient to check against the largest type size.
+ if ((ContendedPaddingWidth % BytesPerLong) != 0) {
+ jio_fprintf(defaultStream::error_stream(),
+ "ContendedPaddingWidth=" INTX_FORMAT " must be the multiple of %d\n",
+ ContendedPaddingWidth, BytesPerLong);
+ status = false;
+ }
+
return status;
}