MCPcopy Create free account
hub / github.com/PlatformLab/NanoLog / serialize

Function serialize

runtime/Util.h:137–143  ·  view source on GitHub ↗

* This function is used to seralize machine instructions so that no * instructions that appear after it in the current thread can run before any * instructions that appear before it. * * It is useful for putting around rdpmc instructions (to pinpoint cache * misses) as well as before rdtsc instructions, to prevent time pollution from * instructions supposed to be executing before the timer s

Source from the content-addressed store, hash-verified

135 * instructions supposed to be executing before the timer starts.
136 */
137static FORCE_INLINE
138void serialize() {
139 uint32_t eax, ebx, ecx, edx;
140 __asm volatile("cpuid"
141 : "=a" (eax), "=b" (ebx), "=c" (ecx), "=d" (edx)
142 : "a" (1U));
143}
144
145
146/**

Callers 1

serialReadPmcFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected