Trepan-Debuggers / Trepan-Debuggers/remake

Trace every subprocess created

Open
#155 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
850
Forks
80
PR merge metrics
No merged PRs in 30d

Description

I have a project with fairly large makefiles, and they tend to grow slower over time (even when nothing needs to be done).

Most of this slowdown is because there are many variables instantiated by executing subprocess:

ANSWER=$(shell echo 1 + 41 | bc)

The fix is typically easy (find another way to do it, or at least assign using :=), but the problem is finding all these (and measuring the impact of each, since 100 echos can be much faster than a single bc)

Unfortunately neither make nor remake seem to provide a way to trace this.

$ cat Makefile
ANSWER=$(shell echo 1 + 41 | bc)
all:
	@echo ANSWER=$(ANSWER)%

$ make --debug=all | grep bc
[no output]

$ remake --trace=full | grep bc
[no output]

So it would be nice if remake provided a way to trace every subprocess created by make (and maybe even how long it took to execute).

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the Makefile example and compare make --debug=all with remake --trace=full, confirming that the bc subprocess is not reported. Then inspect the existing tracing entry points and define how every subprocess should be emitted, with execution time included if supported; done means the example's subprocess is traceable.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
build-system, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.