mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
Dump backtraces to an arbitrary stream when using libprocstat
This commit is contained in:
parent
d2cc4437a1
commit
5eef125afe
2 changed files with 20 additions and 20 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);
|
||||
kputs("\n");
|
||||
// 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);
|
||||
kputs("\n");
|
||||
}
|
||||
|
||||
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_vm(prstat, &kp, errout);
|
||||
procstat_close(prstat);
|
||||
kprintf("\n");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue