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

MMTk Callback #37

Closed
qinsoon opened this issue Mar 26, 2020 · 6 comments
Closed

MMTk Callback #37

qinsoon opened this issue Mar 26, 2020 · 6 comments
Labels
A-utils Area: Utilities C-enhancement Category: Enhancement

Comments

@qinsoon
Copy link
Member

qinsoon commented Mar 26, 2020

In GitLab by @u6374399 on Dec 13, 2018, 17:14

For detailed performance measurements, RMMTk needs callbacks.

@qinsoon qinsoon added the C-enhancement Category: Enhancement label Mar 26, 2020
@qinsoon qinsoon added A-utils Area: Utilities F-question Call For Participation: Unanswered question (need more information) labels Jun 5, 2020
@qinsoon
Copy link
Member Author

qinsoon commented Jun 5, 2020

Is this included in #62? If so, we could close this issue.

@qinsoon qinsoon added the S-stale:end: Status: Stale (will be closed soon) label Jun 5, 2020
@caizixian
Copy link
Member

Basically we want to expose something for applications to signal Rust MMTk.

@qinsoon
Copy link
Member Author

qinsoon commented Jun 10, 2020

@caizixian As you referenced, MMTk exposes harness_begin/end(). I assume that is how applications tell MMTk to start/end profiling. I don't quite get what is missing or how we should improve.

@qinsoon qinsoon removed the S-stale:end: Status: Stale (will be closed soon) label Jun 10, 2020
@qinsoon
Copy link
Member Author

qinsoon commented Jul 24, 2020

After some work and discussions, there is the plan for the callbacks/hooks:

  1. MMTk should expose these callbacks/hooks to the probe, and those are VM neutral without any VM specific arguments. It means we will remove the parameters, mmtk: &MMTK and tls: OpaquePointer. The probe should be able to directly call those hooks in MMTk.
  2. MMTk should provide trait functions that the VM binding can implement and this allows VM to execute VM specific code before or after the harness, such as triggering a GC.

@qinsoon qinsoon removed the F-question Call For Participation: Unanswered question (need more information) label Jul 24, 2020
@qinsoon qinsoon added this to the v0.1 milestone Jul 24, 2020
@qinsoon
Copy link
Member Author

qinsoon commented Jul 30, 2020

Currently we are using a workaround. We keep the Rust API of mmtk-core, which exposes harness_begin(mmtk: &MMTk, tls: OpaquePointer) and harness_end(mmtk: &MMTk), and we add VM-specific code when the binding exposes the C API of harness_begin()/end() (see mmtk/mmtk-jikesrvm#21 and mmtk/mmtk-openjdk#15). This gives us a working implementation and we do not need to prioritise this for now. I am removing this issue from v0.1 milestone.

@qinsoon qinsoon removed this from the v0.1 milestone Jul 30, 2020
wenyuzhao referenced this issue in wenyuzhao/mmtk-core Sep 14, 2021
* Use EnumMap to store all the work-buckets

* Update binding

* cargo fmt

* Update mmtk-core revision

* Update mmtk-core

* Rename

* Update mmtk revision
@qinsoon qinsoon closed this as completed Jan 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-utils Area: Utilities C-enhancement Category: Enhancement
Projects
None yet
Development

No branches or pull requests

2 participants