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

Method add

src/codeCache.cpp:78–98  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

76}
77
78void CodeCache::add(const void* start, int length, const char* name, bool update_bounds) {
79 char* name_copy = NativeFunc::create(name, _lib_index);
80 // Replace non-printable characters
81 for (char* s = name_copy; *s != 0; s++) {
82 if (*s < ' ') *s = '?';
83 }
84
85 if (_count >= _capacity) {
86 expand();
87 }
88
89 const void* end = (const char*)start + length;
90 _blobs[_count]._start = start;
91 _blobs[_count]._end = end;
92 _blobs[_count]._name = name_copy;
93 _count++;
94
95 if (update_bounds) {
96 updateBounds(start, end);
97 }
98}
99
100void CodeCache::updateBounds(const void* start, const void* end) {
101 if (start < _min_address) _min_address = start;

Callers 15

mainMethod · 0.45
allocateMethod · 0.45
allModeEventOverrideMethod · 0.45
jfrSyncSmokeMethod · 0.45
runAllLockTypesOnceMethod · 0.45
checkThreadNamesMethod · 0.45
fibUpToLongMaxMethod · 0.45
mainMethod · 0.45
mainMethod · 0.45
mainMethod · 0.45

Calls

no outgoing calls

Tested by 15

mainMethod · 0.36
allocateMethod · 0.36
allModeEventOverrideMethod · 0.36
jfrSyncSmokeMethod · 0.36
runAllLockTypesOnceMethod · 0.36
checkThreadNamesMethod · 0.36
fibUpToLongMaxMethod · 0.36
mainMethod · 0.36
mainMethod · 0.36
mainMethod · 0.36