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

Feature: Faster BMP -> BMDA communications #1722

Merged
merged 2 commits into from
Jan 12, 2024

Conversation

dragonmux
Copy link
Member

Detailed description

After having a couple of conversations with ALTracer about the speed and performance of BMDA interacting with the firmware, we realised that the current 1-byte-at-a-time solution for reads, while correct, is extremely far from performant but there's a simple solution to the problem that doesn't sacrifice correctness - slipping a large buffer in between the reads and the reading.

This PR addresses this by adding a 4KiB buffer in between the probe reads and BMDA's platform_buffer_read() on both Linux/macOS and Windows. This significantly reduces the number of syscalls being made and streamlines the data transport through BMDA from the probe. A reasonable speedup on current firmware was observed with no drawbacks.

Your checklist for this pull request

  • I've read the Code of Conduct
  • I've read the guidelines for contributing to this repository
  • It builds for hardware native (make PROBE_HOST=native)
  • It builds as BMDA (make PROBE_HOST=hosted)
  • I've tested it to the best of my ability
  • My commit messages provide a useful short description of what the commits do

Closing issues

@dragonmux dragonmux added Enhancement General project improvement BMD App Black Magic Debug App (aka. PC hosted) (not firmware) labels Jan 11, 2024
@dragonmux dragonmux added this to the v2.0 release milestone Jan 11, 2024
@dragonmux dragonmux requested a review from esden January 11, 2024 01:49
Copy link
Member

@esden esden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@esden esden merged commit 7a11afc into main Jan 12, 2024
6 checks passed
@dragonmux dragonmux deleted the feature/faster-bmda-bmp-read-comms branch January 12, 2024 00:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BMD App Black Magic Debug App (aka. PC hosted) (not firmware) Enhancement General project improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants