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

XS instrumentation: upstream? #3139

Closed
dckc opened this issue May 20, 2021 · 2 comments · Fixed by #3607
Closed

XS instrumentation: upstream? #3139

dckc opened this issue May 20, 2021 · 2 comments · Fixed by #3607
Assignees
Labels
technical-debt xsnap the XS execution tool

Comments

@dckc
Copy link
Member

dckc commented May 20, 2021

What is the Problem Being Solved?

Integrating new XS code automatically (#2648) is infeasible since we switched over to our fork when we made some tweaks for instrumentation during testnet: agoric-labs/moddable#5

Description of the Design

Options include:

  • maintain the fork; manually integrate upstream changes as and when we notice them
  • upstream some of the changes; discard others as they become less necessary as more of our swingset GC works

cc @warner @kriskowal @dtribble @phoddie @michaelfig

@dckc
Copy link
Member Author

dckc commented Jun 7, 2021

#3262 is more manual maintenance

@dckc
Copy link
Member Author

dckc commented Aug 9, 2021

Aug 5, I wrote: mapSetAddCount isn't working in Moddable's latest code drop. Not surprising. And probably easy to fix. But even easier to get rid of it. Opinions on whether to keep it thru the metering phase?

@warner replied:

I'd drop it

So that's what I'll do...

dckc added a commit that referenced this issue Aug 9, 2021
  - xsnap-worker
  - get xsnap heap exhaustion crash fix
  - never mind meters beyond compute, allocate

refs #3139
dckc added a commit that referenced this issue Aug 13, 2021
  - xsnap -> xsnap-worker
    to distinguish cli app from long-running worker
  - get xsnap heap exhaustion crash fix
  - never mind meters beyond compute, allocate

refs #3139
dckc added a commit that referenced this issue Aug 13, 2021
  - xsnap -> xsnap-worker
    to distinguish cli app from long-running worker
  - get xsnap heap exhaustion crash fix
  - never mind meters beyond compute, allocate
  - get mac makefile update

fixes #2469
refs #3139
dckc added a commit that referenced this issue Aug 14, 2021
  - xsnap -> xsnap-worker
    to distinguish cli app from long-running worker
  - get xsnap heap exhaustion crash fix
  - never mind meters beyond compute, allocate
  - get mac makefile update

fixes #2469
refs #3139
dckc added a commit that referenced this issue Aug 14, 2021
Moddable reworked the chunk allocator to always use a single memory block for chunk storage.

The change is implemented in `xsnapPlatform.c`. The implementation uses `mmap`/`mprotect` (`VirtualAlloc` on Windows) to reserve and to commit memory pages. 

To get this fix, we add an `xsnap-native` submodule that replaces `xsnap.c` and friends.
The submodule includes a few tweaks: https://github.com/agoric-labs/xsnap-pub/tree/endo-submodule

fixes #3577
fixes #3139 , bringing us back to stock XS.
fixes #2469 - Moddable reviewed the code well enough to substantially re-work it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
technical-debt xsnap the XS execution tool
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants