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

Method pair

src/trap.cpp:41–46  ·  view source on GitHub ↗

Two allocation traps are always enabled/disabled together. If both traps belong to the same page, protect/unprotect it just once.

Source from the content-addressed store, hash-verified

39// Two allocation traps are always enabled/disabled together.
40// If both traps belong to the same page, protect/unprotect it just once.
41void Trap::pair(Trap& second) {
42 if (_page_start[_id] == _page_start[second._id]) {
43 _protect = false;
44 second._unprotect = false;
45 }
46}
47
48// Patch instruction at the entry point
49bool Trap::patch(instruction_t insn) {

Callers 1

initializeMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected