[Feature] Join Free Pascal and Delphi (Linux) profile frames to the functions they ran
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
Research direction
Read the linked guide at docs/architecture/runtime-evidence-languages.md#joining-profile-frames and inspect packages/core/src/repowise/core/frame_resolver.py, especially the language check and _go join. Use the issue’s reproduction to confirm current behavior, then study the fixture and class metrics work for Pascal name spellings and case handling. Done means Pascal frames join to one routine at the stated 95% bar, with other language behavior unchanged; an open pull request is already linked.
Written by the indexing model from the issue text.
Description
@Laex, offering this to you first since you built the Pascal support here. If you want it, just leave a comment and it's yours; otherwise it's open to anyone.
Guide: follow Adding a language to runtime evidence: joining profile frames. It covers the change to frame_resolver.py, the join order, the fixture and the acceptance bar.
Summary
evidence add reads pprof profiles with file and line per frame, and .pas/.pp/.dpr/.lpr frames are tagged pascal, but the resolver joins only Go, Python and JavaScript.
packages/core/src/repowise/core/frame_resolver.py:36, :264
FrameLanguage = Literal["go", "python", "javascript"]
...
if frame.language not in ("go", "python", "javascript"):
return "unsupported_language"
Mechanism
- A Free Pascal (or Delphi Linux64) binary built with DWARF (
-gw3) can be profiled withperf record -gand converted byperf_to_profile(google/perf_data_converter) into pprof that carries source file and line. The pprof reader keeps both (profile_formats/pprof.py:160-188). _go(:303) is the precedent: span by line, second signal from the name, nested functions folded.
Repro
# one.py PATH LANG NAME: one indexed symbol, one frame inside it
import sys
from repowise.core.frame_resolver import ProfileFrame, resolve_frames
from repowise.core.workspace.repo_index import IndexedSymbol
path, lang, fn = sys.argv[1:4]
sym = IndexedSymbol(f"{path}::{fn}", fn, fn, "method", "", path, 1, 20, "public", lang)
r = resolve_frames([ProfileFrame(f"/repo/{path}", 5, lang, fn)], root="/repo", symbols_by_file={path: [sym]})
print(r.skipped)
python one.py src/cart.pas pascal Total:
{'unsupported_language': 1}
Done looks like
- Add
pascaltoFrameLanguageand a_pascaljoin: span by line, then a second signal from the frame name. FPC's assembler names join unit, class and method with$_$-style separators; read the real spellings off the fixture. - Match out-of-line methods (
TCart.Total) case-insensitively, as the class metrics work does. Fold nested procedures into their parent. - Must not change: other languages.
Tests
A small FPC program profiled with perf and converted with perf_to_profile, checked in as .pb.gz with sources. At least 95% of repo samples join to one routine.
- Dominant language
- Python
- Stars
- 7.1k
- Forks
- 756
- Avg merge
- 21h 5m
- Merged PRs (30d)
- 797
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from repowise-dev/repowise
-
[Bug] Elixir `.formatter.exs`, `.credo.exs`, `config/*.exs` and `priv/**/*.exs` are reported as unreachable filesPossibly taken @ZYZ666-RGB claimed this 1 day ago. Openbug good first issue
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
repowise-dev/repowise#6296 · 1 comment ·
Maintainers usually reply within 1 day
-
[Bug] Coverage stack detection omits Swift, Dart, and Scala, falling through to UNKNOWN in evidence setupPossibly taken @RishabhIIITD claimed this 2 days ago. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
repowise-dev/repowise#5838 · 2 comments ·
Maintainers usually reply within 1 day
-
[Bug] PR-mined decisions store the decision sentence again as their rationalePossibly taken @suyashgitt claimed this 11 days ago. Openbug good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
repowise-dev/repowise#5702 · 2 comments ·
Maintainers usually reply within 1 day
-
[Bug] CICS CSD `DEFINE _PGMLIST` startup programs (`_PGMPH`) are not rootsPossibly taken @dchaudhari7177 claimed this 34 days ago. Openbug good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
repowise-dev/repowise#4477 ·
Maintainers usually reply within 1 day
-
[Bug] COBOL listing directives EJECT, SKIP1/SKIP2/SKIP3 and TITLE fail to parse and drop the rest of the filePossibly taken @dchaudhari7177 claimed this 34 days ago. Openbug good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 91/100
repowise-dev/repowise#4474 ·
Maintainers usually reply within 1 day
All issues in repowise-dev/repowise
Similar issues
-
triage
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
kornia/kornia-rs#1416 · 1 comment ·
Maintainers usually reply within 2 days
-
ui
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
PolicyEngine/ai-inequality#64 ·
Maintainers usually reply within 1 day
-
LinearGaussianStateSpace.dist splits states and observations wrongly when the transition varies over timePossibly taken @PabloRoque claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
pymc-devs/pymc-extras#839 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day