From: William C. <wc...@re...> - 2016-07-11 19:49:23
|
On 07/11/2016 02:36 PM, Beaman, Thomas wrote: > >> -----Original Message----- >> From: Michael Petlan [mailto:mp...@re...] >> Sent: Friday, July 08, 2016 1:16 PM >> To: Beaman, Thomas >> Cc: Michael Petlan; William Cohen; opr...@li... >> Subject: RE: oprofile support for PPC_E5500 >> >> On Fri, 8 Jul 2016, Beaman, Thomas wrote: >>> Hi Michael, >>> >> >> Hi Tom, >> >>> I wanted to update you on my status. I was able to apply your patch, but I >> did notice a few recommendations for change. >>> >>> The E5500 is a 64 bit cpu like the E6500. I have noticed that the E6500 has >> entries in both the ppc and ppc64 directories. Also the op_cpu_type.c file >> has two entries ppc/e6500 and ppc64/e6500. I believe the e5500 should also >> be like this. >> >> I don't see any ppc64/e6500 dir. Do you have the same git tree? >> https://sourceforge.net/p/oprofile/oprofile/ci/master/tree/events/ppc64/ > > I did some looking into this, and I have oprofile version 1.1.0 but my linux vendor (WindRiver linux) does add a patch called > > oprofile-wr-add-ppc64-e6500-support.patch > > which adds entries to the ppc64 event dir and updates the op_cpu_type.c file with a ppc64/e6500 entry. (very similar type of updates as your patch) Hi Thomas, Would it be possible to have someone from Wind River submit the e6500 patch for review? It would be nice to eliminate the need for this patch for the next oprofile release. It does look like the pmu control hardware is pretty similar for e500, e5500, and e6500: http://cache.freescale.com/files/32bit/doc/ref_manual/EREF_RM.pdf. However, the actual performance events supported for the e500 and e6500 differ. It is likely there are event differences between e5500 and e6500 so simply including e6500 for e5500 is likely to have some incorrect entries. However, I haven't found a list of events for the e5500 around. -Will > >> >> [Michael@Diego oprofile]$ ls events/ppc64 events/ppc >> events/ppc: >> 7450 e300 e500 e500mc e500v2 e5500 e6500 >> events/ppc64: >> 970 970MP architected_events_v1 power4 power5 power5+ power5++ >> power6 power7 power8 >> >> The same with op_cpu_type.c: >> >> [Michael@Diego oprofile]$ grep -P -i ppc6?4?/e6500 ./libop/op_cpu_type.c >> { "e6500", "ppc/e6500", CPU_PPC_E6500, 6 }, >> >> Anyway, it should not matter whether the events/unit_masks files are in ppc >> or ppc64 dir, as you can see, Intel datafiles are in i386 dir while AMD files are >> in x86-64, no matter that Intel CPUs run in 64bit mode now. Regarding to the >> ppc/ppc64, you can see that ppc64 dir contains IBM POWER processors, while >> ppc is for the others. >> > > What you say is probably correct for intel, but from actual testing this does not appear to be the case for PowerPC. If I do not have the ppc64/e5500 entries the cpu is NOT detected. This is probably why Windriver has added the ppc64/e6500 patch. > > >>> >>> After applying your patch I made the following changes by hand. >>> >>> Add ppc64/e5500 event and unit_masks (with includes pointing to >>> ppc64/e6500) Add ppc64/e5500 entry to op_cpu_type.c Fix typo in >>> ppc/unit_masks include:ppc/6500 should be include:ppc/e6500 >> Yes, I haven't noticed the typo. Thanks. >> >>> >>> After these changes I am now able to run ophelp and it list lots of info, so it >> is now detecting the cpu. >> >> The command `ophelp -r` should print the processor type If ophelp is >> reporting events, it is good news. >> > > root@miopqt_250:~# ophelp -r > e5500 > > but I can only get this if I have ppc64/e5500 entries in op_cpu_type.c and the ppc64/e5500 directory. > > >>> >>> I tried running your check_events.sh script but was running into problems. >> I am off until Monday but I wanted to give you a status update. If you want >> to modify the patch I can test a new one on Monday and also figure out what >> is going on with check_events. >> >> The script just parses all the supported events from ophelp and then it runs >> `ocount -b -e $event -- sleep 0.2` against each of them. >> >> There's no E5500 or any other similar CPU available for me, just an IBM >> POWER7 box and I have no problems running the script there. >> >> You may try it manually: >> >> perl -ne 'print "$1\n" if /name:(\w+)\s/' < events/ppc/e6500/events > >> events.list for i in `cat events.list`; do >> ocount -b -e $i -- sleep 0.2 >> result.log done >> > > The problem with the script is my system would not accept sleep 0.2. I have changed it to sleep 1 and now it is working. I have attached the output files events.list, results.log and supported.list > >>> >>> I do not know the posting protocol, should I be posting this reply to the >> oprofile-list or is direct communications acceptable ? If it should go to the list >> can you forward it on and let me know for future postings. >> >> It's always better when the messages go to the list, since other people might >> find them useful later on. >> >>> >>> Thanks for your help so far, >>> Tom >> >> Michael >> >>> >>> >>> >>> >>> -----Original Message----- >>> From: Michael Petlan [mailto:mp...@re...] >>> Sent: Thursday, July 07, 2016 10:48 AM >>> To: Beaman, Thomas >>> Cc: opr...@li... >>> Subject: Re: oprofile support for PPC_E5500 >>> >>> Hi, >>> >>> could you please test the attached patch? >>> >>> E6500 also has the same PMU events as E500mc plus some more. >>> It would be good to know what the set of events supported by the E5500 >> actually is. >>> >>> Please run the oprofile-tests testsuite and the attached test and send the >> logs from the second one? >>> >>> Anyway, it would be nice if someone more appropriate reviewed the >> events and checks the kernel support, etc. >>> >>> Thanks. >>> Michael >>> >>> >>> On Wed, 6 Jul 2016, Beaman, Thomas wrote: >>>> When I am running on my PPC E5500 system oprofile cannot detect the >>>> CPU >>>> >>>> >>>> >>>> operf --version >>>> >>>> Unable to obtain cpu_type >>>> >>>> >>>> >>>> Looking at op_cpu_type.h I see entries for >>>> >>>> >>>> >>>> CPU_PPC_E500MC, /**< e500mc */ >>>> >>>> CPU_PPC_E6500, /**< e6500 */ >>>> >>>> >>>> >>>> But no entry for the PPC E5500. The E5500 is very similar to e500mc and >> the E6500. Can support be added for this processor ? >>>> >>>> >>>> >>>> Thanks, >>>> >>>> Tom >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>> |