Re: [PATCH] Remove Powerpc OProfile events the kernel will reject

Michael Petlan <[email protected]>
Newsgroups gmane.linux.oprofile
Organization Red Hat
Message-ID <[email protected]>
On Tue, 2015-11-24 at 08:28 -0800, Carl E. Love wrote:

> The event code for  PM_DATA_ALL_FROM_RL2L3_MOD is 0x62c046.  Bits 22:20
> are 2. According to the note 1 in the patch the kernel will reject any
> event with non zero bits in 22:20.  Hence it was included.  I tried the
> event on my Power 8 machine:
> 
> ocount -e PM_DATA_ALL_FROM_RL2L3_MOD ls
> Cannot find event PM_DATA_ALL_FROM_RL2L3_MOD
> Error retrieving info for event PM_DATA_ALL_FROM_RL2L3_MOD
> 
> and it was rejected.  
> 
> I have not tracked down exactly when the change went into the kernel.  I
> have 3.13.0-35 on my Ubuntu 14.04 system.  What distro/kernel version
> are you running?
> 
>        Carl Love


Hi Carl,

I have tested it and all the PM_DATA_ALL_* events work for me. The
testing environment is:

cpu             : POWER8E (raw), altivec supported
clock           : 3690.000000MHz
revision        : 2.1 (pvr 004b 0201)

Running the RHEL-7 kernel and also upstream 4.4.0-rc2+ version and older
oprofile-0.9.9. The machine is a bare metal one, so no POWERPC
virtualization is used. But when quickly checking PowerKVM, KVM and LPAR
guests, the behaviour is the same.

I have a simple checking script (attached) that should run all the
events offered by ophelp under ocount and check which ones are
supported.

What environment do you have that it does not allow you to use the
PM_DATA_ALL_* events? Or is there any other reason for having them
disabled?

Thank you!
Michael

------------------------------------------------------------------------------
Go from Idea to Many App Stores Faster with Intel(R) XDK
Give your users amazing mobile app experiences with Intel(R) XDK.
Use one codebase in this all-in-one HTML5 development environment.
Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs.
http://pubads.g.doubleclick.net/gampad/clk?id=254741551&iu=/4140

_______________________________________________
oprofile-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/oprofile-list
check_events.sh (application/x-shellscript, 699 B)
#!/bin/bash

SUPPORTED_LIST="supported.list"
UNSUPPORTED_LIST="unsupported.list"
ALL_LIST="events.list"
LOGFILE="results.log"
CMD="sleep 0.2"

test -e $SUPPORTED_LIST && rm -f $SUPPORTED_LIST
test -e $UNSUPPORTED_LIST && rm -f $UNSUPPORTED_LIST && touch $UNSUPPORTED_LIST
test -e $LOGFILE && rm -f $LOGFILE

# get the events
ophelp -X | perl -ne 'print "$1\n" if /event_name=\"(\w+)\"/' > $ALL_LIST

# check the events
for evt in `cat $ALL_LIST`; do
	ocount -b -e $evt $CMD >> $LOGFILE
	if [ $? -ne 0 ]; then
		echo "$evt" >> $UNSUPPORTED_LIST
	else
		echo "$evt" >> $SUPPORTED_LIST
	fi
done

cat $LOGFILE | egrep -v '^$' > $LOGFILE.tmp
mv $LOGFILE.tmp $LOGFILE

! test -s $UNSUPPORTED_LIST
exit $?
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.