]>
Commit | Line | Data |
---|---|---|
76570576 SZ |
1 | /** @file\r |
2 | Provides services to record memory profile of multilevel caller.\r | |
3 | \r | |
4 | Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>\r | |
5 | This program and the accompanying materials \r | |
6 | are licensed and made available under the terms and conditions of the BSD License \r | |
7 | which accompanies this distribution. The full text of the license may be found at \r | |
8 | http://opensource.org/licenses/bsd-license.php. \r | |
9 | \r | |
10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r | |
11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r | |
12 | \r | |
13 | **/\r | |
14 | \r | |
15 | #ifndef _MEMORY_PROFILE_LIB_H_\r | |
16 | #define _MEMORY_PROFILE_LIB_H_\r | |
17 | \r | |
18 | #include <Guid/MemoryProfile.h>\r | |
19 | \r | |
20 | /**\r | |
21 | Record memory profile of multilevel caller.\r | |
22 | \r | |
23 | @param[in] CallerAddress Address of caller.\r | |
24 | @param[in] Action Memory profile action.\r | |
25 | @param[in] MemoryType Memory type.\r | |
26 | EfiMaxMemoryType means the MemoryType is unknown.\r | |
27 | @param[in] Buffer Buffer address.\r | |
28 | @param[in] Size Buffer size.\r | |
29 | @param[in] ActionString String for memory profile action.\r | |
30 | Only needed for user defined allocate action.\r | |
31 | \r | |
32 | @return EFI_SUCCESS Memory profile is updated.\r | |
33 | @return EFI_UNSUPPORTED Memory profile is unsupported,\r | |
34 | or memory profile for the image is not required,\r | |
35 | or memory profile for the memory type is not required.\r | |
36 | @return EFI_ACCESS_DENIED It is during memory profile data getting.\r | |
37 | @return EFI_ABORTED Memory profile recording is not enabled.\r | |
38 | @return EFI_OUT_OF_RESOURCES No enough resource to update memory profile for allocate action.\r | |
39 | @return EFI_NOT_FOUND No matched allocate info found for free action.\r | |
40 | \r | |
41 | **/\r | |
42 | EFI_STATUS\r | |
43 | EFIAPI\r | |
44 | MemoryProfileLibRecord (\r | |
45 | IN PHYSICAL_ADDRESS CallerAddress,\r | |
46 | IN MEMORY_PROFILE_ACTION Action,\r | |
47 | IN EFI_MEMORY_TYPE MemoryType,\r | |
48 | IN VOID *Buffer,\r | |
49 | IN UINTN Size,\r | |
50 | IN CHAR8 *ActionString OPTIONAL\r | |
51 | );\r | |
52 | \r | |
53 | #endif\r |