? iometer/.snprj ? iometer/Announcement.2003mmdd.txt ? iometer/iometer.cleanup.txt ? iometer/iometer.sourcenav.proj ? iometer/nohup.out ? iometer/misc/Homepage/nohup.out ? iometer/misc/Homepage/doc/nohup.out ? iometer/src/dynamo ? iometer/src/nohup.out Index: iometer/src/IOCommon.h =================================================================== RCS file: /cvsroot/iometer/iometer/src/IOCommon.h,v retrieving revision 1.8 diff -r1.8 IOCommon.h 55c55,57 < /* ## Changes ...: 2003-07-13 (daniel.scheibli@edelbyte.org) ## */ --- > /* ## Changes ...: 2003-07-19 (daniel.scheibli@edelbyte.org) ## */ > /* ## - Merged IOTime.h stuff into (parts of) ## */ > /* ## 2003-07-13 (daniel.scheibli@edelbyte.org) ## */ 522c524 < extern inline char *Strip( char *pcString ) --- > inline char *Strip( char *pcString ) 605a608,620 > // ---------------------------------------------------------------------------- > #if defined(IOMTR_OS_LINUX) > extern DWORDLONG jiffies(void); > extern DWORDLONG rdtsc(void); > #endif > // ---------------------------------------------------------------------------- > #if defined(IOMTR_OS_SOLARIS) > extern "C" DWORDLONG rdtsc(); > #endif > // ---------------------------------------------------------------------------- > #if defined(IOMTR_OS_WIN32) || defined(IOMTR_OS_WIN64) > extern DWORDLONG rdtsc(); > #endif Index: iometer/src/IOPerformance.cpp =================================================================== RCS file: /cvsroot/iometer/iometer/src/IOPerformance.cpp,v retrieving revision 1.6 diff -r1.6 IOPerformance.cpp 15a16,51 > /* ## Intel Open Source License ## */ > /* ## ## */ > /* ## Copyright (c) 2001 Intel Corporation ## */ > /* ## All rights reserved. ## */ > /* ## Redistribution and use in source and binary forms, with or ## */ > /* ## without modification, are permitted provided that the following ## */ > /* ## conditions are met: ## */ > /* ## ## */ > /* ## Redistributions of source code must retain the above copyright ## */ > /* ## notice, this list of conditions and the following disclaimer. ## */ > /* ## ## */ > /* ## Redistributions in binary form must reproduce the above copyright ## */ > /* ## notice, this list of conditions and the following disclaimer in ## */ > /* ## the documentation and/or other materials provided with the ## */ > /* ## distribution. ## */ > /* ## ## */ > /* ## Neither the name of the Intel Corporation nor the names of its ## */ > /* ## contributors may be used to endorse or promote products derived ## */ > /* ## from this software without specific prior written permission. ## */ > /* ## ## */ > /* ## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND ## */ > /* ## CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, ## */ > /* ## INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF ## */ > /* ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE ## */ > /* ## DISCLAIMED. IN NO EVENT SHALL THE INTEL OR ITS CONTRIBUTORS BE ## */ > /* ## LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, ## */ > /* ## OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, ## */ > /* ## PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, ## */ > /* ## OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY ## */ > /* ## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR ## */ > /* ## TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT ## */ > /* ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY ## */ > /* ## OF SUCH DAMAGE. ## */ > /* ## ## */ > /* ## ------------------------------------------------------------------- ## */ > /* ## ## */ 20c56,59 < /* ## Changes ...: 2003-03-04 (joe@eiler.net) ## */ --- > /* ## Changes ...: 2003-07-19 (daniel.scheibli@edelbyte.org) ## */ > /* ## - Removed IOTime.h inclusion (now in IOCommon.h) ## */ > /* ## - Integrated the License Statement into this header. ## */ > /* ## 2003-03-04 (joe@eiler.net) ## */ 31,32d69 < /* < Intel Open Source License 34,75d70 < Copyright (c) 2001 Intel Corporation < All rights reserved. < Redistribution and use in source and binary forms, with or without < modification, are permitted provided that the following conditions are met: < < Redistributions of source code must retain the above copyright notice, < this list of conditions and the following disclaimer. < < Redistributions in binary form must reproduce the above copyright notice, < this list of conditions and the following disclaimer in the documentation < and/or other materials provided with the distribution. < < Neither the name of the Intel Corporation nor the names of its contributors < may be used to endorse or promote products derived from this software < without specific prior written permission. < < THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' < AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE < IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE < ARE DISCLAIMED. IN NO EVENT SHALL THE INTEL OR ITS CONTRIBUTORS BE LIABLE < FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL < DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR < SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER < CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, < OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE < USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. < < */ < // ========================================================================== < // Copyright (C) 1998-2000 Intel Corporation < // All rights reserved < // INTEL CORPORATION PROPRIETARY INFORMATION < // This software is supplied under the terms of a license agreement or < // nondisclosure agreement with Intel Corporation and may not be copied < // or disclosed except in accordance with the terms of that agreement. < // ========================================================================== < // < // IOPerformance.cpp: Implementation of the Performance class, which gets < // all system-wide performance information (CPU and network) from the OS. < // < ////////////////////////////////////////////////////////////////////// < /* ######################################################################### */ 78a74,75 > > 82d78 < #include "IOTime.h" Index: iometer/src/IOPerformance.h =================================================================== RCS file: /cvsroot/iometer/iometer/src/IOPerformance.h,v retrieving revision 1.1.1.1 diff -r1.1.1.1 IOPerformance.h 1,45c1,61 < /* < Intel Open Source License < < Copyright (c) 2001 Intel Corporation < All rights reserved. < Redistribution and use in source and binary forms, with or without < modification, are permitted provided that the following conditions are met: < < Redistributions of source code must retain the above copyright notice, < this list of conditions and the following disclaimer. < < Redistributions in binary form must reproduce the above copyright notice, < this list of conditions and the following disclaimer in the documentation < and/or other materials provided with the distribution. < < Neither the name of the Intel Corporation nor the names of its contributors < may be used to endorse or promote products derived from this software < without specific prior written permission. < < THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' < AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE < IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE < ARE DISCLAIMED. IN NO EVENT SHALL THE INTEL OR ITS CONTRIBUTORS BE LIABLE < FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL < DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR < SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER < CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, < OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE < USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. < < */ < // ========================================================================== < // Copyright (C) 1998-2000 Intel Corporation < // All rights reserved < // INTEL CORPORATION PROPRIETARY INFORMATION < // This software is supplied under the terms of a license agreement or < // nondisclosure agreement with Intel Corporation and may not be copied < // or disclosed except in accordance with the terms of that agreement. < // ========================================================================== < // < // IOPerformance.h: Interface for the Performance class, which gets < // all system-wide performance information (CPU and network) from the OS. < // < ////////////////////////////////////////////////////////////////////// < --- > /* ######################################################################### */ > /* ## ## */ > /* ## Dynamo / IOPerformance.h ## */ > /* ## ## */ > /* ## ------------------------------------------------------------------- ## */ > /* ## ## */ > /* ## Job .......: Interface for the Performance class. ## */ > /* ## This class does two jobs: ## */ > /* ## 1.) Collects basic informations like the number ## */ > /* ## of CPU's. ## */ > /* ## 2.) Collection of system-wide performance ## */ > /* ## informations. ## */ > /* ## ## */ > /* ## ------------------------------------------------------------------- ## */ > /* ## ## */ > /* ## Intel Open Source License ## */ > /* ## ## */ > /* ## Copyright (c) 2001 Intel Corporation ## */ > /* ## All rights reserved. ## */ > /* ## Redistribution and use in source and binary forms, with or ## */ > /* ## without modification, are permitted provided that the following ## */ > /* ## conditions are met: ## */ > /* ## ## */ > /* ## Redistributions of source code must retain the above copyright ## */ > /* ## notice, this list of conditions and the following disclaimer. ## */ > /* ## ## */ > /* ## Redistributions in binary form must reproduce the above copyright ## */ > /* ## notice, this list of conditions and the following disclaimer in ## */ > /* ## the documentation and/or other materials provided with the ## */ > /* ## distribution. ## */ > /* ## ## */ > /* ## Neither the name of the Intel Corporation nor the names of its ## */ > /* ## contributors may be used to endorse or promote products derived ## */ > /* ## from this software without specific prior written permission. ## */ > /* ## ## */ > /* ## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND ## */ > /* ## CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, ## */ > /* ## INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF ## */ > /* ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE ## */ > /* ## DISCLAIMED. IN NO EVENT SHALL THE INTEL OR ITS CONTRIBUTORS BE ## */ > /* ## LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, ## */ > /* ## OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, ## */ > /* ## PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, ## */ > /* ## OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY ## */ > /* ## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR ## */ > /* ## TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT ## */ > /* ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY ## */ > /* ## OF SUCH DAMAGE. ## */ > /* ## ## */ > /* ## ------------------------------------------------------------------- ## */ > /* ## ## */ > /* ## Remarks ...: ## */ > /* ## ## */ > /* ## ------------------------------------------------------------------- ## */ > /* ## ## */ > /* ## Changes ...: 2003-07-19 (daniel.scheibli@edelbyte.org) ## */ > /* ## - Removed IOTime.h inclusion (now in IOCommon.h) ## */ > /* ## - Integrated the License Statement into this header. ## */ > /* ## - Added new header holding the changelog. ## */ > /* ## ## */ > /* ######################################################################### */ 51c67 < #include "IOTime.h" --- > Index: iometer/src/IOTargetDisk.h =================================================================== RCS file: /cvsroot/iometer/iometer/src/IOTargetDisk.h,v retrieving revision 1.1.1.1 diff -r1.1.1.1 IOTargetDisk.h 1,45c1,57 < /* < Intel Open Source License < < Copyright (c) 2001 Intel Corporation < All rights reserved. < Redistribution and use in source and binary forms, with or without < modification, are permitted provided that the following conditions are met: < < Redistributions of source code must retain the above copyright notice, < this list of conditions and the following disclaimer. < < Redistributions in binary form must reproduce the above copyright notice, < this list of conditions and the following disclaimer in the documentation < and/or other materials provided with the distribution. < < Neither the name of the Intel Corporation nor the names of its contributors < may be used to endorse or promote products derived from this software < without specific prior written permission. < < THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' < AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE < IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE < ARE DISCLAIMED. IN NO EVENT SHALL THE INTEL OR ITS CONTRIBUTORS BE LIABLE < FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL < DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR < SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER < CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, < OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE < USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. < < */ < // ========================================================================== < // Copyright (C) 1997-2000 Intel Corporation < // All rights reserved < // INTEL CORPORATION PROPRIETARY INFORMATION < // This software is supplied under the terms of a license agreement or < // nondisclosure agreement with Intel Corporation and may not be copied < // or disclosed except in accordance with the terms of that agreement. < // ========================================================================== < // < // IOTargetDisk.h: Interface for an implementation of the Target class < // for disks. < // < ////////////////////////////////////////////////////////////////////// < --- > /* ######################################################################### */ > /* ## ## */ > /* ## Dynamo / IOTargetDisk.h ## */ > /* ## ## */ > /* ## ------------------------------------------------------------------- ## */ > /* ## ## */ > /* ## Job .......: Interface for an implementation of the Target class ## */ > /* ## for disks. ## */ > /* ## ## */ > /* ## ------------------------------------------------------------------- ## */ > /* ## ## */ > /* ## Intel Open Source License ## */ > /* ## ## */ > /* ## Copyright (c) 2001 Intel Corporation ## */ > /* ## All rights reserved. ## */ > /* ## Redistribution and use in source and binary forms, with or ## */ > /* ## without modification, are permitted provided that the following ## */ > /* ## conditions are met: ## */ > /* ## ## */ > /* ## Redistributions of source code must retain the above copyright ## */ > /* ## notice, this list of conditions and the following disclaimer. ## */ > /* ## ## */ > /* ## Redistributions in binary form must reproduce the above copyright ## */ > /* ## notice, this list of conditions and the following disclaimer in ## */ > /* ## the documentation and/or other materials provided with the ## */ > /* ## distribution. ## */ > /* ## ## */ > /* ## Neither the name of the Intel Corporation nor the names of its ## */ > /* ## contributors may be used to endorse or promote products derived ## */ > /* ## from this software without specific prior written permission. ## */ > /* ## ## */ > /* ## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND ## */ > /* ## CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, ## */ > /* ## INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF ## */ > /* ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE ## */ > /* ## DISCLAIMED. IN NO EVENT SHALL THE INTEL OR ITS CONTRIBUTORS BE ## */ > /* ## LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, ## */ > /* ## OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, ## */ > /* ## PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, ## */ > /* ## OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY ## */ > /* ## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR ## */ > /* ## TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT ## */ > /* ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY ## */ > /* ## OF SUCH DAMAGE. ## */ > /* ## ## */ > /* ## ------------------------------------------------------------------- ## */ > /* ## ## */ > /* ## Remarks ...: ## */ > /* ## ## */ > /* ## ------------------------------------------------------------------- ## */ > /* ## ## */ > /* ## Changes ...: 2003-07-19 (daniel.scheibli@edelbyte.org) ## */ > /* ## - Removed IOTime.h inclusion (now in IOCommon.h) ## */ > /* ## - Integrated the License Statement into this header. ## */ > /* ## - Added new header holding the changelog. ## */ > /* ## ## */ > /* ######################################################################### */ 47c59,60 < #define TARGET_DISK_DEFINED --- > #define TARGET_DISK_DEFINED > 50d62 < #include "IOTime.h" Index: iometer/src/IOTime.cpp =================================================================== RCS file: /cvsroot/iometer/iometer/src/IOTime.cpp,v retrieving revision 1.2 diff -r1.2 IOTime.cpp 7c7 < /* ## Job .......: Implements timing ## */ --- > /* ## Job .......: Implements the timing functions. ## */ 15c15,56 < /* ## Changes ...: 2003-03-04 (joe@eiler.net) ## */ --- > /* ## Intel Open Source License ## */ > /* ## ## */ > /* ## Copyright (c) 2001 Intel Corporation ## */ > /* ## All rights reserved. ## */ > /* ## Redistribution and use in source and binary forms, with or ## */ > /* ## without modification, are permitted provided that the following ## */ > /* ## conditions are met: ## */ > /* ## ## */ > /* ## Redistributions of source code must retain the above copyright ## */ > /* ## notice, this list of conditions and the following disclaimer. ## */ > /* ## ## */ > /* ## Redistributions in binary form must reproduce the above copyright ## */ > /* ## notice, this list of conditions and the following disclaimer in ## */ > /* ## the documentation and/or other materials provided with the ## */ > /* ## distribution. ## */ > /* ## ## */ > /* ## Neither the name of the Intel Corporation nor the names of its ## */ > /* ## contributors may be used to endorse or promote products derived ## */ > /* ## from this software without specific prior written permission. ## */ > /* ## ## */ > /* ## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND ## */ > /* ## CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, ## */ > /* ## INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF ## */ > /* ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE ## */ > /* ## DISCLAIMED. IN NO EVENT SHALL THE INTEL OR ITS CONTRIBUTORS BE ## */ > /* ## LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, ## */ > /* ## OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, ## */ > /* ## PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, ## */ > /* ## OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY ## */ > /* ## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR ## */ > /* ## TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT ## */ > /* ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY ## */ > /* ## OF SUCH DAMAGE. ## */ > /* ## ## */ > /* ## ------------------------------------------------------------------- ## */ > /* ## ## */ > /* ## Changes ...: 2003-07-19 (daniel.scheibli@edelbyte.org) ## */ > /* ## - Merged IOTime.h stuff into (parts of) ## */ > /* ## - Implemented the IOMTR_[OSFAMILY|OS|CPU]_* global ## */ > /* ## define as well as their integrity checks. ## */ > /* ## - Integrated the License Statement into this header. ## */ > /* ## 2003-03-04 (joe@eiler.net) ## */ 20,21d60 < /* < Intel Open Source License 23,37c62,137 < Copyright (c) 2001 Intel Corporation < All rights reserved. < Redistribution and use in source and binary forms, with or without < modification, are permitted provided that the following conditions are met: < < Redistributions of source code must retain the above copyright notice, < this list of conditions and the following disclaimer. < < Redistributions in binary form must reproduce the above copyright notice, < this list of conditions and the following disclaimer in the documentation < and/or other materials provided with the distribution. < < Neither the name of the Intel Corporation nor the names of its contributors < may be used to endorse or promote products derived from this software < without specific prior written permission. --- > > > // Include our central headerfile > #include "IOCommon.h" > > > > // Implements the time measurment functions > // for / in the different plattforms > // ---------------------------------------------------------------------------- > #if defined(IOMTR_OS_LINUX) > DWORDLONG jiffies(void) { > DWORDLONG jiffies_user, jiffies_nice, jiffies_system, jiffies_idle; > FILE *fp = fopen("/proc/stat", "r"); > fscanf(fp, "cpu %*s %*s %*s %*s\n"); > fscanf(fp, "cpu0 %lld %lld %lld %lld\n", &jiffies_user, &jiffies_nice, &jiffies_system, &jiffies_idle); > fclose(fp); > return(jiffies_user + jiffies_nice + jiffies_system + jiffies_idle); > } > #if defined(IOMTR_CPU_I386) > DWORDLONG rdtsc(void) { > // Original code (returning the cpu cycle counter) > unsigned int lo, hi; > __asm__ __volatile__("rdtsc" : "=a" (lo), "=d" (hi)); > return(lo | ((DWORDLONG)hi << 32)); > // Alternative code (returning the cpu cycle counter too) > // unsigned long long int x; > // __asm__ volatile (".byte 0x0f, 0x31" : "=A" (x)); > // return(x); > } > #else > // Was the following 2 lines in before, but for which CPU (nevertheless it is useless!)? > // /* Totally cheesy rewrite of rdtsc! */ > // return((DWORDLONG)time(NULL) * 200); > #warning ===> WARNING: You have to do some coding here to get the port done! > #endif > // ---------------------------------------------------------------------------- > #elif defined(IOMTR_OS_SOLARIS) > #if defined(IOMTR_CPU_I386) > unsigned long long rdtsc() > { > asm(".byte 0x0f, 0x31"); > } > #elif defined(IOMTR_CPU_SPARC) > #include > #include > double processor_speed_to_nsecs; > unsigned long long rdtsc() > { > return (DWORDLONG)((double)gethrtime() * (double)processor_speed_to_nsecs); > } > #else > #warning ===> WARNING: You have to do some coding here to get the port done! > #endif > // ---------------------------------------------------------------------------- > #elif defined(IOMTR_OS_WIN32) && defined(IOMTR_CPU_I386) > // > // In WIN32 to read the IA32 Time Stamp Counter (TSC) > // Use the opcode since MSFT compiler doesn't recognize the RDTSC instruction. > // > __declspec ( naked ) extern DWORDLONG rdtsc() > { > _asm > { > _emit 0Fh // Store low 32-bits of counter in EAX. > _emit 31h // Store high 32-bits of counter in EDX. > ret > } > } > // ---------------------------------------------------------------------------- > #elif defined(IOMTR_OS_WIN64) && defined(IOMTR_CPU_IA64) > // > // Comment the next line out if you are building an application with the SDK and > // are not using the DDK to build a driver. > // > //#define USING_DDK 39,85c139,190 < THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' < AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE < IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE < ARE DISCLAIMED. IN NO EVENT SHALL THE INTEL OR ITS CONTRIBUTORS BE LIABLE < FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL < DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR < SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER < CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, < OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE < USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. < < */ < // ========================================================================== < // Copyright (C) 1997-2000 Intel Corporation < // All rights reserved < // INTEL CORPORATION PROPRIETARY INFORMATION < // This software is supplied under the terms of a license agreement or < // nondisclosure agreement with Intel Corporation and may not be copied < // or disclosed except in accordance with the terms of that agreement. < // ========================================================================== < // < // IOTime.cpp: Implementation of the assembly-language function rdtsc(), < // which gets the processor's high-resolution time stamp, for Windows. < // (The Solaris implementation of this function can be found in rdtsc.c; < // the Linux implementation is in IOTime.h.) < // < // This file is used by both Iometer and Dynamo. < // < ////////////////////////////////////////////////////////////////////// < < #include "IOTime.h" < < //#ifdef WIN64_COUNTER_WORKAROUND < #ifdef _WIN64 < // < //////////////////////////////////////////////////////////////////////////////////// < // Name: readITC < // Purpose: To read the IA64 Itanium's Interval Time Counter (ITC, AR-44). The < // ITC is equivalent to the IA32 Time Stamp Counter (TSC). The IA32 < // TSC can be read using the IA32 RDTSC instruction (opcode 0F 31h) but < // there is no equivalent IA64 instruction to read the ITC. < // Returns: The value of the ITC < // Parameters: None. < /////////////////////////////////////////////////////////////////////////////////// < // < DWORDLONG rdtsc() < { --- > #ifdef USING_DDK // Driver > #include // from IA64 DDK > #include // from IA64 DDK > #endif // USING_DDK > > #ifndef USING_DDK // Application > // > // Including the typedef that I need from DDK 'ia64reg.h' here so that we don't > // have to include the DDK in the build path. There are lots of additional > // registers defined but we don't need them here. > // > > // > // Register set for Intel IA64 > // > typedef enum IA64_REG_INDEX { > // ... Bunch of registers deleted here... > CV_IA64_ApITC = 3116, // Interval Time Counter (ITC, AR-44) > // ... Bunch of registers deleted here... > } IA64_REG_INDEX; > > // > // Including the defn that I need from DDK 'wdm.h' here so that we don't have to > // include the DDK in the build path. > // > #ifdef __cplusplus > extern "C" { > #endif > > unsigned __int64 __getReg (int); > > #ifdef _M_IA64 > #pragma intrinsic (__getReg) > #endif // _M_IA64 > > #ifdef __cplusplus > } > #endif > #endif //!USING_DDK > > //////////////////////////////////////////////////////////////////////////////////// > // Name: readITC > // Purpose: To read the IA64 Itanium's Interval Time Counter (ITC, AR-44). The > // ITC is equivalent to the IA32 Time Stamp Counter (TSC). The IA32 > // TSC can be read using the IA32 RDTSC instruction (opcode 0F 31h) but > // there is no equivalent IA64 instruction to read the ITC. > // Returns: The value of the ITC > // Parameters: None. > /////////////////////////////////////////////////////////////////////////////////// > // > DWORDLONG rdtsc() > { 110,132c215,218 < } < #endif < < // < // Retrieving processor counter. < // < //#ifndef WIN64_COUNTER_WORKAROUND < #ifndef _WIN64 < #ifndef UNIX < // < // In WIN32 to read the IA32 Time Stamp Counter (TSC) < // Use the opcode since MSFT compiler doesn't recognize the RDTSC instruction. < // < __declspec ( naked ) extern DWORDLONG rdtsc() < { < _asm < { < _emit 0Fh // Store low 32-bits of counter in EAX. < _emit 31h // Store high 32-bits of counter in EDX. < ret < } < } < #endif --- > } > // ---------------------------------------------------------------------------- > #else > #warning ===> WARNING: You have to do some coding here to get the port done! 133a220 > // ---------------------------------------------------------------------------- 135,136d221 < #ifdef UNIX < #if defined(SOLARIS) && defined(__i386) 138,157d222 < unsigned long long rdtsc() < { < asm(".byte 0x0f, 0x31"); < } < < #elif defined(SOLARIS) && defined(__sparc) /* ! SOLARIS && __i386 */ < #include < #include < double processor_speed_to_nsecs; < unsigned long long rdtsc() < { < return (DWORDLONG)((double)gethrtime() * (double)processor_speed_to_nsecs); < } < < #elif defined(LINUX) < // rdtsc code present in IOTime.h < #else < #error "rdtsc NOT SUPPORTED." < #endif // SOLARIS && __i386 < #endif // UNIX Index: iometer/src/IOTime.h =================================================================== RCS file: /cvsroot/iometer/iometer/src/IOTime.h,v retrieving revision 1.2 diff -r1.2 IOTime.h 1,24d0 < /* ######################################################################### */ < /* ## ## */ < /* ## Dynamo / IOTime.h ## */ < /* ## ## */ < /* ## ------------------------------------------------------------------- ## */ < /* ## ## */ < /* ## Job .......: Implements the GNU/Linux variant for the timing ## */ < /* ## relevant functions (for the time measurments). ## */ < /* ## ## */ < /* ## ------------------------------------------------------------------- ## */ < /* ## ## */ < /* ## Remarks ...: ## */ < /* ## ## */ < /* ## ------------------------------------------------------------------- ## */ < /* ## ## */ < /* ## Changes ...: 2003-02-02 (daniel.scheibli@edelbyte.org) ## */ < /* ## - Added new header holding the changelog. ## */ < /* ## - Added the jiffies() function which parses the ## */ < /* ## /proc/stat file for the total number of Jiffies ## */ < /* ## since system startup. ## */ < /* ## ## */ < /* ######################################################################### */ < /* < Intel Open Source License 26,29d1 < Copyright (c) 2001 Intel Corporation < All rights reserved. < Redistribution and use in source and binary forms, with or without < modification, are permitted provided that the following conditions are met: 31,180d2 < Redistributions of source code must retain the above copyright notice, < this list of conditions and the following disclaimer. < < Redistributions in binary form must reproduce the above copyright notice, < this list of conditions and the following disclaimer in the documentation < and/or other materials provided with the distribution. < < Neither the name of the Intel Corporation nor the names of its contributors < may be used to endorse or promote products derived from this software < without specific prior written permission. < < THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' < AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE < IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE < ARE DISCLAIMED. IN NO EVENT SHALL THE INTEL OR ITS CONTRIBUTORS BE LIABLE < FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL < DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR < SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER < CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, < OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE < USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. < < */ < // ========================================================================== < // Copyright (C) 1997-2000 Intel Corporation < // All rights reserved < // INTEL CORPORATION PROPRIETARY INFORMATION < // This software is supplied under the terms of a license agreement or < // nondisclosure agreement with Intel Corporation and may not be copied < // or disclosed except in accordance with the terms of that agreement. < // ========================================================================== < // < // IOTime.h: Interface for the assembly-language function rdtsc(), < // which gets the processor's high-resolution time stamp, and its < // implementation for Linux. (The Windows implementation of this < // function can be found in IOTime.cpp; the Solaris implementation < // is in rdtsc.c.) < // < // This file is used by both Iometer and Dynamo. < // < ////////////////////////////////////////////////////////////////////// < /* ######################################################################### */ < < #ifndef TIME_DEFINED < #define TIME_DEFINED < < #include "IOCommon.h" < < #ifdef SOLARIS < extern "C" DWORDLONG rdtsc(); < #endif // SOLARIS < < #ifdef LINUX < < #if defined (i386) < /* < * Stolen from Linux kernel source. < */ < extern inline DWORDLONG rdtsc(void) { < // Original code (returning the cpu cycle counter) < unsigned int lo, hi; < __asm__ __volatile__("rdtsc" : "=a" (lo), "=d" (hi)); < return(lo | ((DWORDLONG)hi << 32)); < // Alternative code (returning the cpu cycle counter too) < // unsigned long long int x; < // __asm__ volatile (".byte 0x0f, 0x31" : "=A" (x)); < // return(x); < } < #else /* !i386 */ < extern inline DWORDLONG rdtsc(void) { < /* Totally cheesy rewrite of rdtsc! */ < return((DWORDLONG)time(NULL) * 200); < } < #endif /* i386 */ < < extern inline DWORDLONG jiffies(void) { < DWORDLONG jiffies_user, jiffies_nice, jiffies_system, jiffies_idle; < FILE *fp = fopen("/proc/stat", "r"); < fscanf(fp, "cpu %*s %*s %*s %*s\n"); < fscanf(fp, "cpu0 %lld %lld %lld %lld\n", &jiffies_user, &jiffies_nice, &jiffies_system, &jiffies_idle); < fclose(fp); < return(jiffies_user + jiffies_nice + jiffies_system + jiffies_idle); < } < < #endif /* LINUX */ < < #if defined (_WIN32) || defined (_WIN64) < < #ifdef _WIN64 < //#ifdef WIN64_COUNTER_WORKAROUND < < // < // Comment the next line out if you are building an application with the SDK and < // are not using the DDK to build a driver. < // < //#define USING_DDK < < #ifdef USING_DDK // Driver < #include // from IA64 DDK < #include // from IA64 DDK < #endif // USING_DDK < < #ifndef USING_DDK // Application < // < // Including the typedef that I need from DDK 'ia64reg.h' here so that we don't < // have to include the DDK in the build path. There are lots of additional < // registers defined but we don't need them here. < // < < // < // Register set for Intel IA64 < // < typedef enum IA64_REG_INDEX { < < // ... Bunch of registers deleted here... < < CV_IA64_ApITC = 3116, // Interval Time Counter (ITC, AR-44) < < // ... Bunch of registers deleted here... < < } IA64_REG_INDEX; < < // < // Including the defn that I need from DDK 'wdm.h' here so that we don't have to < // include the DDK in the build path. < // < #ifdef __cplusplus < extern "C" { < #endif < < unsigned __int64 __getReg (int); < < #ifdef _M_IA64 < #pragma intrinsic (__getReg) < #endif // _M_IA64 < < #ifdef __cplusplus < } < #endif < < #endif //!USING_DDK < < #endif // _WIN64 < < DWORDLONG rdtsc(); < < #endif < < < #endif // !TIME_DEFINED Index: iometer/src/Iometer.dsp =================================================================== RCS file: /cvsroot/iometer/iometer/src/Iometer.dsp,v retrieving revision 1.5 diff -r1.5 Iometer.dsp 298,301d297 < SOURCE=.\IOTime.h < # End Source File < # Begin Source File < Index: iometer/src/Worker.cpp =================================================================== RCS file: /cvsroot/iometer/iometer/src/Worker.cpp,v retrieving revision 1.3 diff -r1.3 Worker.cpp 11a12,47 > /* ## Intel Open Source License ## */ > /* ## ## */ > /* ## Copyright (c) 2001 Intel Corporation ## */ > /* ## All rights reserved. ## */ > /* ## Redistribution and use in source and binary forms, with or ## */ > /* ## without modification, are permitted provided that the following ## */ > /* ## conditions are met: ## */ > /* ## ## */ > /* ## Redistributions of source code must retain the above copyright ## */ > /* ## notice, this list of conditions and the following disclaimer. ## */ > /* ## ## */ > /* ## Redistributions in binary form must reproduce the above copyright ## */ > /* ## notice, this list of conditions and the following disclaimer in ## */ > /* ## the documentation and/or other materials provided with the ## */ > /* ## distribution. ## */ > /* ## ## */ > /* ## Neither the name of the Intel Corporation nor the names of its ## */ > /* ## contributors may be used to endorse or promote products derived ## */ > /* ## from this software without specific prior written permission. ## */ > /* ## ## */ > /* ## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND ## */ > /* ## CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, ## */ > /* ## INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF ## */ > /* ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE ## */ > /* ## DISCLAIMED. IN NO EVENT SHALL THE INTEL OR ITS CONTRIBUTORS BE ## */ > /* ## LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, ## */ > /* ## OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, ## */ > /* ## PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, ## */ > /* ## OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY ## */ > /* ## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR ## */ > /* ## TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT ## */ > /* ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY ## */ > /* ## OF SUCH DAMAGE. ## */ > /* ## ## */ > /* ## ------------------------------------------------------------------- ## */ > /* ## ## */ 16c52,55 < /* ## Changes ...: 2003-04-25 (daniel.scheibli@edelbyte.org) ## */ --- > /* ## Changes ...: 2003-07-19 (daniel.scheibli@edelbyte.org) ## */ > /* ## - Removed IOTime.h inclusion (now in IOCommon.h) ## */ > /* ## - Integrated the License Statement into this header. ## */ > /* ## 2003-04-25 (daniel.scheibli@edelbyte.org) ## */ 24,69d62 < /* < Intel Open Source License < < Copyright (c) 2001 Intel Corporation < All rights reserved. < Redistribution and use in source and binary forms, with or without < modification, are permitted provided that the following conditions are met: < < Redistributions of source code must retain the above copyright notice, < this list of conditions and the following disclaimer. < < Redistributions in binary form must reproduce the above copyright notice, < this list of conditions and the following disclaimer in the documentation < and/or other materials provided with the distribution. < < Neither the name of the Intel Corporation nor the names of its contributors < may be used to endorse or promote products derived from this software < without specific prior written permission. < < THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' < AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE < IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE < ARE DISCLAIMED. IN NO EVENT SHALL THE INTEL OR ITS CONTRIBUTORS BE LIABLE < FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL < DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR < SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER < CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, < OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE < USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. < < */ < // ========================================================================== < // Copyright (C) 1997-2000 Intel Corporation < // All rights reserved < // INTEL CORPORATION PROPRIETARY INFORMATION < // This software is supplied under the terms of a license agreement or < // nondisclosure agreement with Intel Corporation and may not be copied < // or disclosed except in accordance with the terms of that agreement. < // ========================================================================== < // < // Worker.cpp: Implementation of the Worker class for Iometer, which < // is in charge of keeping results for each worker, as well as maintaining < // the list of currently-assigned targets for each worker. < // < ////////////////////////////////////////////////////////////////////// < /* ######################################################################### */ 71a65 > #include "IOCommon.h" 79d72 < #include "IOTime.h" 92,96c85,89 < #ifdef _DEBUG < #define new DEBUG_NEW < #undef THIS_FILE < static char THIS_FILE[] = __FILE__; < #endif --- > #ifdef _DEBUG > #define new DEBUG_NEW > #undef THIS_FILE > static char THIS_FILE[] = __FILE__; > #endif