MCPcopy Create free account
hub / github.com/MJx0/KittyMemoryEx / clear

Method clear

KittyMemoryEx/KittyPerfEvent.cpp:105–125  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

103}
104
105void KittyPerfWatch::clear()
106{
107 for (auto &w : _watches)
108 {
109 if (w.fd >= 0)
110 {
111 ioctl(w.fd, PERF_EVENT_IOC_RESET, 0);
112 ioctl(w.fd, PERF_EVENT_IOC_DISABLE, 0);
113 }
114
115 if (w.mmap && w.mmap != MAP_FAILED && w.mmap_sz)
116 munmap(w.mmap, w.mmap_sz);
117
118 if (w.fd >= 0)
119 close(w.fd);
120
121 w = {};
122 }
123
124 _watches.clear();
125}
126
127void KittyPerfWatch::consumeRecord(const WatchInfo &w, KittyPerfSample *out)
128{

Callers 12

refreshRegionCacheMethod · 0.80
MemoryPatchMethod · 0.80
~MemoryPatchMethod · 0.80
MemoryBackupMethod · 0.80
~MemoryBackupMethod · 0.80
setUseCacheMethod · 0.80
clearCacheMethod · 0.80
setPIDMethod · 0.80
~ProcStatusMethod · 0.80
parseMethod · 0.80
readToStringMethod · 0.80
readToBufferMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected