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

大平怜 <[email protected]>
Newsgroups gmane.linux.oprofile
Message-ID <CAERM-PiySqJqkROtiWUtJre3u2NpiqnAcnf7OGZmE=eDCKYkAA@mail.gmail.com>
Hi Carl,

I am using the commit a58c3953a1c5f5fb00b873a5e22c878f9f4d5a2d, which was
the latest before your patch was applied, in the git repository. My machine
is bare-metal POWER8, running Linux 3.16.0:

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

$ uname -r
3.16.0-31-generic
$ uname -v
#41-Ubuntu SMP Tue Feb 10 21:05:50 UTC 2015
$ uname -m
ppc64le

> > 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:
>

The bits 22:20 of 0x62c046 are 6, aren't they?  By the way, in my
understanding,
any event with non zero bits in 22:20 will be rejected,
only when unit >= 6 && unit <= 9.  The unit (bits 15:12) of 0x62c046 is 0xc.
Hence PM_DATA_ALL_FROM_RL2L3_MOD should not be rejected.


> > 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.
>

If it was the kernel that rejected the event, the error message should have
been something like this:

$ ./ocount -e PM_L2_LD_MISS ls
perf_event_open failed with Invalid argument
Caught runtime error while setting up counters
Internal Error.  Perf event setup failed.
Error running ocount

Your error message simply said there was no such event, like this:

$ ./ocount -e FOO_BAR ls
Cannot find event FOO_BAR
Error retrieving info for event FOO_BAR

I guess you were using the very latest OProfile, to which your patch had
already been applied.

Here is the result of specifying PM_DATA_ALL_FROM_RL2L3_MOD to the
a58c3953a1c5f5fb00b873a5e22c878f9f4d5a2d version of ocount in my
environment:

$ ./ocount -v
./ocount: oprofile 1.2.0git compiled on Nov 26 2015 16:28:32
$ ./ocount -e PM_DATA_ALL_FROM_RL2L3_MOD ls
ocount    oparchive operf  ophelp    opjitconv  oprofile_data
opannotate  op-check-perfevents  opgprof  opimport  opreport

Events were actively counted for 820646 nanoseconds.
Event counts (actual) for /bin/ls:
Event                              Count                    % time counted
PM_DATA_ALL_FROM_RL2L3_MOD         0                        100.00


Regards,
Rei Odaira

------------------------------------------------------------------------------
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
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.