Re: [PATCH] s390: Add support for z13

Michael Petlan <[email protected]>
Newsgroups gmane.linux.oprofile
Message-ID <alpine.LRH.2.20.1610121546540.14258@Diego>
On Wed, 5 Oct 2016, Andreas Arnez wrote:
> On Tue, Oct 04 2016, Michael Petlan wrote:
>
>> Hi Andreas,
>>
>> have you or anyone tested this patch and/or s390 oprofile support
>> in general? I'd love to know more about the results or at least,
>> if there any, what has been tested and what not + whether there
>> are any known issues regarding to HW sampling on s390.
>
> IIRC, I just performed a quick smoke test before submitting this patch;
> and oprofile didn't crash.  Other than that, I don't really know what
> works and what doesn't.
>

Could you please try it with setting /proc/sys/kernel/kptr_restrict to '0'
and /proc/sys/kernel/perf_event_paranoid to '-1', being logged as root user?

`ophelp -r`
   --> should detect the machine, print "IBM z13"

`ophelp -d`
   --> should print default event "CPU_CYCLES"

`ocount ls`
   --> should return some non-zero value for event CPU_CYCLES

`ocount -e INSTRUCTIONS ls`
   --> should use INSTRUCTIONS and return a non-zero value too

Please try out also the --system-wide mode as root.

If the above commands work, at least the basic z13 support can be verified.

> Some people mentioned various issues with oprofile on s390, depending on
> kernel version and environment.  Since I'm currently more focused on
> other projects, I haven't investigated them.  Here are some
> (unconfirmed) examples:
>
> * The --help/--usage options of operf and ocount behave strangely.
>  E.g., they attempt perf_open and just emit a cryptic error message if
>  that fails.  And upon success they still yield exit code 1.

Maybe if /proc/sys/kernel/perf_event_paranoid is '2' and the user is not
root, this might happen.

>
> * operf is showing a warning message:
>
>    Kernel profiling is not possible with current system config.
>    Set /proc/sys/kernel/kptr_restrict to 0 to collect kernel samples.
>
Is kptr_restrict set to '0'?

> * Without the --system-wide option, operf generates all-zero statistics.

Does `ocount` do the same? If yes, the event counting probably does not
work as expected.


Thanks!
Michael

>
> --
> Andreas
>
>

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
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.