Question

Friends, I am working on an in-house architectural simulator which is used to simulate the timing-effect of a code running on different architectural parameters like core, memory hierarchy and interconnects.

I am working on a module takes the actual trace of a running program from an emulator like "PinTool" and "qemu-linux-user" and feed this trace to the simulator.

Till now my approach was like this : 1) take objdump of a binary executable and parse this information. 2) Now the emulator has to just feed me an instruction-pointer and other info like load-address/store-address.

Such approaches work only if the program content is known.

But now I have been trying to take traces of an executable running on top of a standard linux-kernel. The problem now is that the base kernel image does not contain the code for LKM(Loadable Kernel Modules). Also the daemons are not known when starting a kernel.

So, my approach to this solution is : 1) use qemu to emulate a machine. 2) When an instruction is encountered for the first time, I will parse it and save this info. for later. 3) create a helper function which sends the ip, load/store address when an instruction is executed.

i am stuck in step2. how do i differentiate between different processes from qemu which is just an emulator and does not know anything about the guest OS ??

I can modify the scheduler of the guest OS but I am really not able to figure out the way forward.

Sorry if the question is very lengthy. I know I could have abstracted some part but felt that some part of it gives an explanation of the context of the problem.

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top