Comments (2)
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.)
from enable_arm_pmu.
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 .
from enable_arm_pmu.
Related Issues (4)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from enable_arm_pmu.