dotnet / jitutils

MIT License
146 stars 59 forks source link

Add jit instruction count pintool #354

Closed jakobbotsch closed 2 years ago

jakobbotsch commented 2 years ago

cc @dotnet/jit-contrib

jakobbotsch commented 2 years ago

I wonder if on 32 bit targets it would be possible/faster to use doubles for the counting?

Hmm, interesting idea. Let me see if I can try that out quickly. Not sure how well PIN handles floating point math (the hot function calls here end up inlined by PIN).

jakobbotsch commented 2 years ago

I wonder if on 32 bit targets it would be possible/faster to use doubles for the counting?

Unfortunately PIN only allows claiming virtual integer registers, so this would require storing it per-thread in memory somewhere, but when I have tested that it is significantly slower than the virtual register support they have.