PAPI  5.0.1.0
linux-bgp-preset-events.c
Go to the documentation of this file.
00001 /*
00002 * File:    linux-bgp-preset-events.c
00003 * Author:  Dave Hermsmeier
00004 *          dlherms@us.ibm.com
00005 *
00006 * Mods:    <your name here>
00007 *          <your email address>
00008 */
00009 #include "papi.h"
00010 #include "papi_internal.h"
00011 #include "papi_vector.h"
00012 
00013 #include "linux-bgp-native-events.h"
00014 
00015 /* PAPI PRESETS */
00016 const hwi_search_t _bgp_preset_map[] = {
00017 
00018   /*************************************************************************/
00019     /*                                                                       */
00020     /* The following PAPI presets are accurate for all application nodes     */
00021     /* using SMP processing for zero or one threads.  The appropriate native */
00022     /* hardware counters mapped to the following PAPI preset counters are    */
00023     /* only collected for processors 0 and 1 for each physical compute card. */
00024     /* The values are correct for other processing mode/thread combinations, */
00025     /* but only for those application nodes running on processor 0 or 1 of   */
00026     /* a given physical compute card.                                        */
00027     /*                                                                       */
00028   /*************************************************************************/
00029 
00030     /*
00031      * Level 1 Data Cache Misses
00032      */
00033     {PAPI_L1_DCM, {DERIVED_ADD,
00034                    {PNE_BGP_PU0_DCACHE_MISS,
00035                     PNE_BGP_PU1_DCACHE_MISS,
00036                     PAPI_NULL},
00037                    {0,}}},
00038 
00039     /*
00040      * Level 1 Instruction Cache Misses
00041      */
00042     {PAPI_L1_ICM, {DERIVED_ADD,
00043                    {PNE_BGP_PU0_ICACHE_MISS,
00044                     PNE_BGP_PU1_ICACHE_MISS,
00045                     PAPI_NULL},
00046                    {0,}}},
00047 
00048     /*
00049      * Level 1 Total Cache Misses
00050      */
00051     {PAPI_L1_TCM, {DERIVED_ADD,
00052                    {PNE_BGP_PU0_DCACHE_MISS,
00053                     PNE_BGP_PU1_DCACHE_MISS,
00054                     PNE_BGP_PU0_ICACHE_MISS,
00055                     PNE_BGP_PU1_ICACHE_MISS,
00056                     PAPI_NULL},
00057                    {0,}}},
00058 
00059     /*
00060      * Snoops
00061      */
00062     {PAPI_CA_SNP, {DERIVED_ADD,
00063                    {PNE_BGP_PU0_L1_INVALIDATION_REQUESTS,
00064                     PNE_BGP_PU1_L1_INVALIDATION_REQUESTS,
00065                     PAPI_NULL},
00066                    {0,}}},
00067 
00068     /*
00069      * Prefetch Data Instruction Caused a Miss
00070      */
00071     {PAPI_PRF_DM, {DERIVED_ADD,
00072                    {PNE_BGP_PU0_ICACHE_MISS,
00073                     PNE_BGP_PU1_ICACHE_MISS,
00074                     PAPI_NULL},
00075                    {0,}}},
00076 
00077     /*
00078      * FMA instructions completed
00079      */
00080     {PAPI_FMA_INS, {DERIVED_ADD,
00081                     {PNE_BGP_PU0_FPU_FMA_2,
00082                      PNE_BGP_PU1_FPU_FMA_2,
00083                      PNE_BGP_PU0_FPU_FMA_4,
00084                      PNE_BGP_PU1_FPU_FMA_4,
00085                      PAPI_NULL},
00086                     {0,}}},
00087 
00088     /*
00089      * Floating point instructions
00090      */
00091     {PAPI_FP_INS, {DERIVED_ADD,
00092                    {PNE_BGP_PU0_FPU_ADD_SUB_1,
00093                     PNE_BGP_PU1_FPU_ADD_SUB_1,
00094                     PNE_BGP_PU0_FPU_MULT_1,
00095                     PNE_BGP_PU1_FPU_MULT_1,
00096                     PNE_BGP_PU0_FPU_FMA_2,
00097                     PNE_BGP_PU1_FPU_FMA_2,
00098                     PNE_BGP_PU0_FPU_DIV_1,
00099                     PNE_BGP_PU1_FPU_DIV_1,
00100                     PNE_BGP_PU0_FPU_OTHER_NON_STORAGE_OPS,
00101                     PNE_BGP_PU1_FPU_OTHER_NON_STORAGE_OPS,
00102                     PNE_BGP_PU0_FPU_ADD_SUB_2,
00103                     PNE_BGP_PU1_FPU_ADD_SUB_2,
00104                     PNE_BGP_PU0_FPU_MULT_2,
00105                     PNE_BGP_PU1_FPU_MULT_2,
00106                     PNE_BGP_PU0_FPU_FMA_4,
00107                     PNE_BGP_PU1_FPU_FMA_4,
00108                     PNE_BGP_PU0_FPU_DUAL_PIPE_OTHER_NON_STORAGE_OPS,
00109                     PNE_BGP_PU1_FPU_DUAL_PIPE_OTHER_NON_STORAGE_OPS,
00110                     PAPI_NULL},
00111                    {0,}}},
00112 
00113 
00114     /*
00115      * Load Instructions Executed
00116      */
00117     {PAPI_LD_INS, {DERIVED_ADD,
00118                    {PNE_BGP_PU0_DATA_LOADS,
00119                     PNE_BGP_PU1_DATA_LOADS,
00120                     PAPI_NULL},
00121                    {0,}}},
00122 
00123     /*
00124      * Store Instructions Executed
00125      */
00126     {PAPI_SR_INS, {DERIVED_ADD,
00127                    {PNE_BGP_PU0_DATA_STORES,
00128                     PNE_BGP_PU1_DATA_STORES,
00129                     PAPI_NULL},
00130                    {0,}}},
00131 
00132     /*
00133      * Total Load/Store Instructions Executed
00134      */
00135     {PAPI_LST_INS, {DERIVED_ADD,
00136                     {PNE_BGP_PU0_DATA_LOADS,
00137                      PNE_BGP_PU1_DATA_LOADS,
00138                      PNE_BGP_PU0_DATA_STORES,
00139                      PNE_BGP_PU1_DATA_STORES,
00140                      PAPI_NULL},
00141                     {0,}}},
00142 
00143     /*
00144      * Level 1 Data Cache Hit
00145      */
00146     {PAPI_L1_DCH, {DERIVED_ADD,
00147                    {PNE_BGP_PU0_DCACHE_HIT,
00148                     PNE_BGP_PU1_DCACHE_HIT,
00149                     PAPI_NULL},
00150                    {0,}}},
00151 
00152     /*
00153      * Level 1 Data Cache Accesses
00154      */
00155     {PAPI_L1_DCA, {DERIVED_ADD,
00156                    {PNE_BGP_PU0_DCACHE_HIT,
00157                     PNE_BGP_PU1_DCACHE_HIT,
00158                     PNE_BGP_PU0_DCACHE_MISS,
00159                     PNE_BGP_PU1_DCACHE_MISS,
00160                     PAPI_NULL},
00161                    {0,}}},
00162 
00163     /*
00164      * Level 1 Data Cache Reads
00165      */
00166     {PAPI_L1_DCR, {DERIVED_ADD,
00167                    {PNE_BGP_PU0_DATA_LOADS,
00168                     PNE_BGP_PU1_DATA_LOADS,
00169                     PAPI_NULL},
00170                    {0,}}},
00171 
00172     /*
00173      * Level 1 Instruction Cache Hits
00174      */
00175     {PAPI_L1_ICH, {DERIVED_ADD,
00176                    {PNE_BGP_PU0_ICACHE_HIT,
00177                     PNE_BGP_PU1_ICACHE_HIT,
00178                     PAPI_NULL},
00179                    {0,}}},
00180 
00181     /*
00182      * Level 1 Instruction Cache Accesses
00183      */
00184     {PAPI_L1_ICA, {DERIVED_ADD,
00185                    {PNE_BGP_PU0_ICACHE_HIT,
00186                     PNE_BGP_PU1_ICACHE_HIT,
00187                     PNE_BGP_PU0_ICACHE_MISS,
00188                     PNE_BGP_PU1_ICACHE_MISS,
00189                     PAPI_NULL},
00190                    {0,}}},
00191 
00192     /*
00193      * Level 1 Instruction Cache Reads
00194      */
00195     {PAPI_L1_ICR, {DERIVED_ADD,
00196                    {PNE_BGP_PU0_ICACHE_HIT,
00197                     PNE_BGP_PU1_ICACHE_HIT,
00198                     PNE_BGP_PU0_ICACHE_MISS,
00199                     PNE_BGP_PU1_ICACHE_MISS,
00200                     PAPI_NULL},
00201                    {0,}}},
00202 
00203     /*
00204      * Level 1 Instruction Cache Writes
00205      */
00206     {PAPI_L1_ICW, {DERIVED_ADD,
00207                    {PNE_BGP_PU0_ICACHE_LINEFILLINPROG,
00208                     PNE_BGP_PU1_ICACHE_LINEFILLINPROG,
00209                     PAPI_NULL},
00210                    {0,}}},
00211 
00212     /*
00213      * Level 1 Total Cache Hits
00214      */
00215     {PAPI_L1_TCH, {DERIVED_ADD,
00216                    {PNE_BGP_PU0_DCACHE_HIT,
00217                     PNE_BGP_PU1_DCACHE_HIT,
00218                     PNE_BGP_PU0_ICACHE_HIT,
00219                     PNE_BGP_PU1_ICACHE_HIT,
00220                     PAPI_NULL},
00221                    {0,}}},
00222 
00223     /*
00224      * Level 1 Total Cache Accesses
00225      */
00226     {PAPI_L1_TCA, {DERIVED_ADD,
00227                    {PNE_BGP_PU0_DCACHE_HIT,
00228                     PNE_BGP_PU1_DCACHE_HIT,
00229                     PNE_BGP_PU0_ICACHE_HIT,
00230                     PNE_BGP_PU1_ICACHE_HIT,
00231                     PNE_BGP_PU0_DCACHE_MISS,
00232                     PNE_BGP_PU1_DCACHE_MISS,
00233                     PNE_BGP_PU0_ICACHE_MISS,
00234                     PNE_BGP_PU1_ICACHE_MISS,
00235                     PNE_BGP_PU0_DCACHE_LINEFILLINPROG,
00236                     PNE_BGP_PU1_DCACHE_LINEFILLINPROG,
00237                     PAPI_NULL},
00238                    {0,}}},
00239 
00240     /*
00241      * Level 1 Total Cache Reads
00242      */
00243     {PAPI_L1_TCR, {DERIVED_ADD,
00244                    {PNE_BGP_PU0_DCACHE_HIT,
00245                     PNE_BGP_PU1_DCACHE_HIT,
00246                     PNE_BGP_PU0_ICACHE_HIT,
00247                     PNE_BGP_PU1_ICACHE_HIT,
00248                     PNE_BGP_PU0_DCACHE_MISS,
00249                     PNE_BGP_PU1_DCACHE_MISS,
00250                     PNE_BGP_PU0_ICACHE_MISS,
00251                     PNE_BGP_PU1_ICACHE_MISS,
00252                     PAPI_NULL},
00253                    {0,}}},
00254 
00255     /*
00256      * Level 1 Total Cache Writes
00257      */
00258     {PAPI_L1_TCW, {DERIVED_ADD,
00259                    {PNE_BGP_PU0_DCACHE_LINEFILLINPROG,
00260                     PNE_BGP_PU1_DCACHE_LINEFILLINPROG,
00261                     PNE_BGP_PU0_ICACHE_LINEFILLINPROG,
00262                     PNE_BGP_PU1_ICACHE_LINEFILLINPROG,
00263                     PAPI_NULL},
00264                    {0,}}},
00265 
00266     /*
00267      * Floating Point Operations
00268      */
00269     {PAPI_FP_OPS, {DERIVED_POSTFIX,
00270                    {PNE_BGP_PU0_FPU_ADD_SUB_1,
00271                     PNE_BGP_PU1_FPU_ADD_SUB_1,
00272                     PNE_BGP_PU0_FPU_MULT_1,
00273                     PNE_BGP_PU1_FPU_MULT_1,
00274                     PNE_BGP_PU0_FPU_FMA_2,
00275                     PNE_BGP_PU1_FPU_FMA_2,
00276                     PNE_BGP_PU0_FPU_DIV_1,
00277                     PNE_BGP_PU1_FPU_DIV_1,
00278                     PNE_BGP_PU0_FPU_OTHER_NON_STORAGE_OPS,
00279                     PNE_BGP_PU1_FPU_OTHER_NON_STORAGE_OPS,
00280                     PNE_BGP_PU0_FPU_ADD_SUB_2,
00281                     PNE_BGP_PU1_FPU_ADD_SUB_2,
00282                     PNE_BGP_PU0_FPU_MULT_2,
00283                     PNE_BGP_PU1_FPU_MULT_2,
00284                     PNE_BGP_PU0_FPU_FMA_4,
00285                     PNE_BGP_PU1_FPU_FMA_4,
00286                     PNE_BGP_PU0_FPU_DUAL_PIPE_OTHER_NON_STORAGE_OPS,
00287                     PNE_BGP_PU1_FPU_DUAL_PIPE_OTHER_NON_STORAGE_OPS,
00288                     PAPI_NULL},
00289                    {"N0|N1|+|N2|+|N3|+|N4|2|*|+|N5|2|*|+|N6|13|*|+|N7|13|*|+|N8|+|N9|+|N10|2|*|+|N11|2|*|+|N12|2|*|+|N13|2|*|+|N14|4|*|+|N15|4|*|+|N16|2|*|+|N17|2|*|+|"}}},
00290 
00291   /***********************************************************************/
00292     /*                                                                     */
00293     /* The following PAPI presets are accurate for any processing mode of  */
00294     /* SMP, DUAL, or VN for all application nodes.  The appropriate native */
00295     /* hardware counters used for the following PAPI preset counters are   */
00296     /* collected for all four processors for each physical compute card.   */
00297     /*                                                                     */
00298   /***********************************************************************/
00299 
00300     /*
00301      * Level 2 Data Cache Misses
00302      */
00303     {PAPI_L2_DCM, {DERIVED_POSTFIX,
00304                    {PNE_BGP_PU0_L2_PREFETCHABLE_REQUESTS,
00305                     PNE_BGP_PU1_L2_PREFETCHABLE_REQUESTS,
00306                     PNE_BGP_PU2_L2_PREFETCHABLE_REQUESTS,
00307                     PNE_BGP_PU3_L2_PREFETCHABLE_REQUESTS,
00308                     PNE_BGP_PU0_L2_PREFETCH_HITS_IN_STREAM,
00309                     PNE_BGP_PU1_L2_PREFETCH_HITS_IN_STREAM,
00310                     PNE_BGP_PU2_L2_PREFETCH_HITS_IN_STREAM,
00311                     PNE_BGP_PU3_L2_PREFETCH_HITS_IN_STREAM,
00312                     PAPI_NULL},
00313                    {"N0|N1|+|N2|+|N3|+|N4|-|N5|-|N6|-|N7|-|"}}},
00314 
00315     /*
00316      * Level 3 Load Misses
00317      */
00318     {PAPI_L3_LDM, {DERIVED_ADD,
00319                    {PNE_BGP_L3_M0_RD0_DIR0_MISS_OR_LOCKDOWN,
00320                     PNE_BGP_L3_M0_RD0_DIR1_MISS_OR_LOCKDOWN,
00321                     PNE_BGP_L3_M1_RD0_DIR0_MISS_OR_LOCKDOWN,
00322                     PNE_BGP_L3_M1_RD0_DIR1_MISS_OR_LOCKDOWN,
00323                     PNE_BGP_L3_M0_RD1_DIR0_MISS_OR_LOCKDOWN,
00324                     PNE_BGP_L3_M0_RD1_DIR1_MISS_OR_LOCKDOWN,
00325                     PNE_BGP_L3_M1_RD1_DIR0_MISS_OR_LOCKDOWN,
00326                     PNE_BGP_L3_M1_RD1_DIR1_MISS_OR_LOCKDOWN,
00327                     PNE_BGP_L3_M0_R2_DIR0_MISS_OR_LOCKDOWN,
00328                     PNE_BGP_L3_M0_R2_DIR1_MISS_OR_LOCKDOWN,
00329                     PNE_BGP_L3_M1_R2_DIR0_MISS_OR_LOCKDOWN,
00330                     PNE_BGP_L3_M1_R2_DIR1_MISS_OR_LOCKDOWN,
00331                     PAPI_NULL},
00332                    {0,}}},
00333 
00334     /*
00335      * Total Cycles
00336      *   NOTE:  This value is for the time the counters are active,
00337      *          and not for the total cycles for the job.
00338      */
00339     {PAPI_TOT_CYC, {NOT_DERIVED,
00340                     {PNE_BGP_MISC_ELAPSED_TIME,
00341                      PAPI_NULL},
00342                     {0,}}},
00343 
00344     /*
00345      * Level 2 Data Cache Hit
00346      */
00347     {PAPI_L2_DCH, {DERIVED_ADD,
00348                    {PNE_BGP_PU0_L2_PREFETCH_HITS_IN_STREAM,
00349                     PNE_BGP_PU1_L2_PREFETCH_HITS_IN_STREAM,
00350                     PNE_BGP_PU2_L2_PREFETCH_HITS_IN_STREAM,
00351                     PNE_BGP_PU3_L2_PREFETCH_HITS_IN_STREAM,
00352                     PAPI_NULL},
00353                    {0,}}},
00354 
00355     /*
00356      * Level 2 Data Cache Access
00357      */
00358     {PAPI_L2_DCA, {DERIVED_ADD,
00359                    {PNE_BGP_PU0_L2_PREFETCHABLE_REQUESTS,
00360                     PNE_BGP_PU1_L2_PREFETCHABLE_REQUESTS,
00361                     PNE_BGP_PU2_L2_PREFETCHABLE_REQUESTS,
00362                     PNE_BGP_PU3_L2_PREFETCHABLE_REQUESTS,
00363                     PNE_BGP_PU0_L2_MEMORY_WRITES,
00364                     PNE_BGP_PU1_L2_MEMORY_WRITES,
00365                     PNE_BGP_PU2_L2_MEMORY_WRITES,
00366                     PNE_BGP_PU3_L2_MEMORY_WRITES,
00367                     PAPI_NULL},
00368                    {0,}}},
00369 
00370     /*
00371      * Level 2 Data Cache Read
00372      */
00373     {PAPI_L2_DCR, {DERIVED_ADD,
00374                    {PNE_BGP_PU0_L2_PREFETCHABLE_REQUESTS,
00375                     PNE_BGP_PU1_L2_PREFETCHABLE_REQUESTS,
00376                     PNE_BGP_PU2_L2_PREFETCHABLE_REQUESTS,
00377                     PNE_BGP_PU3_L2_PREFETCHABLE_REQUESTS,
00378                     PAPI_NULL},
00379                    {0,}}},
00380 
00381     /*
00382      * Level 2 Data Cache Write
00383      */
00384     {PAPI_L2_DCW, {DERIVED_ADD,
00385                    {PNE_BGP_PU0_L2_MEMORY_WRITES,
00386                     PNE_BGP_PU1_L2_MEMORY_WRITES,
00387                     PNE_BGP_PU2_L2_MEMORY_WRITES,
00388                     PNE_BGP_PU3_L2_MEMORY_WRITES,
00389                     PAPI_NULL},
00390                    {0,}}},
00391 
00392     /*
00393      * Level 3 Total Cache Accesses
00394      */
00395     {PAPI_L3_TCA, {DERIVED_ADD,
00396                    {PNE_BGP_L3_M0_RD0_SINGLE_LINE_DELIVERED_L2,
00397                     PNE_BGP_L3_M0_RD1_SINGLE_LINE_DELIVERED_L2,
00398                     PNE_BGP_L3_M0_R2_SINGLE_LINE_DELIVERED_L2,
00399                     PNE_BGP_L3_M1_RD0_SINGLE_LINE_DELIVERED_L2,
00400                     PNE_BGP_L3_M1_RD1_SINGLE_LINE_DELIVERED_L2,
00401                     PNE_BGP_L3_M1_R2_SINGLE_LINE_DELIVERED_L2,
00402                     PNE_BGP_L3_M0_RD0_BURST_DELIVERED_L2,
00403                     PNE_BGP_L3_M0_RD1_BURST_DELIVERED_L2,
00404                     PNE_BGP_L3_M0_R2_BURST_DELIVERED_L2,
00405                     PNE_BGP_L3_M1_RD0_BURST_DELIVERED_L2,
00406                     PNE_BGP_L3_M1_RD1_BURST_DELIVERED_L2,
00407                     PNE_BGP_L3_M1_R2_BURST_DELIVERED_L2,
00408                     BGP_L3_M0_W0_DEPOSIT_REQUESTS,
00409                     BGP_L3_M0_W1_DEPOSIT_REQUESTS,
00410                     BGP_L3_M1_W0_DEPOSIT_REQUESTS,
00411                     BGP_L3_M1_W1_DEPOSIT_REQUESTS,
00412                     PAPI_NULL},
00413                    {0,}}},
00414 
00415     /*
00416      * Level 3 Total Cache Reads
00417      */
00418     {PAPI_L3_TCR, {DERIVED_ADD,
00419                    {PNE_BGP_L3_M0_RD0_SINGLE_LINE_DELIVERED_L2,
00420                     PNE_BGP_L3_M0_RD1_SINGLE_LINE_DELIVERED_L2,
00421                     PNE_BGP_L3_M0_R2_SINGLE_LINE_DELIVERED_L2,
00422                     PNE_BGP_L3_M1_RD0_SINGLE_LINE_DELIVERED_L2,
00423                     PNE_BGP_L3_M1_RD1_SINGLE_LINE_DELIVERED_L2,
00424                     PNE_BGP_L3_M1_R2_SINGLE_LINE_DELIVERED_L2,
00425                     PNE_BGP_L3_M0_RD0_BURST_DELIVERED_L2,
00426                     PNE_BGP_L3_M0_RD1_BURST_DELIVERED_L2,
00427                     PNE_BGP_L3_M0_R2_BURST_DELIVERED_L2,
00428                     PNE_BGP_L3_M1_RD0_BURST_DELIVERED_L2,
00429                     PNE_BGP_L3_M1_RD1_BURST_DELIVERED_L2,
00430                     PNE_BGP_L3_M1_R2_BURST_DELIVERED_L2,
00431                     PAPI_NULL},
00432                    {0,}}},
00433 
00434     /*
00435      * Level 3 Total Cache Writes
00436      */
00437     {PAPI_L3_TCW, {DERIVED_ADD,
00438                    {PNE_BGP_L3_M0_W0_DEPOSIT_REQUESTS,
00439                     PNE_BGP_L3_M0_W1_DEPOSIT_REQUESTS,
00440                     PNE_BGP_L3_M1_W0_DEPOSIT_REQUESTS,
00441                     PNE_BGP_L3_M1_W1_DEPOSIT_REQUESTS,
00442                     PAPI_NULL},
00443                    {0,}}},
00444 
00445 #if 0
00446     /*
00447      * Torus 32B Chunks Sent
00448      */
00449     {PAPI_BGP_TS_32B, {DERIVED_ADD,
00450                        {PNE_BGP_TORUS_XP_32BCHUNKS,
00451                         PNE_BGP_TORUS_XM_32BCHUNKS,
00452                         PNE_BGP_TORUS_YP_32BCHUNKS,
00453                         PNE_BGP_TORUS_YM_32BCHUNKS,
00454                         PNE_BGP_TORUS_ZP_32BCHUNKS,
00455                         PNE_BGP_TORUS_ZM_32BCHUNKS,
00456                         PAPI_NULL},
00457                        {0,}}},
00458 
00459     /*
00460      * Torus Packets Sent
00461      */
00462     {PAPI_BGP_TS_DPKT, {DERIVED_ADD,
00463                         {PNE_BGP_TORUS_XP_PACKETS,
00464                          PNE_BGP_TORUS_XM_PACKETS,
00465                          PNE_BGP_TORUS_YP_PACKETS,
00466                          PNE_BGP_TORUS_YM_PACKETS,
00467                          PNE_BGP_TORUS_ZP_PACKETS,
00468                          PNE_BGP_TORUS_ZM_PACKETS,
00469                          PAPI_NULL},
00470                         {0,}}},
00471 #endif
00472 
00473     /* PAPI Null */
00474     {0, {0, {PAPI_NULL, PAPI_NULL}, {0,}}}
00475 };
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines