00001 /* 00002 * Copyright 2003, 2004 PathScale, Inc. All Rights Reserved. 00003 */ 00004 00005 /* 00006 Copyright (C) 2000-2003, Institute of Computing Technology, Chinese Academy of Sciences 00007 All rights reserved. 00008 00009 Redistribution and use in source and binary forms, with or without modification, 00010 are permitted provided that the following conditions are met: 00011 00012 Redistributions of source code must retain the above copyright notice, this list 00013 of conditions and the following disclaimer. 00014 00015 Redistributions in binary form must reproduce the above copyright notice, this list 00016 of conditions and the following disclaimer in the documentation and/or other materials 00017 provided with the distribution. 00018 00019 Neither the name of the owner nor the names of its contributors may be used to endorse or 00020 promote products derived from this software without specific prior written permission. 00021 00022 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 00023 IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 00024 FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR 00025 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 00026 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 00027 BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 00028 LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 00029 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00030 */ 00031 00032 #ifndef fb_tnv_INCLUDED 00033 #define fb_tnv_INCLUDED 00034 00035 #include "defs.h" 00036 00037 #define FB_TNV_SIZE 10 00038 00039 struct FB_TNV{ 00040 UINT32 _id; // instruction id. 00041 INT32 _flag; //0 for integer type, 1 for float type. 00042 //Note: for "float" type, we just put it here as an "integer". Because they have same size. 00043 #ifdef TARG_SL 00044 UINT32 _address; //record previous address 00045 UINT32 _exec_counter; // how many times does this instruction executed. 00046 UINT32 _clear_counter; 00047 UINT32 _sample_counter; //do stride profile sample 00048 UINT32 _stride_steps; 00049 UINT32 _zero_std_counter; 00050 UINT32 _values[FB_TNV_SIZE]; //top 10 values. 00051 UINT32 _counters[FB_TNV_SIZE]; //counters for top 10 values. 00052 #else 00053 UINT64 _address; //record previous address 00054 UINT64 _exec_counter; // how many times does this instruction executed. 00055 UINT64 _clear_counter; 00056 UINT64 _sample_counter; //do stride profile sample 00057 UINT64 _stride_steps; 00058 UINT64 _zero_std_counter; 00059 UINT64 _values[FB_TNV_SIZE]; //top 10 values. 00060 UINT64 _counters[FB_TNV_SIZE]; //counters for top 10 values. 00061 #endif 00062 FB_TNV():_address(0),_sample_counter(0),_zero_std_counter(0),_stride_steps(0){} 00063 00064 void Print( FILE *fp ) const { 00065 fprintf(fp, "id(%u), exec_counter(%llu), flag(%d), zero_std_counter(%llu), (values(counters)=( %lld(%llu), %lld(%llu), %lld(%llu), %lld(%llu), %lld(%llu), %lld(%llu), %lld(%llu), %lld(%llu), %lld(%llu), %lld(%llu) ) )\n", 00066 _id, _exec_counter, _flag, _zero_std_counter, 00067 _values[0], _counters[0] , _values[1], _counters[1], 00068 _values[2], _counters[2], _values[3], _counters[3], _values[4], _counters[4], 00069 _values[5], _counters[5], _values[6], _counters[6], _values[7], _counters[7], 00070 _values[8], _counters[8], _values[9], _counters[9] 00071 ); 00072 } 00073 }; 00074 00075 00076 00077 #endif
1.5.6