-
Notifications
You must be signed in to change notification settings - Fork 71
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
Switch from CTF to OCaml 5.1 runtime events #635
Merged
Merged
Conversation
This file contains 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
talex5
force-pushed
the
trace
branch
2 times, most recently
from
October 25, 2023 11:43
e32cbdb
to
3cf5d2c
Compare
This is a minimal initial version, which mostly keeps the same set of events as before. The new `eio.runtime_events` library defines the events and their types. `lib_eio/core/trace.ml` now uses this instead of using CTF. `examples/trace/main.ml` shows how to subscribe to events. One slight difference is that `current_thread` has gone. It is now up to the reader to remember which thread was active. In a few places this meant recording e.g. reading a promise at the point where the fiber is resumed, not when it is enqueued. `Ctx_unix` is gone. Eio tracing is automatically enabled whenever OCaml tracing is. Co-authored-by: Thomas Leonard <talex5@gmail.com> Co-authored-by: Patrick Ferris <patrick@sirref.org>
Note: the |
talex5
added a commit
to talex5/opam-repository
that referenced
this pull request
Nov 2, 2023
CHANGES: New features / API changes: - Add `Flow.read_all` (@SGrondin ocaml-multicore/eio#596, reviewed by @talex5 @rbjorklin). - Add `Path.stat` (@patricoferris @talex5 @avsm ocaml-multicore/eio#617 ocaml-multicore/eio#618 ocaml-multicore/eio#624 ocaml-multicore/eio#620, reviewed by @SGrondin). - Add `Path.rmtree` (@talex5 ocaml-multicore/eio#627 ocaml-multicore/eio#628, reviewed by @SGrondin). - Add `Path.mkdirs` and `Path.split` (@patricoferris @talex5 ocaml-multicore/eio#625). - Add `Eio.File.{seek,sync,truncate}` (@talex5 ocaml-multicore/eio#626). - Add `Eio.Path.{kind,is_file,is_directory}` (@patricoferris @talex5 ocaml-multicore/eio#623, reviewed by @avsm). - Switch from CTF to OCaml 5.1 runtime events (@TheLortex @patricoferris @talex5 ocaml-multicore/eio#634 ocaml-multicore/eio#635, reviewed by @avsm). This is a minimal initial version. Documentation: - Document `File.Stat` record fields (@avsm @talex5 ocaml-multicore/eio#621). - Update README section about `env` (@talex5 ocaml-multicore/eio#614, reported by @jonsterling). Build and test changes: - Add `File.stat` benchmark (@talex5 ocaml-multicore/eio#616). - Add `Path.stat` benchmark (@patricoferris @talex5 ocaml-multicore/eio#630). - eio_linux: mark as only available on Linux (@talex5 ocaml-multicore/eio#629). - Make MDX tests idempotent (@SGrondin ocaml-multicore/eio#601, reviewed by @talex5). - Allow trailing whitespace in CHANGES.md (@talex5 ocaml-multicore/eio#632). - Update minimum OCaml version to 5.1 (@talex5 ocaml-multicore/eio#631). - Generate prototypes for C stubs from ml files (@talex5 ocaml-multicore/eio#615). - Don't try to compile uring support on centos 7 (@talex5 ocaml-multicore/eio#638, reported by @zenfey).
talex5
added a commit
to talex5/opam-repository
that referenced
this pull request
Nov 2, 2023
CHANGES: New features / API changes: - Add `Flow.read_all` (@SGrondin ocaml-multicore/eio#596, reviewed by @talex5 @rbjorklin). - Add `Path.stat` (@patricoferris @talex5 @avsm ocaml-multicore/eio#617 ocaml-multicore/eio#618 ocaml-multicore/eio#624 ocaml-multicore/eio#620, reviewed by @SGrondin). - Add `Path.rmtree` (@talex5 ocaml-multicore/eio#627 ocaml-multicore/eio#628, reviewed by @SGrondin). - Add `Path.mkdirs` and `Path.split` (@patricoferris @talex5 ocaml-multicore/eio#625). - Add `Eio.File.{seek,sync,truncate}` (@talex5 ocaml-multicore/eio#626). - Add `Eio.Path.{kind,is_file,is_directory}` (@patricoferris @talex5 ocaml-multicore/eio#623, reviewed by @avsm). - Switch from CTF to OCaml 5.1 runtime events (@TheLortex @patricoferris @talex5 ocaml-multicore/eio#634 ocaml-multicore/eio#635, reviewed by @avsm). This is a minimal initial version. Documentation: - Document `File.Stat` record fields (@avsm @talex5 ocaml-multicore/eio#621). - Update README section about `env` (@talex5 ocaml-multicore/eio#614, reported by @jonsterling). Build and test changes: - Add `File.stat` benchmark (@talex5 ocaml-multicore/eio#616). - Add `Path.stat` benchmark (@patricoferris @talex5 ocaml-multicore/eio#630). - eio_linux: mark as only available on Linux (@talex5 ocaml-multicore/eio#629). - Make MDX tests idempotent (@SGrondin ocaml-multicore/eio#601, reviewed by @talex5). - Allow trailing whitespace in CHANGES.md (@talex5 ocaml-multicore/eio#632). - Update minimum OCaml version to 5.1 (@talex5 ocaml-multicore/eio#631). - Generate prototypes for C stubs from ml files (@talex5 ocaml-multicore/eio#615). - Don't try to compile uring support on centos 7 (@talex5 ocaml-multicore/eio#638, reported by @zenfey).
This was referenced Nov 20, 2023
Closed
nberth
pushed a commit
to nberth/opam-repository
that referenced
this pull request
Jun 18, 2024
CHANGES: New features / API changes: - Add `Flow.read_all` (@SGrondin ocaml-multicore/eio#596, reviewed by @talex5 @rbjorklin). - Add `Path.stat` (@patricoferris @talex5 @avsm ocaml-multicore/eio#617 ocaml-multicore/eio#618 ocaml-multicore/eio#624 ocaml-multicore/eio#620, reviewed by @SGrondin). - Add `Path.rmtree` (@talex5 ocaml-multicore/eio#627 ocaml-multicore/eio#628, reviewed by @SGrondin). - Add `Path.mkdirs` and `Path.split` (@patricoferris @talex5 ocaml-multicore/eio#625). - Add `Eio.File.{seek,sync,truncate}` (@talex5 ocaml-multicore/eio#626). - Add `Eio.Path.{kind,is_file,is_directory}` (@patricoferris @talex5 ocaml-multicore/eio#623, reviewed by @avsm). - Switch from CTF to OCaml 5.1 runtime events (@TheLortex @patricoferris @talex5 ocaml-multicore/eio#634 ocaml-multicore/eio#635, reviewed by @avsm). This is a minimal initial version. Documentation: - Document `File.Stat` record fields (@avsm @talex5 ocaml-multicore/eio#621). - Update README section about `env` (@talex5 ocaml-multicore/eio#614, reported by @jonsterling). Build and test changes: - Add `File.stat` benchmark (@talex5 ocaml-multicore/eio#616). - Add `Path.stat` benchmark (@patricoferris @talex5 ocaml-multicore/eio#630). - eio_linux: mark as only available on Linux (@talex5 ocaml-multicore/eio#629). - Make MDX tests idempotent (@SGrondin ocaml-multicore/eio#601, reviewed by @talex5). - Allow trailing whitespace in CHANGES.md (@talex5 ocaml-multicore/eio#632). - Update minimum OCaml version to 5.1 (@talex5 ocaml-multicore/eio#631). - Generate prototypes for C stubs from ml files (@talex5 ocaml-multicore/eio#615). - Don't try to compile uring support on centos 7 (@talex5 ocaml-multicore/eio#638, reported by @zenfey).
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.
This is a minimal initial version, which mostly keeps the same set of events as before.
The new
eio.runtime_events
library defines the events and their types.lib_eio/core/trace.ml
now uses this instead of using CTF.examples/trace/main.ml
shows how to subscribe to events.One slight difference is that
current_thread
has gone. It is now up to the reader to remember which thread was active. In a few places this meant recording e.g. reading a promise at the point where the fiber is resumed, not when it is enqueued.Ctx_unix
is gone. Eio tracing is now enabled whenever OCaml tracing is.This is based on @TheLortex's #554 PR, but stripped down to make reviewing easier. The main changes relative to that PR are:
eio.runtime_events
exposes a typed API for reading events, rather than exposing the types and events directly.Tracing_common
is gone.Missing features from that PR can be added in follow-on PRs.