-
Notifications
You must be signed in to change notification settings - Fork 68
Port eventlog to CTF #527
Port eventlog to CTF #527
Conversation
fb6156d
to
90763a9
Compare
Minor nit, but can we clean up the Right now vs mainline OCaml we have the following confusing diff in @@ -61,7 +61,7 @@ toolchain="cc"
profinfo=false
profinfo_width=0
extralibs=
-instrumented_runtime=true
+instrumented_runtime=false
instrumented_runtime_ldlibs=""
# Information about the package
@@ -227,12 +227,11 @@ AC_ARG_ENABLE([dependency-generation],
AC_ARG_VAR([DLLIBS],
[which libraries to use (in addition to -ldl) to load dynamic libs])
-# Disable instrumented-runtime with multicore
AC_ARG_ENABLE([instrumented-runtime],
[AS_HELP_STRING([--enable-instrumented-runtime],
[build the instrumented runtime @<:@default=auto@:>@])],
[],
- [enable_instrumented_runtime=no])
+ [enable_instrumented_runtime=auto])
AC_ARG_ENABLE([vmthreads], [],
[AC_MSG_ERROR([The vmthreads library is no longer available. \ I'm presuming we can revert the changes in the block with the Also it might be nice to comment the line where we have enabled the |
Another thing from a user perspective, do we have instructions on how to switch on and generate a trace using CTF which can be viewed by a user? |
d5b5c3e
to
37b7f73
Compare
runtime/caml/domain_state.tbl
Outdated
DOMAIN_STATE(uintnat, eventlog_startup_timestamp) | ||
DOMAIN_STATE(long, eventlog_startup_pid) | ||
/*****************************************************************************/ | ||
/* Detailed stats */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How have these reappeared? They were removed in #535
runtime/eventlog.c
Outdated
static struct event_buffer* evbuf; | ||
#define evbuf Caml_state->eventlog_buffer | ||
|
||
static int64_t startup_timestamp; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this better as time_t
?
runtime/eventlog.c
Outdated
if (*toggle == 'p') | ||
Caml_state->eventlog_paused = 1; | ||
eventlog_enabled = 1; | ||
// FIXME(engil): disabling eventlog pause on Multicore for now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This probably needs to be fixed?
runtime/eventlog.c
Outdated
} | ||
} | ||
|
||
/* Note that this function does not trigger an actual disk flush, it just | ||
pushes events in the event buffer. | ||
*/ | ||
// FIXME(engil): alloc events are not flushed on Multicore for now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this still an issue?
runtime/eventlog.c
Outdated
@@ -358,26 +409,29 @@ void caml_ev_flush() | |||
|
|||
void caml_eventlog_disable() | |||
{ | |||
Caml_state->eventlog_enabled = 0; | |||
teardown_eventlog(); | |||
// FIXME(engil): disabling runtime eventlog disable on Multicore for now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Likewise, this needs to be fixed.
runtime/eventlog.c
Outdated
CAMLassert(v == Val_unit); | ||
if (Caml_state->eventlog_enabled) | ||
Caml_state->eventlog_paused = 0; | ||
// FIXME(engil): disabling eventlog pause on Multicore for now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto
runtime/eventlog.c
Outdated
if (evbuf && Caml_state->eventlog_out) | ||
flush_events(Caml_state->eventlog_out, evbuf); | ||
}; | ||
// FIXME(engil): disabling eventlog pause on Multicore for now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And this one.
I think we need to address these |
Thanks for your review. I addressed the outstanding issues. I implemented pausing and resume in a way that looks alright. There is one FIXME that I did turn into a TODO, and it's related to the |
This addresses me earlier concerns. Thanks @Engil |
…2+domains+effects+ctf Port eventlog to CTF
…2+domains+effects+ctf Port eventlog to CTF
Still some work to do on this one.
Some bits to refactor:
parallel_minor_gc
) eventlog and this one.I think I may be missing some events that existed in our previous eventlog implementation, I need to check that.