* [Qemu-devel] Is it possible to retrieve pre-process information in QEMU? @ 2012-05-17 3:09 陳韋任 2012-05-20 14:06 ` Mulyadi Santosa 0 siblings, 1 reply; 3+ messages in thread From: 陳韋任 @ 2012-05-17 3:09 UTC (permalink / raw) To: qemu-devel Hi all, I would like to know if I can retrieve pre-process information in QEMU system mode. For example, I want to know each process's page fault ratio. Is there a way to do that? Thanks. 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 ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] Is it possible to retrieve pre-process information in QEMU? 2012-05-17 3:09 [Qemu-devel] Is it possible to retrieve pre-process information in QEMU? 陳韋任 @ 2012-05-20 14:06 ` Mulyadi Santosa 2012-05-22 2:38 ` 陳韋任 0 siblings, 1 reply; 3+ messages in thread From: Mulyadi Santosa @ 2012-05-20 14:06 UTC (permalink / raw) To: 陳韋任; +Cc: qemu-devel Hi... On Thu, May 17, 2012 at 10:09 AM, 陳韋任 <chenwj@iis.sinica.edu.tw> wrote: > Hi all, > > I would like to know if I can retrieve pre-process information in QEMU > system mode. For example, I want to know each process's page fault ratio. > Is there a way to do that? logically, it's possible, but you need to locate the task_struct of each processes first. Using GDB, that might be a bit easier but still not easy. Why not just monitor it inside the guest? using system tap for example? -- regards, Mulyadi Santosa Freelance Linux trainer and consultant blog: the-hydra.blogspot.com training: mulyaditraining.blogspot.com ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] Is it possible to retrieve pre-process information in QEMU? 2012-05-20 14:06 ` Mulyadi Santosa @ 2012-05-22 2:38 ` 陳韋任 0 siblings, 0 replies; 3+ messages in thread From: 陳韋任 @ 2012-05-22 2:38 UTC (permalink / raw) To: Mulyadi Santosa; +Cc: qemu-devel, 陳韋任 > > I would like to know if I can retrieve pre-process information in QEMU > > system mode. For example, I want to know each process's page fault ratio. > > Is there a way to do that? > > logically, it's possible, but you need to locate the task_struct of > each processes first. Using GDB, that might be a bit easier but still > not easy. > > Why not just monitor it inside the guest? using system tap for example? O.K., what I did is something like below, --- void tlb_fill(CPUARMState *env1, target_ulong addr, int is_write, int mmu_idx, uintptr_t retaddr) { ret = cpu_arm_handle_mmu_fault(env, addr, is_write, mmu_idx); if (unlikely(ret)) { page_fault++; // page fault } env = saved_env; } --- IIUC, cpu_arm_handle_mmu_fault will lookup guest page table, return 1 if there is a page fault, that's why I add a counter there. But this way I'll collect a global static not per-process one. I'll try systemtap latter but not sure it does the same thing I want to do. Any thoughts? :) 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 ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-05-22 2:38 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2012-05-17 3:09 [Qemu-devel] Is it possible to retrieve pre-process information in QEMU? 陳韋任 2012-05-20 14:06 ` Mulyadi Santosa 2012-05-22 2:38 ` 陳韋任
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).