OLD | NEW |
1 /* Copyright (c) 2005, Google Inc. | 1 /* Copyright (c) 2005, Google Inc. |
2 * All rights reserved. | 2 * All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 * to the object being visited. | 102 * to the object being visited. |
103 */ | 103 */ |
104 typedef void (*AddressVisitor)(void* data, const void* ptr); | 104 typedef void (*AddressVisitor)(void* data, const void* ptr); |
105 | 105 |
106 /* Iterate over all live allocated objects. For each allocation the | 106 /* Iterate over all live allocated objects. For each allocation the |
107 * callback will be invoked with the data argument and allocation pointer. | 107 * callback will be invoked with the data argument and allocation pointer. |
108 */ | 108 */ |
109 PERFTOOLS_DLL_DECL void IterateAllocatedObjects(AddressVisitor callback, | 109 PERFTOOLS_DLL_DECL void IterateAllocatedObjects(AddressVisitor callback, |
110 void* data); | 110 void* data); |
111 | 111 |
| 112 /* Sets a callback function to return a pseudo-stack for application-generated |
| 113 * stacks during heap profiling. The caller must provide a buffer in |stack| |
| 114 * of at least size 32 * sizeof(void*). Returns the number of items copied or |
| 115 * zero. |
| 116 */ |
| 117 typedef int (*PseudoStackGenerator)(void** stack); |
| 118 PERFTOOLS_DLL_DECL void SetPseudoStackGenerator(PseudoStackGenerator callback); |
| 119 |
112 #ifdef __cplusplus | 120 #ifdef __cplusplus |
113 } // extern "C" | 121 } // extern "C" |
114 #endif | 122 #endif |
115 | 123 |
116 #endif /* BASE_HEAP_PROFILER_H_ */ | 124 #endif /* BASE_HEAP_PROFILER_H_ */ |
OLD | NEW |