0N/A * The contents of this file are subject to the terms 0N/A * of the Common Development and Distribution License 0N/A * (the "License"). You may not use this file except 0N/A * in compliance with the License. 0N/A * You can obtain a copy of the license at 0N/A * See the License for the specific language governing 0N/A * permissions and limitations under the License. 0N/A * When distributing Covered Code, include this CDDL 0N/A * HEADER in each file and include the License file at 0N/A * add the following below this CDDL HEADER, with the 0N/A * fields enclosed by brackets "[]" replaced with your 0N/A * own identifying information: Portions Copyright [yyyy] 0N/A * [name of copyright owner] 9N/A * Copyright 2007 Sun Microsystems, Inc. All rights reserved. 0N/A * Use is subject to license terms. 0N/A * routine to benchmark cache-to-cache transfer times... uses 0N/A * solaris features to find and bind to cpus in the current 0N/A * processor set, so not likely to work elsewhere. 0N/A " [-s size] size of access area in bytes" 0N/A "notes: measures cache to cache transfer times on Solaris\n",
0N/A * use lmbench style backwards stride 0N/A for (i = 0; i <
opts /
sizeof (
long); i++) {
0N/A * here we go in order for each thread, causing inherent serialization 0N/A * this is normally not a good idea, but in this case we're trying to 0N/A * measure cache-to-cache transfer times, and if we run threads in 0N/A * parallel we're likely to see saturation effects rather than cache-to-cache, 0N/A * esp. on wimpy memory platforms like P4. 0N/A return ((
int)*
ptr);
/* bogus return */