Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

will this support Raspberry pi 4 #7

Closed
ravipodila opened this issue Jan 10, 2020 · 2 comments
Closed

will this support Raspberry pi 4 #7

ravipodila opened this issue Jan 10, 2020 · 2 comments

Comments

@ravipodila
Copy link

hi i am using the raspberry pi 4 -Broadcom BCM2711, Quad core Cortex-A72 (ARM v8) 64-bit SoC @ 1.5GHz

I tried using the updated ARMv8 files but i am still facing error: Unsupported architecture/compiler.

can you please help me

@thoughtpolice
Copy link
Owner

thoughtpolice commented Jan 19, 2020

I'm afraid I'm not really maintaining this project much anymore, nor did I implement the ARMv8 code. It's unsurprising none of it works on the newer RPi v4.

However, perf should work I believe, and at the moment, you are almost certainly better off using a tool like perf to record cycles, although it's a bit less ideal for "micro" benchmarks in some cases I suppose. (As far as I can tell, these tools should work on any RPi2 or later, as long as the kernel version is 3.18 or later.) If you are using a Debian based distro like Raspbian, something like sudo apt install linux-tools-$(uname -r) should do the trick.

For instance, something like perf stat --repeat=20 -B <command to test> and looking at the cycles count should give you a good approximation of what these tools do, without needing to use out of tree drivers/APIs. (At the time I wrote this code, these features weren't as widely available on the boards I tested, but most boards have perf_events support pretty quickly now.)

@ravipodila
Copy link
Author

Thanks

sudo apt install linux-tools-$(uname -r) and perf stat --repeat=20 -B

Works

Just for those people using RPi v4.

It will not support the PERF_COUNT_HW_CPU_CYCLES,

So what i used is
attr.type = PERF_TYPE_SOFTWARE;
attr.config = PERF_COUNT_SW_CPU_CLOCK

If type is PERF_TYPE_SOFTWARE, we are measuring software events provided by the kernel.
PERF_COUNT_SW_CPU_CLOCK: This reports the CPU clock, a high-resolution per-CPU timer.

Try this it works for me .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants