• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

tarantool / luajit / 7111529356
89%
tarantool/master: 93%

Build:
Build:
LAST BUILD BRANCH: skaplun/luajit-performance-tests
DEFAULT BRANCH: tarantool/master
Ran 06 Dec 2023 07:36AM UTC
Jobs 1
Files 89
Run time 8s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

06 Dec 2023 07:26AM UTC coverage: 88.375% (-0.07%) from 88.44%
7111529356

push

github

igormunkin
test: rewrite sysprof test using managed execution

Often, tests for sampling profiler require long running loops to be
executed, so a certain situation is likely to occur. Thus, the test
added in commit 285a1b0a1 ("sysprof: fix
crash during FFUNC stream") expects the FFUNC VM state (and even the
particular instruction to be executed) at the moment when stacktrace is
being collected. Unfortunately, it leads to the test routine hang for
several environments, and even if it does not, we cannot guarantee that
the desired scenario is tested (only rely on statistics). As a result,
the test for the aforementioned patch was disabled for Tarantool CI in
the commit fef60a105 ("test: prevent
hanging Tarantool CI by sysprof test") until the issue is not resolved.

This patch introduces the new approach for testing our sampling profiler
via <ptrace>, implementing precise managed execution of the profiled
instance mentioned in tarantool/tarantool#9387.

Instead of running around <tostring> gazillion times, we accurately step
to the exact place where the issue reproduces and manually emit SIGPROF
to the Lua VM being profiled. The particular approach implemented in
this patch is described below.

As it was mentioned, the test makes sysprof collect the particular event
type (FFUNC) at the certain instruction in Lua VM (<lj_fff_res1>) to
reproduce the issue from tarantool/tarantool#8594. Hence, it's enough to
call <tostring> fast function in the profiled instance (i.e., "tracee").
To emit SIGPROF right at <lj_fff_res1> in the scope of <tostring>
builtin, the manager (i.e., "tracer") is implemented.

Here are the main steps (see comments and `man 2 ptrace' for more info):
  1. Poison <int 3> instruction as the first instruction at
     <lj_ff_tostring> to stop at the beginning of the fast function;
  2. Resume the "tracee" from the "tracer";
  3. Hit the emitted interruption, restore the original instruction... (continued)

5343 of 5967 branches covered (0.0%)

Branch coverage included in aggregate %.

20488 of 23262 relevant lines covered (88.07%)

703244.44 hits per line

Uncovered Existing Lines

Lines Coverage ∆ File
5
85.78
0.43% src/lj_sysprof.c
7
89.5
-1.62% src/lj_alloc.c
10
72.64
-1.01% src/lj_crecord.c
Jobs
ID Job ID Ran Files Coverage
1 7111529356.1 06 Dec 2023 07:36AM UTC 89
88.37
GitHub Action Run
Source Files on build 7111529356
  • Tree
  • List 89
  • Changed 86
  • Source Changed 0
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #7111529356
  • 4809378e on github
  • Prev Build on tarantool/release/2.10 (#6943588694)
  • Next Build on tarantool/release/2.10 (#7118518877)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc