// Module TFDEF.H "X-4" // // ****************************************************************************** // * * // * © Copyright 1976, 2003 Hewlett-Packard Development Company, L.P. * // * * // * Confidential computer software. Valid license from HP and/or * // * its subsidiaries required for possession, use, or copying. * // * * // * Consistent with FAR 12.211 and 12.212, Commercial Computer Software, * // * Computer Software Documentation, and Technical Data for Commercial * // * Items are licensed to the U.S. Government under vendor's standard * // * commercial license. * // * * // * Neither HP nor any of its subsidiaries shall be liable for technical * // * or editorial errors or omissions contained herein. The information * // * in this document is provided "as is" without warranty of any kind and * // * is subject to change without notice. The warranties for HP products * // * are set forth in the express limited warranty statements accompanying * // * such products. Nothing herein should be construed as constituting an * // * additional warranty. * // * * // ****************************************************************************** // //++ // // FACILITY: // // OpenVMS Executive (LIB_H) // // ABSTRACT: // // This module contains the C function prototypes and structure // definitions for the SDA extension trace facility routines. // // AUTHOR: // // Christian Moser, Hewlett-Packard // // MODIFIED BY: // // X-4 CMOS Christian Moser 8-FEB-2006 // Add new TF$CVT_TIMESTAMP and TF$CALC_DELTA routines // and remove TF$READ_SCC. // // X-3 CMOS Christian Moser 27-JAN-2005 // Add structures and routine declarations for the PC to // module, routine and offset translations. // // X-2 RAB Richard A. Bishop 23-Aug-2004 // Initial CPU namespace changes // // X-1 CMOS Christian Moser 2-APR-2003 // Initial version. // #ifndef __TFDEF_LOADED #define __TFDEF_LOADED 1 #pragma __nostandard // This file uses non-ANSI-Standard features #pragma __member_alignment __save #pragma __nomember_alignment __quadword #ifdef __INITIAL_POINTER_SIZE // Defined whenever ptr size pragmas supported #pragma __required_pointer_size __save // Save the previously-defined required ptr size #pragma __required_pointer_size __long // And set ptr size default to 64-bit pointers #endif // // Common header files // #include far_pointers #include ints // // Constants // #define TF$TRACE_BUFFER_PAGES 1280 // // Define trace header structure // typedef struct _tf_hdr { uint32 idx; uint32 max_idx; unsigned short int mbo; unsigned char type; unsigned char subtype; uint32 reserved1; unsigned __int64 size; VOID_PQ *entry_ptr; } TF_HDR; typedef struct _tf_hdr * TF_HDR_PQ; typedef struct _image_range { void *left; void *right; int16 reserved; int16 alignment [3]; uint64 start_va; uint64 end_va; uint64 base_va; char name[64]; char devdir[64]; uint64 image_mapped; unsigned char *trace_info; uint64 info_remaining; unsigned char *trace_abbrev; uint64 abbrev_remaining; uint64 abbrev_table; uint64 abbrev_last; unsigned char *trace_aranges; uint64 aranges_remaining; uint64 aranges_table; } IMAGE_RANGE; typedef struct _image_range *IMAGE_RANGE_PQ; typedef struct _image_range **IMAGE_RANGE_PPQ; typedef struct _rtn_range { void *left; void *right; int16 reserved; int16 alignment [3]; uint64 rtn_low_pc; uint64 rtn_high_pc; uint64 mod_low_pc; uint64 mod_high_pc; uint64 base_va; char rtn_name[64]; char mod_name[64]; } RTN_RANGE; typedef struct _rtn_range *RTN_RANGE_PQ; typedef struct _rtn_range **RTN_RANGE_PPQ; #pragma __member_alignment __restore #ifdef __INITIAL_POINTER_SIZE // Defined whenever ptr size pragmas supported #pragma __required_pointer_size __restore // Restore the previously-defined required ptr size #endif #pragma __standard // // Trace facility routine prototype declarations // int tf$load ( char *execlet ); int tf$unload ( char *execlet ); int tf$debug ( char *execlet, uint64 anchor, TF_HDR_PQ tf_hdr ); int tf$get_execlet_info ( char *execlet, uint64 *exec_base, uint64 *exec_end ); int tf$get_module_offset ( uint64 va, char *module, char *offset ); int tf$build_image_tree (); int tf$get_mod_rtn ( uint64 pc, uint64 *mod_name, uint64 *rtn_name, uint64 *mod_rel_pc, uint64 *rtn_rel_pc ); void tf$cvt_timestamp ( int64 timestamp, int cpuid, uint64 *time, uint64 *usec ); int64 tf$calc_delta ( int64 time_end, int cpuid_end, int64 time_beg, int cpuid_beg ); #endif // __TFDEF_LOADED