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

cannon: Fix GC emulation of Go programs #11704

Merged
merged 15 commits into from
Sep 12, 2024
Merged

cannon: Fix GC emulation of Go programs #11704

merged 15 commits into from
Sep 12, 2024

Commits on Aug 31, 2024

  1. cannon: Fix GC emulation of Go programs

    Improves Linux/MIPS32 emulation for Go programs that utilize the garbage
    collector and goroutine scheduling.
    
    This adds support for the following syscalls:
    
    - getpid - used by the go scheduler
    - clock_gettime - used by the go scheduler and for GC assists and to properly emulate
      time related operations such as `time.Sleep`.
    
    Note on GC assists:
    
    The Go GC relies on `clock_gettime` for GC "assists", whereby a mutator can perform a little bit
    of GC without waiting for the scheduler to do so.
    A monotonic clock (runtime.nanotime) is used to compute the current goroutine's compute budget.
    By modeling a MIPS32 CPU that runs at some clock speed (ex: 10 MHz), we can provide a consistent
    emulation of monotonic time needed by the Go runtime.
    All other clock_gettime flags are handled as unimplemented syscalls.
    Inphi committed Aug 31, 2024
    Configuration menu
    Copy the full SHA
    e83a22f View commit details
    Browse the repository at this point in the history

Commits on Sep 5, 2024

  1. fix unsupported syscalls test

    Inphi committed Sep 5, 2024
    Configuration menu
    Copy the full SHA
    91c3eb1 View commit details
    Browse the repository at this point in the history

Commits on Sep 9, 2024

  1. fix some review comments

    Inphi committed Sep 9, 2024
    Configuration menu
    Copy the full SHA
    78a5097 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    119f17d View commit details
    Browse the repository at this point in the history
  3. address review comments

    Inphi committed Sep 9, 2024
    Configuration menu
    Copy the full SHA
    436df27 View commit details
    Browse the repository at this point in the history

Commits on Sep 10, 2024

  1. update snapshots

    Inphi committed Sep 10, 2024
    Configuration menu
    Copy the full SHA
    cef4159 View commit details
    Browse the repository at this point in the history
  2. fuzz invalid memory proof

    Inphi committed Sep 10, 2024
    Configuration menu
    Copy the full SHA
    2ab6556 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    c21f7ba View commit details
    Browse the repository at this point in the history

Commits on Sep 11, 2024

  1. reduce test runtime

    Inphi committed Sep 11, 2024
    Configuration menu
    Copy the full SHA
    4d537f5 View commit details
    Browse the repository at this point in the history
  2. tweak realtime emulation

    Inphi committed Sep 11, 2024
    Configuration menu
    Copy the full SHA
    e3c1ab4 View commit details
    Browse the repository at this point in the history
  3. reduce test runtime

    Inphi committed Sep 11, 2024
    Configuration menu
    Copy the full SHA
    0478cc8 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    c35cfda View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    759f732 View commit details
    Browse the repository at this point in the history
  6. simplify fuzz

    Inphi committed Sep 11, 2024
    Configuration menu
    Copy the full SHA
    c796261 View commit details
    Browse the repository at this point in the history

Commits on Sep 12, 2024

  1. fix heavy tests

    Inphi committed Sep 12, 2024
    Configuration menu
    Copy the full SHA
    82f3e35 View commit details
    Browse the repository at this point in the history