comparison src/share/vm/runtime/orderAccess.cpp @ 1711:a6bff45449bc

6973570: OrderAccess::storestore() scales poorly on multi-socket x64 and sparc: cache-line ping-ponging Summary: volatile store to static variable removed in favour of a volatile store to stack to avoid excessive cache coherency traffic; verified that the volatile store is not elided by any of our current compilers. Reviewed-by: dholmes, dice, jcoomes, kvn
author ysr
date Tue, 10 Aug 2010 14:53:35 -0700
parents c18cbe5936b8
children f95d63e2154a
comparison
equal deleted inserted replaced
1710:94251661de76 1711:a6bff45449bc
1 /* 1 /*
2 * Copyright (c) 2003, 2009, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
23 */ 23 */
24 24
25 # include "incls/_precompiled.incl" 25 # include "incls/_precompiled.incl"
26 # include "incls/_orderAccess.cpp.incl" 26 # include "incls/_orderAccess.cpp.incl"
27 27
28 volatile intptr_t OrderAccess::dummy = 0;
29
30 void OrderAccess::StubRoutines_fence() { 28 void OrderAccess::StubRoutines_fence() {
31 // Use a stub if it exists. It may not exist during bootstrap so do 29 // Use a stub if it exists. It may not exist during bootstrap so do
32 // nothing in that case but assert if no fence code exists after threads have been created 30 // nothing in that case but assert if no fence code exists after threads have been created
33 void (*func)() = CAST_TO_FN_PTR(void (*)(), StubRoutines::fence_entry()); 31 void (*func)() = CAST_TO_FN_PTR(void (*)(), StubRoutines::fence_entry());
34 32