Pregunta

Is there any way to profile the total number of arithmetic operations used in a certain C/C++ program? By arithmetic operations I mean any operation that uses the integer/floating/special arithmetic unit in hardware.

¿Fue útil?

Solución

If it is on intel X86-64 architecture, I would suggest to use pin tools: PIN for Ubuntu. There has been a plug-in built, namely, MICA on top of it which can instrument independently. One of the 99 outputs is exactly "Floating-point". Look into "Arithmetic-control flows" and "SSE/MMX" as well since based on the compiler different registers are being used. This makes sure you are monitoring all floating points.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top