Re: [Patch] Losing many samples when profiling multiple JVMs
William Cohen <[email protected]>
| Newsgroups | gmane.linux.oprofile |
|---|---|
| Message-ID | <[email protected]> |
On 07/16/2015 10:27 AM, Will Schmidt wrote: > On Wed, 2015-07-15 at 15:03 -0400, William Cohen wrote: >> >> I tried the test on rhel7 ppc64 and it doesn't work because of the way >> that calls operates. The ppc64 generated code is treating the address >> returned by >> initialize_anon_func as a pointer to a descriptor rather than the >> address that the branch should branch to. The first 3 double word in >> the generated anon_func are used as a descriptor and the branch goes >> off to the wrong location >> (https://refspecs.linuxfoundation.org/ELF/ppc64/PPC-elf64abi-1.9.html#FUNC-DES) >> >> Is this code working on ppc64le? How is the code being compiled on >> your machine? Or does it have a similar problem? Any suggestions on >> how to best address this? > > > Note that the PPC64le platform (which uses the ELF ABIv2) does not use > function descriptors, so it is possible the code actually just works on > ppc64le. > I've not actually tried this patch, but saw the comment go past, and > thought I should chime in in case folks were off scratching their heads > in confusion.. :-) Hi Will, The problem wasn't with oprofile data collection; it was with some test code that was generating code and a pointer to that code. On ppc64be that pointer was be interpreted as a pointer to the function descriptor and the beginning of the function was being interpreted as fields of the function descriptor causing the processor to jump off to the wrong location. I did find information about ELF ABIv2 saying it didn't use function descriptors. Last night I added an ifdef to the anon_remap.c test in the testsuite that should only be enable generating function descriptor generation for powerpc64be. I tested that the code worked on powerpc64be and x86-64. It would be good for someone with ppc64le access to verify that it still works for ppc64le. git clone git://git.code.sf.net/p/oprofile/oprofile-tests cd oprofile-tests/testsuite as root: runtest --tool=oprofile -Will Cohen ------------------------------------------------------------------------------ Don't Limit Your Business. Reach for the Cloud. GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business. Configured For All Businesses. Start Your Cloud Today. https://www.gigenetcloud.com/