Feature/core arraycopy - #56
Open
nhouze-microej wants to merge 4 commits into
Open
Conversation
…ore validation Migrate the standalone arraycopy measurement into vee-port/validation/core as a regression test. ArrayCopyPerformance measures aligned and misaligned System.arraycopy throughput on large byte[] buffers and asserts each against a configurable minimum-throughput system property. Configured board-neutrally for this template: buffer size 256 KB, Java heap raised to 1 MB, and both throughput thresholds left unset so the checks are no-ops on any board. RT1170 reference values (125/65 MB/s) are documented in the testsuite properties for boards that opt into enforcement.
Add a 3.7.0 CHANGELOG entry for the ArrayCopyPerformance test and a README section describing the benchmark and how to configure the throughput thresholds and buffer size. Move the detailed option documentation out of microej-testsuite-common.properties into the README, leaving a short pointer.
| core.memory.javaheap.memory=RAM | ||
| core.memory.javaheap.size=32768 | ||
| # Sized to hold the two ArrayCopyPerformance buffers (see the arraycopy section below) plus headroom. | ||
| core.memory.javaheap.size=1048576 |
Contributor
There was a problem hiding this comment.
Can we keep a default value that is lower here? And document the heap requirement for the copy benchmark instead?
Contributor
Author
There was a problem hiding this comment.
I have set the default value to 64kB buffers, this will reach the typical RAM cache threshold and provide good results. So a java heap of ~160kB (32kB + 2x64kB) is enough.
In the rare cases that it is too much, it is still configurable
I also added 2 overlapping copy tests (left and right), so we now have 4 throughput tests.
Extend the ArrayCopyPerformance bench with two overlapping copies within a single buffer: destination shifted one byte right (memmove copies backwards) and one byte left (copies forwards). The bench now reports four figures (aligned, misaligned, overlap-right, overlap-left), each with its own configurable minimum-throughput threshold. The overlap pair also guards against System.arraycopy being routed to memcpy, which would corrupt overlapping data. Add a note that the measured throughputs must be compared against the memory bandwidth advertised by the silicon vendor to judge whether the port reaches the expected fraction of peak, not just clear the regression floor. Keep the README intro and test docs board-agnostic (MCU data cache, RAM bandwidth). Reset the buffer size to the 64 KB code default (drop the 256 KB override).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.