lp:pmake

Created by VCS imports on 2005-12-31 and last modified on 2020-11-30
Get this branch:
bzr branch lp:pmake

Related bugs

Related blueprints

Branch information

Owner:
VCS imports
Project:
pmake
Status:
Development

Import details

Import Status: Reviewed

This branch is an import of the CVS module src/usr.bin/make from :pserver:anoncvs:anoncvs@anoncvs.NetBSD.org:/cvsroot.

The next import is scheduled to run in 6 hours.

Last successful import was 5 hours ago.

Import started 5 hours ago on alnitak and finished 5 hours ago taking 40 seconds — see the log
Import started 18 hours ago on alnitak and finished 18 hours ago taking 40 seconds — see the log
Import started on 2020-11-29 on alnitak and finished on 2020-11-29 taking 50 seconds — see the log
Import started on 2020-11-29 on alnitak and finished on 2020-11-29 taking 1 minute — see the log
Import started on 2020-11-28 on alnitak and finished on 2020-11-28 taking 50 seconds — see the log
Import started on 2020-11-28 on alnitak and finished on 2020-11-28 taking 40 seconds — see the log
Import started on 2020-11-27 on alnitak and finished on 2020-11-27 taking 40 seconds — see the log
Import started on 2020-11-27 on alnitak and finished on 2020-11-27 taking 30 seconds — see the log
Import started on 2020-11-26 on alnitak and finished on 2020-11-26 taking 40 seconds — see the log
Import started on 2020-11-26 on alnitak and finished on 2020-11-26 taking 30 seconds — see the log

Recent revisions

3523. By sjg 6 hours ago

Add some tests for meta mode

3522. By rillig 6 hours ago

make(1): document how short-circuit evaluation behaved on 2020-07-03

3521. By rillig on 2020-11-29

make(1): initialize global variables in dir.c

Calling CachedDir_Assign requires that the variable be initialized. On
most systems, NULL is represented as all-zero bits already. This change
is only for the few other systems.

Add some comments explaining the implementation of Dir_AddDir since that
is tricky to read from the code alone.

3520. By rillig on 2020-11-29

make(1): reduce memory allocation in meta_oodate

3519. By rillig on 2020-11-29

make(1): reduce memory allocation in meta mode

3518. By rillig on 2020-11-29

make(1): clean up memory management for CachedDirs

Previously, the reference count for a newly created CacheDir had been
set to 1 in CacheNewDir. This was wrong because at that point, the
object had not been referenced by any nonlocal variable. The reference
count is no longer incremented at this point.

All callers of CacheNewDir either append the newly created CachedDir to
a SearchPath via Lst_Append and CachedDir_Ref, or they assign it to a
global variable via CachedDir_Assign.

Since the reference count is no longer wrongly incremented, it does not
need to be decremented more than necessary in Dir_End. To keep the code
simple and maintainable, all assignments to global variables are now
handled by CachedDir_Assign. Adding a CachedDir to a list is still done
manually via Lst_Append, and the corresponding code for decrementing is
in SearchPath_Clean and SearchPath_Free. These details may be cleaned
up in a follow-up commit.

As a result, when OpenDirs_Done is called in the unit tests, the list of
open directories is empty. It had been non-empty in a single unit test
before (dep-wildcards.mk), as a result of calling Dir_Expand.

The additional debug logging for the reference counting is not enabled
by default since it contains memory addresses, which makes the output
dependent on the memory allocator.

The function CachedDir_Destroy has been merged into CachedDir_Undef,
which had only been used in Dir_End before. The new name emphasizes
that it corresponds to CachedDir_Ref.

3517. By rillig on 2020-11-29

make(1): add test variant for reference counting logging

3516. By rillig on 2020-11-29

make(1): fix the reference count of dotLast going negative

The memory management for dotLast is quite simple. It is initialized
exactly once main_Init > Init_Objdir > Dir_InitDir and freed exactly
once in main_CleanUp > Dir_End. Previously, dotLast was not freed at all.

The first call to CachedDir_Unref decremented the refCount to 0 but
didn't free anything. Next, CachedDir_Destroy was called, which
decremented the reference count to -1, therefore skipping the actual
freeing. This was probably an implementation mistake.

Since Dir_End is called at the very end of main_CleanUp, no code
accesses dotLast after it has been freed.

3515. By rillig on 2020-11-29

make(1): move CachedDir_Destroy up to the related functions

3514. By rillig on 2020-11-29

make(1): extract CachedDir_Free0 from CachedDir_Destroy

Branch metadata

Branch format:
Branch format 7
Repository format:
Bazaar repository format 2a (needs bzr 1.16 or later)
This branch contains Public information 
Everyone can see this information.

Subscribers

No subscribers.