Home | History | Annotate | Download | only in Include
      1 /*++
      2 
      3 Copyright (c) 2004, Intel Corporation. All rights reserved.<BR>
      4 This program and the accompanying materials
      5 are licensed and made available under the terms and conditions of the BSD License
      6 which accompanies this distribution.  The full text of the license may be found at
      7 http://opensource.org/licenses/bsd-license.php
      8 
      9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
     10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
     11 
     12 Module Name:
     13 
     14  EfiPerf.h
     15 
     16 Abstract:
     17  EfiPerf.h provides performance primitive for the DXE and Shell phase
     18 
     19 
     20 --*/
     21 
     22 #ifndef _EFI_PERF_H_
     23 #define _EFI_PERF_H_
     24 
     25 #include EFI_PROTOCOL_DEFINITION (Performance)
     26 
     27 EFI_STATUS
     28 EFIAPI
     29 InitializePerformanceInfrastructure (
     30   IN EFI_HANDLE         ImageHandle,
     31   IN EFI_SYSTEM_TABLE   *SystemTable,
     32   IN UINT64             Ticker
     33   )
     34 /*++
     35 
     36 Routine Description:
     37 
     38   TODO: Add function description
     39 
     40 Arguments:
     41 
     42   ImageHandle - TODO: add argument description
     43   SystemTable - TODO: add argument description
     44   Ticker      - TODO: add argument description
     45 
     46 Returns:
     47 
     48   TODO: add return values
     49 
     50 --*/
     51 ;
     52 
     53 EFI_STATUS
     54 EFIAPI
     55 EndMeasure (
     56   IN EFI_HANDLE       Handle,
     57   IN UINT16           *Token,
     58   IN UINT16           *Host,
     59   IN UINT64           Ticker
     60   )
     61 /*++
     62 
     63 Routine Description:
     64 
     65   TODO: Add function description
     66 
     67 Arguments:
     68 
     69   Handle  - TODO: add argument description
     70   Token   - TODO: add argument description
     71   Host    - TODO: add argument description
     72   Ticker  - TODO: add argument description
     73 
     74 Returns:
     75 
     76   TODO: add return values
     77 
     78 --*/
     79 ;
     80 
     81 EFI_STATUS
     82 EFIAPI
     83 StartMeasure (
     84   IN EFI_HANDLE       Handle,
     85   IN UINT16           *Token,
     86   IN UINT16           *Host,
     87   IN UINT64           Ticker
     88   )
     89 /*++
     90 
     91 Routine Description:
     92 
     93   TODO: Add function description
     94 
     95 Arguments:
     96 
     97   Handle  - TODO: add argument description
     98   Token   - TODO: add argument description
     99   Host    - TODO: add argument description
    100   Ticker  - TODO: add argument description
    101 
    102 Returns:
    103 
    104   TODO: add return values
    105 
    106 --*/
    107 ;
    108 
    109 EFI_STATUS
    110 EFIAPI
    111 UpdateMeasure (
    112   IN EFI_HANDLE      Handle,
    113   IN UINT16          *Token,
    114   IN UINT16          *Host,
    115   IN EFI_HANDLE      HandleNew,
    116   IN UINT16          *TokenNew,
    117   IN UINT16          *HostNew
    118   )
    119 /*++
    120 
    121 Routine Description:
    122 
    123   TODO: Add function description
    124 
    125 Arguments:
    126 
    127   Handle    - TODO: add argument description
    128   Token     - TODO: add argument description
    129   Host      - TODO: add argument description
    130   HandleNew - TODO: add argument description
    131   TokenNew  - TODO: add argument description
    132   HostNew   - TODO: add argument description
    133 
    134 Returns:
    135 
    136   TODO: add return values
    137 
    138 --*/
    139 ;
    140 
    141 #ifdef EFI_DXE_PERFORMANCE
    142 #define PERF_ENABLE(handle, table, ticker)      InitializePerformanceInfrastructure (handle, table, ticker)
    143 #define PERF_START(handle, token, host, ticker) StartMeasure (handle, token, host, ticker)
    144 #define PERF_END(handle, token, host, ticker)   EndMeasure (handle, token, host, ticker)
    145 #define PERF_UPDATE(handle, token, host, handlenew, tokennew, hostnew) \
    146   UpdateMeasure (handle, \
    147                  token, \
    148                  host, \
    149                  handlenew, \
    150                  tokennew, \
    151                  hostnew \
    152       )
    153 #define PERF_CODE(code) code
    154 #else
    155 #define PERF_ENABLE(handle, table, ticker)
    156 #define PERF_START(handle, token, host, ticker)
    157 #define PERF_END(handle, token, host, ticker)
    158 #define PERF_UPDATE(handle, token, host, handlenew, tokennew, hostnew)
    159 #define PERF_CODE(code)
    160 #endif
    161 
    162 #endif
    163