Finding hardware metrics from C code