@yuneta/gobj-js 7.13.6 → 7.13.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -627,9 +627,26 @@ gobj_global_trace_level() // the mask in force
627
627
  gobj_trace_level(gobj) // global | gclass | gobj, combined
628
628
  gobj_repr_global_trace_levels() // [{name, bit, description, set}]
629
629
  gobj_set_deep_trace(1) // everything, everywhere
630
- gobj_set_trace_machine_format(1) // 1 = one compact line per transition
630
+ gobj_set_trace_machine_format(1) // 1 = simpler (DEFAULT), 0 = legacy
631
631
  ```
632
632
 
633
+ **Two shapes for the machine trace**, the C kernel's two, and the same default
634
+ (`1`, since 7.13.7):
635
+
636
+ ```
637
+ 1 🔄 EV_TIMEOUT C_TIMER^t ST_IDLE from C_TIMER^t
638
+ 0 🔄 mach(C_TIMER^t), st: ST_IDLE, ev: EV_TIMEOUT, ac: fi(), from(C_TIMER^t)
639
+ 🔀🔀 mach(C_TIMER^t), new st(ST_IDLE), prev st(ST_IDLE)
640
+ <- mach(C_TIMER^t), st: ST_IDLE, ev: EV_TIMEOUT, ret: 0
641
+ ```
642
+
643
+ One line per transition against three. Both name the event, so anything that
644
+ reads the trace back by event name works across the switch. Every line is
645
+ prefixed by its nesting depth (two spaces per level of `__inside__`), so an
646
+ event sent from inside another one's action is indented under it — **keep that
647
+ indentation when you render the line somewhere else**; it is the only thing
648
+ that says a transition happened *during* another.
649
+
633
650
  Levels: `machine`, `create_delete`, `create_delete2`, `subscriptions`,
634
651
  `start_stop`, `ev_kw`, `authzs`, `states`, `gbuffers`, `timer`, `fs`,
635
652
  `liburing`, `timer_periodic`, `liburing_timer`, `commands`. The ones that only
@@ -384,7 +384,7 @@ var Event_Type = class {
384
384
  function tab() {
385
385
  return " ".repeat(Math.max(1, __inside__ * 2));
386
386
  }
387
- var __trace_machine_format__ = 0;
387
+ var __trace_machine_format__ = 1;
388
388
  function gobj_set_trace_machine_format(format) {
389
389
  __trace_machine_format__ = Number(format) === 1 ? 1 : 0;
390
390
  }