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

Enable the R5900 performance counter hardware #26

Open
frno7 opened this issue Mar 17, 2019 · 2 comments
Open

Enable the R5900 performance counter hardware #26

frno7 opened this issue Mar 17, 2019 · 2 comments
Labels
enhancement New feature or request

Comments

@frno7
Copy link
Owner

frno7 commented Mar 17, 2019

The R5900 performance counter hardware provides the means for gathering statistical information about the internal events of the CPU and the pipeline during program execution. The statistics gathered during program execution aid in tuning the performance of hardware and software systems based on the processor.

See section 9 in the TX79 manual.

See also #6.

@Ravenslofty
Copy link

The performance counter hardware is pretty easy to set up, actually. I've written bare-metal assembly programs to do it. It'd have to be hooked up to perf though, I think.

@frno7
Copy link
Owner Author

frno7 commented Apr 14, 2019

Wiring the performance counter into the perf command sounds like an excellent idea!

A note of caution though. I have noticed that perf consumes a significant amount of memory, at least in its default configuration, and so if possible parts of it may need to be disabled for it to fit within the limits of 32 MiB of total system RAM. That in addition to the actual thing that one wants to measure, of course. 😁

I have put some effort into making the R5900 Linux kernel port more modular to reduce its memory footprint to a minimum, if one so desires. The BIOS code has been removed as it is no longer used. Also, as described in #10, the text console mode does not need to use any system RAM for its frame buffer.

The Linux kernel has a rich set of instrumentation tools too. eBPF seems to be the latest craze for kernel analysis and it even has a MIPS JIT compiler.

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

No branches or pull requests

2 participants