ifdef out rdtsc in hotprofiler
I'm punting on this for now. I'm afraid of violating assumptions about how the clock behind this interface works (and we do very specific stuff like calculating CPU clock speed), so I don't want to try to replace it. We'll revisit when we need to do serious profiling on ARM; we'll definitely notice that this functionality is missing when we try to use it.
Esse commit está contido em:
@@ -144,11 +144,18 @@ static void hp_trunc_time(struct timeval *tv, uint64_t intr) {
|
||||
* @author cjiang
|
||||
*/
|
||||
inline uint64_t tsc() {
|
||||
#ifdef __x86_64__
|
||||
uint32_t __a,__d;
|
||||
uint64_t val;
|
||||
asm volatile("rdtsc" : "=a" (__a), "=d" (__d));
|
||||
(val) = ((uint64_t)__a) | (((uint64_t)__d)<<32);
|
||||
return val;
|
||||
#else
|
||||
// TODO(2200461): rdtsc isn't portable. Ideally we'd use some higher-level
|
||||
// portable API (clock_gettime maybe?), but that may break assumptions that
|
||||
// clients of this API make about how the underlying clock works.
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Referência em uma Nova Issue
Bloquear um usuário