Prev: [PATCH] perf: x86: fix callgraphs of 32-bit processes on 64-bit kernels V2.
Next: [PATCH 2/3] SCSI: lpfc, fix lock imbalances
From: Soeren Sandmann on 23 Mar 2010 10:10 Andi Kleen <andi(a)firstfloor.org> writes: > Soeren Sandmann <sandmann(a)daimi.au.dk> writes: > > > > To fix that problem, it seems like we need some way to have python > > export what is going on. Maybe the same mechanism could be used to > > both access what is going on in qemu and python. > > oprofile already has an interface to let JITs export > information about the JITed code. C Python is not a JIT, > but presumably one of the python JITs could do it. > > http://oprofile.sourceforge.net/doc/devel/index.html It's not that I personally want to profile a particular python program. I'm interested in the more general problem of extracting more information from profiled user space programs than just stack traces. Examples: - What is going on inside QEMU? - Which client is the X server servicing? - What parts of a python/shell/scheme/javascript program is taking the most CPU time? I don't think the oprofile JIT interface solves any of these problems. (In fact, I don't see why the JIT problem is even hard. The JIT compiler can just generate a little ELF file with symbols in it, and the profiler can pick it up through the mmap events that you get through the perf interface). > I know it's not envogue anymore and you won't be a approved > cool kid if you do, but you could just use oprofile? I am bringing this up because I want to extend sysprof to be more useful. Soren -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: Andi Kleen on 23 Mar 2010 10:30 Soeren Sandmann <sandmann(a)daimi.au.dk> writes: > > Examples: > > - What is going on inside QEMU? That's something the JIT interface could answer. > - Which client is the X server servicing? > > - What parts of a python/shell/scheme/javascript program is > taking the most CPU time? I suspect for those you rather need event based tracers of some sort, similar to kernel trace points. Otherwise you would need own separate stacks and other complications. systemtap has some effort to use the dtrace instrumentation that crops up in more and more user programs for this. It wouldn't surprise me if that was already in python and other programs you're interested in. I presume right now it only works if you apply the utrace monstrosity though, but perhaps the new uprobes patches floating around will come to rescue. There also was some effort to have a pure user space daemon based approach for LTT, but I believe that currently needs own trace points. Again I fully expect someone to reinvent the wheel here and afterwards complain about "community inefficiences" :-) > I don't think the oprofile JIT interface solves any of these > problems. (In fact, I don't see why the JIT problem is even hard. The > JIT compiler can just generate a little ELF file with symbols in it, > and the profiler can pick it up through the mmap events that you get > through the perf interface). That would require keeping those temporary ELF files for potentially unlimited time around (profilers today look at the ELF files at the final analysis phase, which might be weeks away) Also that would be a lot of overhead for the JIT and most likely be a larger scale rewrite for a given JIT code base. -Andi -- ak(a)linux.intel.com -- Speaking for myself only. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: Frank Ch. Eigler on 23 Mar 2010 10:50
Soeren Sandmann <sandmann(a)daimi.au.dk> writes: > [...] > - What is going on inside QEMU? > - Which client is the X server servicing? > - What parts of a python/shell/scheme/javascript program is > taking the most CPU time? > [...] These kinds of questions usually require navigation through internal data of the user-space process ("Where in this linked list is this pointer?"), and often also correlating them with history ("which socket/fd was most recently serviced?"). Systemtap excels at letting one express such things. - FChE -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ |