• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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  PeiPerf.h
15 
16 Abstract:
17 
18  PeiPerf.h provides performance primitives for PEI modules
19 
20 
21 --*/
22 
23 #ifndef _PEI_PERF_H_
24 #define _PEI_PERF_H_
25 
26 VOID
27 EFIAPI
28 PeiPerfMeasure (
29   EFI_PEI_SERVICES              **PeiServices,
30   IN UINT16                     *Token,
31   IN EFI_FFS_FILE_HEADER        *FileHeader,
32   IN BOOLEAN                    EntryExit,
33   IN UINT64                     Value
34   )
35 /*++
36 
37 Routine Description:
38 
39   Log a timestamp count.
40 
41 Arguments:
42 
43   PeiServices - Pointer to the PEI Core Services table
44 
45   Token       - Pointer to Token Name
46 
47   FileHeader  - Pointer to the file header
48 
49   EntryExit   - Indicates start or stop measurement
50 
51   Value       - The start time or the stop time
52 
53 Returns:
54 
55 --*/
56 ;
57 
58 #ifdef EFI_PEI_PERFORMANCE
59 #define PEI_PERF_START(Ps, Token, FileHeader, Value)  PeiPerfMeasure (Ps, Token, FileHeader, FALSE, Value)
60 #define PEI_PERF_END(Ps, Token, FileHeader, Value)    PeiPerfMeasure (Ps, Token, FileHeader, TRUE, Value)
61 #else
62 #define PEI_PERF_START(Ps, Token, FileHeader, Value)
63 #define PEI_PERF_END(Ps, Token, FileHeader, Value)
64 #endif
65 
66 #endif
67