Re: Clarification on support of arm32 with kernel4.1 for oprofile 1.2.0
Vinoth Natarajan <[email protected]>
| Newsgroups | gmane.linux.oprofile |
|---|---|
| Message-ID | <CADaxUdFJW5kAcYxG7ua2EXnN-nzsbV_8_Ddc9=zueqjXqKeMaw@mail.gmail.com> |
Hello Michael,
Good Day!!!
*Tried running the oprofile-1.2.0 on different ARM hardware which supports
PMU.*
*But when we try to run operf binary,it show the following error.*
*# ./operf --system-wide*
* sh: /home/oprofile/bin/ophelp: not found*
* Unable to find info for event CPU_CYCLES*
I have tried in internet about this error, No luck.
Could you please let us know about this error.
Note :-
Following are the kernel configs related to PERF enabled on this 4.1 kernel.
CONFIG_HAVE_PERF_EVENTS=y
CONFIG_PERF_USE_VMALLOC=y
CONFIG_PERF_EVENTS=y
# CONFIG_DEBUG_PERF_USE_VMALLOC is not set
CONFIG_HAVE_PERF_REGS=y
CONFIG_HAVE_PERF_USER_STACK_DUMP=y
# CONFIG_PCIEASPM_PERFORMANCE is not set
CONFIG_HW_PERF_EVENTS=y
Code given from you is able to get the expected output from the new
hardware.
ioctl(fd, PERF_EVENT_IOC_RESET, 0);
ioctl(fd, PERF_EVENT_IOC_ENABLE, 0);
printf("Measuring instruction count for this printf\n");
ioctl(fd, PERF_EVENT_IOC_DISABLE, 0);
read(fd, &count, sizeof(long long));
printf("Used %lld instructions\n", count);
# ./hello_test_oprofile.o
Measuring instruction count for this printf
Used 3660 instructions
On Tue, Feb 20, 2018 at 11:11 AM, Vinoth Natarajan <[email protected]>
wrote:
> Hello Michael,
>
> Thanks so much for your valuable support.
>
> For time being am planning to use oprofile-0.9.9 version itself.
> Could you please share the test cases you have used to test the oprofile
> functionalities to its full potential.
>
> Kindly share all the test cases you have used, so that i dont miss on any
> test case/functionality of oprofile while i test.
>
> Thanks in advance!!!
>
> Thanks and Regards,
> Vinoth Natarajan.
>
> On Fri, Feb 16, 2018 at 8:39 PM, Michael Petlan <[email protected]>
> wrote:
>
>> On Fri, 16 Feb 2018, Vinoth Natarajan wrote:
>> > No, it doesn't Michael. it threw "Error opening leader 1" Error..
>>
>> This error means that the syscall requesting perf even opening in kernel
>> fails. Since it is the simplest call possible, it probably means that
>> your kernel is still not configured OK or it really does not know the
>> CPU. I don't know much about arm32 stuff, similar to armv7. I have been
>> testing oprofile on some armv8 aarch64 processors only (wrt ARM).
>>
>> Michael
>> >
>> > Thanks and Regards,
>> > Vinoth Natarajan.
>> >
>> > On 16-Feb-2018 8:10 PM, "Michael Petlan" <[email protected]> wrote:
>> > Does my hello.c work with the kernel rebuilt with
>> CONFIG_HW_PERF_EVENTS=y ?
>> >
>> > On Fri, 16 Feb 2018, Vinoth Natarajan wrote:
>> > > Hello Michael,
>> > > I have enabled the CONFIG_HW_PERF_EVENTS and tried oprofile
>> -1.2.0 in the target.
>> > >
>> > > Still the old error persists " ./operf
>> > > Your kernel's Performance Events Subsystem does not support
>> your processor type."
>> > >
>> > > dmesg | grep -i -e perf -e pmu
>> > > oprofile: no performance counters
>> > >
>> > > In dmesg logs, it shows as no performance counters
>> > >
>> > > Could you please share your feedback.
>> > >
>> > > Thanks in Advance!!!
>> > >
>> > > Thanks and Regards,
>> > > Vinoth Natarajan.
>> > >
>> > > On Thu, Feb 15, 2018 at 9:37 PM, Michael Petlan <
>> [email protected]> wrote:
>> > > On Thu, 15 Feb 2018, Vinoth Natarajan wrote:
>> > > > Hello Michael,
>> > > > Thanks so much for the help.
>> > > >
>> > > > Cross compiled the hello.c with
>> crosstools-arm-gcc-5.3-linux-4.1-glibc-2.22
>> > > > and tested the executable on the target(arm32)
>> > > >
>> > > > Received the following error
>> > > > " ./hello
>> > > > Error opening leader 1"
>> > > >
>> > >
>> > > This points to the kernel perf subsystem. It cannot even
>> open a simple event.
>> > > Not an OProfile's fault.
>> > >
>> > > >
>> > > > Following are the kernel configs related to PERF in
>> target
>> > > >
>> > > > cat /tmp/test |grep PERF
>> > > >
>> > > > CONFIG_HAVE_PERF_EVENTS=y
>> > > > CONFIG_PERF_USE_VMALLOC=y
>> > > > CONFIG_PERF_EVENTS=y
>> > > > # CONFIG_DEBUG_PERF_USE_VMALLOC is not set
>> > > > CONFIG_HAVE_PERF_REGS=y
>> > > > CONFIG_HAVE_PERF_USER_STACK_DUMP=y
>> > > > # CONFIG_PCIEASPM_PERFORMANCE is not set
>> > > > # CONFIG_HW_PERF_EVENTS is not set
>> > >
>> > > I believe you need CONFIG_HW_PERF_EVENTS=y on ARM.
>> > >
>> > > > # CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set
>> > > > # CONFIG_CPU_FREQ_GOV_PERFORMANCE is not set
>> > > > # CONFIG_CLS_U32_PERF is not set
>> > > >
>> > > > Could you please share your feedback on this.
>> > >
>> > > You may also try to grep for perf in logs:
>> > >
>> > > # dmesg | grep -i -e perf -e pmu
>> > > [ 1.375699] hw perfevents: enabled with armv8_pmuv3_0
>> PMU driver, 5 counters available
>> > > [ 1.403155] kvm [1]: GICV region size/alignment is
>> unsafe, using trapping (reduced performance)
>> > > [ 2.036285] xgene-pmu APMC0D5C:00: X-Gene PMU version 2
>> > >
>> > > ^^^ This is a log from the moment when my kernel
>> identified and initialized
>> > > the PMU. You should see something like that too. Or
>> better, after recompiling
>> > > your kernel with CONFIG_HW_PERF_EVENTS=y and booting, you
>> should see something
>> > > like this (PMU-related logs). If there is some error in
>> PMU init, you will see
>> > > it in the logs.
>> > >
>> > > I am afraid that without CONFIG_HW_PERF_EVENTS=y you
>> cannot use the events.
>> > >
>> > > However, I don't guarantee that with
>> CONFIG_HW_PERF_EVENTS=y it works. There
>> > > can be some firmware issues, ACPI issues, etc. I roughly
>> remember some issue
>> > > when you'd need to boot with acpi=off to access the
>> events, etc.
>> > >
>> > > Cheers,
>> > > Michael
>> > >
>> > > >
>> > > > Thanks in Advance!!!
>> > > >
>> > > > Thanks and Regards,
>> > > > Vinoth Natarajan.
>> > > >
>> > > [...]
>> > >
>> > >
>> > >
>> > >
>> >
>> >
>> >
>>
>
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
oprofile-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/oprofile-list