MCPcopy Create free account
hub / github.com/async-profiler/async-profiler / patchImport

Method patchImport

src/codeCache.cpp:251–262  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

249}
250
251void CodeCache::patchImport(ImportId id, void* hook_func) {
252 if (!_imports_patchable && !makeImportsPatchable()) {
253 return;
254 }
255
256 for (int ty = 0; ty < NUM_IMPORT_TYPES; ty++) {
257 void** entry = _imports[id][ty];
258 if (entry != NULL) {
259 *entry = hook_func;
260 }
261 }
262}
263
264bool CodeCache::makeImportsPatchable() {
265 void** min_import = (void**)-1;

Callers 5

detectNestedMallocFunction · 0.80
patchLibrariesMethod · 0.80
applyPatchFunction · 0.80
patchLibrariesMethod · 0.80
patchLibrariesMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected