|
Ran
|
Jobs
1
|
Files
89
|
Run time
1min
|
Badge
README BADGES
|
push
github
Optionally return PC position in jit.util.tracesnap(). Suggested by Sergey Bronnikov. (cherry picked from commit 8e6520a7a) The optional `getpos` argument is needed for ljopt [1], a tool that verifies the correctness of LuaJIT optimizations by translating the recorded IR into SMT-LIB and checking the formulas with an SMT solver. Traces often lack sufficient information for accurate modeling, so ljopt extracts the address of the bytecode pointed to by the snapshot directly from LuaJIT during execution. The LuaJIT internal API includes the function `jit.util.tracesnap(tr, sn)`. In principle, this function could be extended to return the program counter (pc). This patch does exactly that: an optional third argument is added, and when it is truthy the second value returned by `jit.util.tracesnap()` is the PC position of the snapshot in the bytecode of the function where the trace starts. Also, the patch adds a test that records a root loop trace and checks that the returned position is the `FORL` jump target (the loop entry), that no position is returned without the optional argument or with a false value, and that every snapshot of the trace reports a valid bytecode offset. 1. https://github.com/ligurio/ljopt Sergey Bronnikov: * added the description and the test for the feature
12784 of 15771 branches covered (81.06%)
Branch coverage included in aggregate %.
6 of 6 new or added lines in 1 file covered. (100.0%)
11 existing lines in 3 files now uncovered.21953 of 23565 relevant lines covered (93.16%)
3854444.62 hits per line
| Lines | Coverage | ∆ | File |
|---|---|---|---|
| 5 |
71.5
|
-0.52% | src/lj_opt_fold.c |
| 4 |
81.99
|
-0.38% | src/lj_crecord.c |
| 2 |
84.65
|
0.3% | src/lj_alloc.c |
| ID | Job ID | Ran | Files | Coverage | |
|---|---|---|---|---|---|
| 1 | 37769463606.1 | 89 |
88.31
|
GitHub Action Run |
| Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line | Branch Hits | Branch Misses |
|---|