summaryrefslogtreecommitdiff
path: root/vm_dump.c
diff options
context:
space:
mode:
authorNobuyoshi Nakada <[email protected]>2023-09-26 09:02:37 +0900
committerNobuyoshi Nakada <[email protected]>2023-09-26 09:02:37 +0900
commit5eef125afe0c2b02dd4fc92a393bad95768fd330 ()
tree0095d7a93fb57843fd64d78dc49fd0126db991a5 /vm_dump.c
parentd2cc4437a13c0eda8e1003131a1ceef7050d38b0 (diff)
Dump backtraces to an arbitrary stream when using libprocstat
-rw-r--r--vm_dump.c6
1 files changed, 3 insertions, 3 deletions
@@ -1121,7 +1121,7 @@ rb_vm_bugreport(const void *ctx, FILE *errout)
if (vm && ec) {
rb_vmdebug_stack_dump_raw(ec, ec->cfp, errout);
rb_backtrace_print_as_bugreport(errout);
- fputs("\n", errout);
// If we get here, hopefully things are intact enough that
// we can read these two numbers. It is an estimate because
// we are reading without synchronization.
@@ -1129,7 +1129,7 @@ rb_vm_bugreport(const void *ctx, FILE *errout)
"---------------------------------------------------\n");
kprintf("Total ractor count: %u\n", vm->ractor.cnt);
kprintf("Ruby thread count for this ractor: %u\n", rb_ec_ractor_ptr(ec)->threads.cnt);
- fputs("\n", errout);
}
rb_dump_machine_register(errout, ctx);
@@ -1230,7 +1230,7 @@ rb_vm_bugreport(const void *ctx, FILE *errout)
else {
struct procstat *prstat = procstat_open_sysctl();
kprintf("* Process memory map:\n\n");
- procstat_vm(prstat, &kp);
procstat_close(prstat);
kprintf("\n");
}