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

Method comparator

src/codeCache.h:89–101  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

87 char* _name;
88
89 static int comparator(const void* c1, const void* c2) {
90 CodeBlob* cb1 = (CodeBlob*)c1;
91 CodeBlob* cb2 = (CodeBlob*)c2;
92 if (cb1->_start < cb2->_start) {
93 return -1;
94 } else if (cb1->_start > cb2->_start) {
95 return 1;
96 } else if (cb1->_end == cb2->_end) {
97 return 0;
98 } else {
99 return cb1->_end > cb2->_end ? -1 : 1;
100 }
101 }
102};
103
104

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected