Open64 (mfef90, whirl2f, and IR tools)
TAG: version-openad; SVN changeset: 916
|
00001 /* 00002 00003 Copyright (C) 2000, 2001 Silicon Graphics, Inc. All Rights Reserved. 00004 00005 This program is free software; you can redistribute it and/or modify it 00006 under the terms of version 2 of the GNU General Public License as 00007 published by the Free Software Foundation. 00008 00009 This program is distributed in the hope that it would be useful, but 00010 WITHOUT ANY WARRANTY; without even the implied warranty of 00011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 00012 00013 Further, this software is distributed without any warranty that it is 00014 free of the rightful claim of any third person regarding infringement 00015 or the like. Any license provided herein, whether implied or 00016 otherwise, applies only to this software file. Patent licenses, if 00017 any, provided herein do not apply to combinations of this program with 00018 other software, or any other product whatsoever. 00019 00020 You should have received a copy of the GNU General Public License along 00021 with this program; if not, write the Free Software Foundation, Inc., 59 00022 Temple Place - Suite 330, Boston MA 02111-1307, USA. 00023 00024 Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pky, 00025 Mountain View, CA 94043, or: 00026 00027 http://www.sgi.com 00028 00029 For further information regarding this notice, see: 00030 00031 http://oss.sgi.com/projects/GenInfo/NoticeExplan 00032 00033 */ 00034 00035 00036 #ifndef __FB_H__ 00037 #define __FB_H__ 00038 00039 #include <inttypes.h> 00040 00041 typedef uint64_t FB_offset; 00042 typedef uint64_t FB_xword; 00043 typedef uint32_t FB_word; 00044 00045 typedef unsigned short FB_half; 00046 00047 /* file header: must be at the beginning of the file */ 00048 typedef struct { 00049 char fb_ident[16]; /* ident string */ 00050 FB_word fb_size; /* size in bytes of the all the section 00051 headers */ 00052 FB_offset fb_shoff; /* file offset to section header */ 00053 FB_word fb_entsize; /* size of each section header */ 00054 FB_half fb_major_version; /* major version number */ 00055 FB_half fb_minor_version; /* minor version number */ 00056 FB_word fb_str_index; /* string index of the section header */ 00057 FB_word fb_align; /* alignment */ 00058 FB_xword fb_reserved[4]; /* not used for now */ 00059 } FB_header; 00060 00061 #define FB_IDENT_STR "!!SGIfeedback!!" /* 15 bytes + null termination */ 00062 00063 #define FB_MAJOR_REV 0 /* major version number */ 00064 #define FB_MINOR_REV 0 /* minor version number */ 00065 00066 /* section header table: must be 8-byte aligned */ 00067 typedef struct { 00068 FB_offset sh_shoff; /* file offset of this section */ 00069 /* file offset must be 8-byte aligned */ 00070 FB_word sh_size; /* size in bytes of this section */ 00071 FB_half sh_type; /* type id of this section */ 00072 FB_half sh_entsize; /* size of each record */ 00073 FB_word sh_flags; /* misc info */ 00074 FB_word sh_align; /* alignment of the section */ 00075 FB_word sh_reserved[3]; /* reserved */ 00076 } FB_sec_header; 00077 00078 #define FB_SHT_NULL 0 00079 #define FB_SHT_STR 1 /* string table */ 00080 #define FB_SHT_PROC 2 /* procedure */ 00081 #define FB_SHT_CALL 3 /* call-site */ 00082 #define FB_SHT_BB 4 /* basic block */ 00083 #define FB_SHT_NUM 5 /* Number of sections including NULL */ 00084 00085 /* describes one procedure */ 00086 typedef struct fb_per_proc { 00087 FB_word p_start_line; /* starting line number */ 00088 FB_word p_invocations; /* proc invocation count */ 00089 FB_xword p_cycles; /* cycles based on pixie BB counts */ 00090 FB_offset p_filename_off; /* section offset to the filename string */ 00091 FB_offset p_procname_off; /* section offset to the procedure name */ 00092 /* proc call info */ 00093 FB_word p_call_index; /* index into the CALL section */ 00094 FB_word p_call_num; /* number of callers to this proc */ 00095 /* bb info */ 00096 FB_word p_bb_index; /* index into the BB section */ 00097 FB_word p_bb_num; /* number of bb's in this proc */ 00098 /* reserved */ 00099 FB_word p_reserved[2]; /* reserved */ 00100 } FB_per_proc; 00101 00102 /* describes one point-of-call */ 00103 typedef struct fb_per_call { 00104 FB_word c_relative_line; /* from begin of procedure */ 00105 FB_word c_invocations; /* invocation count */ 00106 FB_word c_caller_idex; /* index into the proc array */ 00107 } FB_per_call; 00108 00109 /* describes one basic block */ 00110 typedef struct fb_per_bb { 00111 FB_word bb_relative_line; /* from begin of procedure */ 00112 FB_word bb_freq; /* execution count */ 00113 FB_half bb_column; /* column number*/ 00114 FB_half bb_unused; /* available for future use */ 00115 } FB_per_bb; 00116 #endif