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 /* 00037 00038 EVENTS.H 00039 00040 */ 00041 /* 00042 * This structure is used to gather 00043 * information from an events section 00044 * record. Since each record is variable 00045 * length and is context dependent based 00046 * on it's type, the fields for arg[1-3] 00047 * are large. 00048 * 00049 * It is not expected that this structure 00050 * would be used in a table or linked list 00051 * thus size is less of a concern. 00052 */ 00053 typedef struct { 00054 __uint64_t fevnt_arg1; /* First argument 00055 (Zero if no arguments 00056 for this event) 00057 */ 00058 __uint64_t fevnt_pre_arg1; /* Raw arg1 value. 00059 Zero for leb128 values. 00060 For other values, same 00061 as the fevent_arg1 value 00062 */ 00063 __uint64_t fevnt_arg2; /* Second argument 00064 (Zero if one or 0 arguments). 00065 */ 00066 __uint64_t fevnt_pre_arg2; /* Raw arg2 value. 00067 Like fevnt_pre_arg1. 00068 */ 00069 __uint64_t fevnt_arg3; /* Third argument 00070 (zero if less than 3 00071 arguments). 00072 */ 00073 __uint64_t fevnt_pre_arg3; /* Raw arg3 value . 00074 Like fevnt_pre_arg1. 00075 */ 00076 __uint64_t fevnt_base; /* Section base address? 00077 Not filled in or used 00078 by 00079 event_find_record() or 00080 event_get_next_rec(). 00081 */ 00082 __uint32_t fevnt_type; /* Record type. 00083 the EK_* value of this 00084 event. 00085 */ 00086 __uint32_t fevnt_offset; /* Section offset. 00087 incremented by 00088 event_get_next_rec() 00089 by the length of the encoding 00090 of the event described 00091 by this Full_Events 00092 record. 00093 (for event_find_record() is 00094 incremented by the net number 00095 of events bytes.) 00096 */ 00097 __uint32_t fevnt_index; /* text section index, not 00098 filled in or used by 00099 event_find_record() or 00100 event_get_next_rec(). 00101 */ 00102 } Full_Events; 00103 00104 /*******************************************************/ 00105 /*******************************************************/ 00106 /* 00107 * Get information from the events section record 00108 * pointed to by p_event and return a pointer 00109 * to the next record. 00110 */ 00111 char *event_get_next_rec( 00112 char *, /* pointer into section */ 00113 __uint32_t , /* current offset into text section */ 00114 Full_Events *); /* information from record */ 00115 00116 /*******************************************************/ 00117 /*******************************************************/ 00118 /* 00119 * starting at the given point in the section 00120 * pointed to by p_event, find the next events 00121 * section record of the given type. 00122 * 00123 * It is assumed that the current offset coming 00124 * into this routine will be stored in p_full. 00125 * 00126 * Returns EK_NULL if type not found. 00127 */ 00128 __uint32_t event_find_record( 00129 char *, /* pointer into the events section */ 00130 Full_Events *, /* structure for events record info */ 00131 __uint32_t, /* event section type */ 00132 char *); /* end of the current events section */ 00133 00134 /*******************************************************/ 00135 /*******************************************************/ 00136 /* 00137 * Return the name of the the kind based on the 00138 * kind number. If I don't reccognize the the kind 00139 * return the hex string for the number. 00140 * 00141 * The buffer for the string is statically allocated 00142 * at compile time. If you want to manipulate the string 00143 * or keep it around while making multiple calls to 00144 * event_kind_string(), you need to copy it to another 00145 * buffer. 00146 * 00147 */ 00148 char *event_kind_string(__uint32_t ); 00149 00150 /*******************************************************/ 00151 /*******************************************************/