From: Jens W. <jen...@de...> - 2007-07-17 16:39:27
|
Hello, This is the second RFC patch for oprofile JIT support. It is still against 0.9.2. The overall design is described in my first post RFC post: http://www.nabble.com/-PATCH-0-6--RFC--Oprofile-JIT-code-support-t3728729.html As announced in my previous "status" mail I stepped on two issues: "Method Unload": As it turns out, the Sun JVM, as well as the IBM JVM do method unloading and reuse memory areas (on x86). In this patch set I added some code to opjitconv which detects the overlaps and produces an artifical symbol that has all symbol names concatinated by + that are within this address range. I also added support of the method unload JVMTI event and added timestamps to the data that libopagent writes. There is no support in opjitconv for this right now. The idea is to add code to opjitconv that it only selects symbols that are "life" during the sample session. "Adjacent VMA regions": The idea of creating an ELF for each VMA region has a problem. Adjacent VMA regions with code may exist, meaning that a VMA starts at the end of another VMA. A single method may lie on the border and begin in one VMA and end in another VMA. Usually adjacent VMAs are merged to a big one by the OS, but we think that this is not the case when Oprofile is in action, because it registers unmap hooks. I also investigated that with the SUN hot spot client JIT engine the code is sparsely scattered over the region. This patch set contains a new opjitconv that produces a single ELF file from the written JIT dump file. There are multiple .text sections in the ELF file that are created by some heuristic. The oprofile daemon code is "experimentally" changed to produce only a single big VMA region for the annonymous samples. In consequence, it may make sense to remove the code that does split annonymous samples in VMA regions at all. The code is tested on x86/32bit (SUN JVM 1.5, IBM JVM 1.5) and s390x/64bit (IBM JVM 1.5) Best, Jens -- Jens Wilke Linux on System z - Application Development Tools phone +49-(0)7031-16-3936 - tl *120-3936 - email jen...@de... IBM Germany Lab, Schoenaicher Str. 220, 71032 Boeblingen |