| 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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 * to the object being visited. | 111 * to the object being visited. |
| 112 */ | 112 */ |
| 113 typedef void (*AddressVisitor)(void* data, const void* ptr); | 113 typedef void (*AddressVisitor)(void* data, const void* ptr); |
| 114 | 114 |
| 115 /* Iterate over all live allocated objects. For each allocation the | 115 /* Iterate over all live allocated objects. For each allocation the |
| 116 * callback will be invoked with the data argument and allocation pointer. | 116 * callback will be invoked with the data argument and allocation pointer. |
| 117 */ | 117 */ |
| 118 PERFTOOLS_DLL_DECL void IterateAllocatedObjects(AddressVisitor callback, | 118 PERFTOOLS_DLL_DECL void IterateAllocatedObjects(AddressVisitor callback, |
| 119 void* data); | 119 void* data); |
| 120 | 120 |
| 121 #if defined(OS_ANDROID) |
| 122 // They should be called BEFORE starting heap profiler by HeapProfilerStart. |
| 123 // |
| 124 // These functions are introduced to use heap profiler in Chrome for Android |
| 125 // instead of setting environment variables. Android applications don't have |
| 126 // a good way to use environment variables. |
| 127 |
| 128 // Note that int is used instead of int64 because base/basictypes.h should not |
| 129 // be included under gperftools/. |
| 130 |
| 131 PERFTOOLS_DLL_DECL void HeapProfilerSetTimeInterval(int time_interval); |
| 132 PERFTOOLS_DLL_DECL void HeapProfilerSetMmapProfile(bool mmap_profile); |
| 133 PERFTOOLS_DLL_DECL void HeapProfilerSetDeepHeapProfile(bool deep_heap_profile); |
| 134 #endif // defined(OS_ANDROID) |
| 135 |
| 121 #ifdef __cplusplus | 136 #ifdef __cplusplus |
| 122 } // extern "C" | 137 } // extern "C" |
| 123 #endif | 138 #endif |
| 124 | 139 |
| 125 #endif /* BASE_HEAP_PROFILER_H_ */ | 140 #endif /* BASE_HEAP_PROFILER_H_ */ |
| OLD | NEW |