Commit bef2d03
committed
Merge #288: Generic BitMachine execution tracker
36ff961 CI: check that documentation builds without errors (Michael Zaikin)
8ff9bab Extend tracker trait with jet call tracing (Michael Zaikin)
Pull request description:
This PR generalizes `CaseTracker` to `ExecTracker` that now supports tracking jet calls (in addition to case branches). It is also now possible to run BitMachine with a custom tracker created outside of the crate.
This mechanim allows to implement jet tracer which pretty-prints jet arguments/result for each invocation, see https://github.com/m-kus/simfony/pull/2/files#diff-13e8b158f84f88059e0bd8631dfa9113112e30d7b8c21a15413d0ef36d2ea180
As a follow up it is proposed to further extend `ExecTracker` trait to allow visitor pattern on case/assert expressions. That would enable debug logging, similar to https://github.com/uncomputable/simfony-webide/blob/adb60d4e60c0d6b019ea13f64b1a166da3467d8d/src/function.rs#L145
Having these two features (jet calls tracking and debug symbols) combined it's fairly simple to output weighted stack traces (e.g. in pprof) and build a Simfony profiler.
ACKs for top commit:
apoelstra:
ACK 36ff961; successfully ran local tests
uncomputable:
ACK 36ff961
Tree-SHA512: e28f349eaf11dbe442413ebeb5018f9c7694d5a5d4d5cd37a05f793f89423cc2ca4e3337bc48128c551bf95e4617d016bf1fc8434d5090c9951773d8e5b469bd2 files changed
Lines changed: 51 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
| |||
242 | 243 | | |
243 | 244 | | |
244 | 245 | | |
245 | | - | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
246 | 252 | | |
247 | 253 | | |
248 | 254 | | |
| |||
371 | 377 | | |
372 | 378 | | |
373 | 379 | | |
374 | | - | |
| 380 | + | |
375 | 381 | | |
376 | 382 | | |
377 | 383 | | |
| |||
408 | 414 | | |
409 | 415 | | |
410 | 416 | | |
411 | | - | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
412 | 423 | | |
413 | 424 | | |
414 | 425 | | |
| |||
494 | 505 | | |
495 | 506 | | |
496 | 507 | | |
497 | | - | |
| 508 | + | |
498 | 509 | | |
499 | 510 | | |
500 | 511 | | |
501 | 512 | | |
502 | 513 | | |
503 | 514 | | |
| 515 | + | |
| 516 | + | |
504 | 517 | | |
505 | 518 | | |
506 | 519 | | |
| |||
510 | 523 | | |
511 | 524 | | |
512 | 525 | | |
513 | | - | |
514 | | - | |
| 526 | + | |
515 | 527 | | |
516 | | - | |
| 528 | + | |
517 | 529 | | |
518 | 530 | | |
519 | 531 | | |
520 | 532 | | |
521 | | - | |
| 533 | + | |
522 | 534 | | |
523 | 535 | | |
524 | 536 | | |
525 | 537 | | |
526 | 538 | | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
527 | 548 | | |
528 | 549 | | |
529 | 550 | | |
530 | 551 | | |
531 | | - | |
| 552 | + | |
532 | 553 | | |
533 | 554 | | |
534 | 555 | | |
| |||
545 | 566 | | |
546 | 567 | | |
547 | 568 | | |
| 569 | + | |
548 | 570 | | |
549 | | - | |
| 571 | + | |
550 | 572 | | |
551 | | - | |
| 573 | + | |
552 | 574 | | |
553 | 575 | | |
554 | 576 | | |
555 | 577 | | |
556 | 578 | | |
557 | 579 | | |
558 | 580 | | |
| 581 | + | |
| 582 | + | |
559 | 583 | | |
560 | 584 | | |
561 | | - | |
| 585 | + | |
562 | 586 | | |
563 | 587 | | |
564 | 588 | | |
| 589 | + | |
| 590 | + | |
565 | 591 | | |
566 | 592 | | |
567 | 593 | | |
| |||
0 commit comments