Attach C++ operator new/delete probes. These are mangled C++ symbols that wrap the underlying allocator. C++ operators have identical signatures to malloc/free, so we reuse those handlers.
(&mut self, lib_path: &Path)
| 368 | /// These are mangled C++ symbols that wrap the underlying allocator. |
| 369 | /// C++ operators have identical signatures to malloc/free, so we reuse those handlers. |
| 370 | fn attach_libcpp_probes(&mut self, lib_path: &Path) -> Result<()> { |
| 371 | self.try_attach_malloc(lib_path, "_Znwm"); // operator new(size_t) |
| 372 | self.try_attach_malloc(lib_path, "_Znam"); // operator new[](size_t) |
| 373 | self.try_attach_malloc(lib_path, "_ZnwmSt11align_val_t"); // operator new(size_t, std::align_val_t) |
| 374 | self.try_attach_malloc(lib_path, "_ZnamSt11align_val_t"); // operator new[](size_t, std::align_val_t) |
| 375 | self.try_attach_free(lib_path, "_ZdlPv"); // operator delete(void*) |
| 376 | self.try_attach_free(lib_path, "_ZdaPv"); // operator delete[](void*) |
| 377 | self.try_attach_free(lib_path, "_ZdlPvm"); // operator delete(void*, size_t) - C++14 sized delete |
| 378 | self.try_attach_free(lib_path, "_ZdaPvm"); // operator delete[](void*, size_t) - C++14 sized delete |
| 379 | self.try_attach_free(lib_path, "_ZdlPvSt11align_val_t"); // operator delete(void*, std::align_val_t) |
| 380 | self.try_attach_free(lib_path, "_ZdaPvSt11align_val_t"); // operator delete[](void*, std::align_val_t) |
| 381 | self.try_attach_free(lib_path, "_ZdlPvmSt11align_val_t"); // operator delete(void*, size_t, std::align_val_t) |
| 382 | self.try_attach_free(lib_path, "_ZdaPvmSt11align_val_t"); // operator delete[](void*, size_t, std::align_val_t) |
| 383 | |
| 384 | Ok(()) |
| 385 | } |
| 386 | |
| 387 | /// Attach jemalloc-specific probes (prefixed and extended API). |
| 388 | fn attach_jemalloc_probes(&mut self, lib_path: &Path) -> Result<()> { |
no outgoing calls
no test coverage detected