Gaudi Framework, version v22r2

Home   Generated: Tue May 10 2011

perfmon_dfl_smpl.h

Go to the documentation of this file.
00001 /*
00002  * Copyright (c) 2005-2006 Hewlett-Packard Development Company, L.P.
00003  *               Contributed by Stephane Eranian <eranian@hpl.hp.com>
00004  *
00005  * This file implements the new dfl sampling buffer format
00006  * for perfmon2 subsystem.
00007  *
00008  * This format is supported used by all platforms. For IA-64, older
00009  * applications using perfmon v2.0 MUST use the
00010  * perfmon_default_smpl.h
00011  */
00012 #ifndef __PERFMON_DFL_SMPL_H__
00013 #define __PERFMON_DFL_SMPL_H__ 1
00014 
00015 #ifdef __cplusplus
00016 extern "C" {
00017 #endif
00018 
00019 #include <perfmon/perfmon.h>
00020 
00021 #define PFM_DFL_SMPL_NAME       "default"
00022 
00023 #ifdef PFMLIB_OLD_PFMV2
00024 /*
00025  * UUID for compatibility with perfmon v2.2 (used by Cray)
00026  */
00027 #define PFM_DFL_SMPL_UUID { \
00028        0xd1, 0x39, 0xb2, 0x9e, 0x62, 0xe8, 0x40, 0xe4,\
00029        0xb4, 0x02, 0x73, 0x07, 0x87, 0x92, 0xe9, 0x37 }
00030 #endif
00031 
00032 /*
00033  * format specific parameters (passed at context creation)
00034  */
00035 typedef struct {
00036         uint64_t        buf_size;       /* size of the buffer in bytes */
00037         uint32_t        buf_flags;      /* buffer specific flags */
00038         uint32_t        res1;           /* for future use */
00039         uint64_t        reserved[6];    /* for future use */
00040 } pfm_dfl_smpl_arg_t;
00041 
00042 /*
00043  * This header is at the beginning of the sampling buffer returned to the user.
00044  * It is directly followed by the first record.
00045  */
00046 typedef struct {
00047         uint64_t        hdr_count;              /* how many valid entries */
00048         uint64_t        hdr_cur_offs;           /* current offset from top of buffer */
00049         uint64_t        hdr_overflows;          /* #overflows for buffer */
00050         uint64_t        hdr_buf_size;           /* bytes in the buffer */
00051         uint64_t        hdr_min_buf_space;      /* minimal buffer size (internal use) */
00052         uint32_t        hdr_version;            /* smpl format version */
00053         uint32_t        hdr_buf_flags;          /* copy of buf_flags */
00054         uint64_t        hdr_reserved[10];       /* for future use */
00055 } pfm_dfl_smpl_hdr_t;
00056 
00057 /*
00058  * Entry header in the sampling buffer.  The header is directly followed
00059  * with the values of the PMD registers of interest saved in increasing 
00060  * index order: PMD4, PMD5, and so on. How many PMDs are present depends 
00061  * on how the session was programmed.
00062  *
00063  * In the case where multiple counters overflow at the same time, multiple
00064  * entries are written consecutively.
00065  *
00066  * last_reset_value member indicates the initial value of the overflowed PMD. 
00067  */
00068 typedef struct {
00069         uint32_t        pid;                    /* thread id (for NPTL, this is gettid()) */
00070         uint16_t        ovfl_pmd;               /* index of pmd that overflowed for this sample */
00071         uint16_t        reserved;               /* for future use */
00072         uint64_t        last_reset_val;         /* initial value of overflowed PMD */
00073         uint64_t        ip;                     /* where did the overflow interrupt happened  */
00074         uint64_t        tstamp;                 /* overflow timetamp */
00075         uint16_t        cpu;                    /* cpu on which the overfow occured */
00076         uint16_t        set;                    /* event set active when overflow ocurred   */
00077         uint32_t        tgid;                   /* thread group id (for NPTL, this is getpid()) */
00078 } pfm_dfl_smpl_entry_t;
00079 
00080 #define PFM_DFL_SMPL_VERSION_MAJ        1U
00081 #define PFM_DFL_SMPL_VERSION_MIN        0U
00082 #define PFM_DFL_SMPL_VERSION    (((PFM_DFL_SMPL_VERSION_MAJ&0xffff)<<16)|(PFM_DFL_SMPL_VERSION_MIN & 0xffff))
00083 
00084 #ifdef __cplusplus
00085 };
00086 #endif
00087 
00088 #endif /* __PERFMON_DFL_SMPL_H__ */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines

Generated at Tue May 10 2011 18:53:51 for Gaudi Framework, version v22r2 by Doxygen version 1.7.2 written by Dimitri van Heesch, © 1997-2004