> I'm trying to edit the qemu source code so I can use qemu as a profiler for a > benchmark of ARM programs. A good start would be counting loads, stores, int > ops, float ops and branch instructions used by each of the binary files. I > have > two (related) questions: > > 1. Where in the qemu implementation would be best to count instructions? My > first thought is to count TCG instructions before they are sent for > translation > into host code, although it could maybe be done before translation from ARM to > TCG instructions as well.
Doesn't "-d" option help you? > 2. What's the corresponding folder/file(s) in the source code where I can add > code for profiling? target-arm/* would be the place since you're running ARM binary, tcg/ARCH/* could be another place depends on what machine you're running QEMU on. Regards, chenwj -- Wei-Ren Chen (陳韋任) Computer Systems Lab, Institute of Information Science, Academia Sinica, Taiwan (R.O.C.) Tel:886-2-2788-3799 #1667 Homepage: http://people.cs.nctu.edu.tw/~chenwj