Bug 12146 - Oprofile runtime issue
Summary: Oprofile runtime issue
Status: RESOLVED INVALID
Alias: None
Product: buildroot
Classification: Unclassified
Component: Other (show other bugs)
Version: 2019.02.4
Hardware: All Linux
: P5 blocker
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-08-26 11:11 UTC by Prasanth
Modified: 2019-11-29 13:07 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:


Attachments
defconfig used for Beaglebone Black + oprofile (427 bytes, application/octet-stream)
2019-08-26 11:11 UTC, Prasanth
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Prasanth 2019-08-26 11:11:55 UTC
Created attachment 8221 [details]
defconfig used for Beaglebone Black + oprofile

Hi,

I tried building oprofile for my Beagle bone Black (cortex-A8), where the build went fine. But, I could see a runtime issue.

Could any help me with this?

Attached defconfig and pasted the error-log at runtime.

# operf --version
Unexpected error running operf: Operation not supported
#
Comment 1 Thomas Petazzoni 2019-11-29 07:35:21 UTC
Thanks for your bug report. This seems like a kernel configuration issue. Did you had CONFIG_OPROFILE=y in your kernel configuration?
Comment 2 Thomas Petazzoni 2019-11-29 13:07:41 UTC
Looked at it in more details, if you get EOPNOTSUPP, then you probably do have CONFIG_OPROFILE=y enabled, but the perf_event_open() syscall fails and returns EOPNOTSUPP. One reason for this to happen is when:

        if (is_sampling_event(event)) {
                if (event->pmu->capabilities & PERF_PMU_CAP_NO_INTERRUPT) {
                        err = -EOPNOTSUPP;
                        goto err_alloc;
                }
        }

So this really depends on your hardware PMU, and the kernel support for it. This is not a Buildroot bug.