The NetBSD Project

CVS log for src/usr.bin/make/trace.c

[BACK] Up to [cvs.NetBSD.org] / src / usr.bin / make

Request diff between arbitrary revisions


Default branch: MAIN
Current tag: MAIN


Revision 1.33 / (download) - annotate - [select for diffs], Tue Mar 28 14:39:31 2023 UTC (12 months, 3 weeks ago) by rillig
Branch: MAIN
CVS Tags: HEAD
Changes since 1.32: +3 -3 lines
Diff to previous 1.32 (colored)

make: declare all common symbols in headers, unexport others

No functional change.

Revision 1.32 / (download) - annotate - [select for diffs], Sat Mar 26 14:02:40 2022 UTC (2 years ago) by rillig
Branch: MAIN
CVS Tags: netbsd-10-base, netbsd-10-0-RELEASE, netbsd-10-0-RC6, netbsd-10-0-RC5, netbsd-10-0-RC4, netbsd-10-0-RC3, netbsd-10-0-RC2, netbsd-10-0-RC1, netbsd-10
Changes since 1.31: +3 -3 lines
Diff to previous 1.31 (colored)

make: prefer 'long long' over 'long' on 32-bit C99 platforms

When sorting the words of an expression numerically using the modifier
':On' (added on 2021-07-30), use 64-bit numbers even on 32-bit
platforms.  A typical use case is comparing file sizes.

When tracing the execution of jobs, fix an integer overflow after 2038.
32-bit platforms that use a pre-C99 compiler still have this problem.

No change to the test suite since most tests simply skip any potential
differences between 32-bit platforms and 64-bit platforms (see
varmod-order-numeric.mk) or already account for both variants (see
varmod-localtime.mk).

Revision 1.31 / (download) - annotate - [select for diffs], Sat Feb 5 00:26:21 2022 UTC (2 years, 2 months ago) by rillig
Branch: MAIN
Changes since 1.30: +9 -2 lines
Diff to previous 1.30 (colored)

make: improve C90 support

Do not use inline functions, remove trailing comma in enum declaration,
do not use 'long long' for printing a timestamp.  This re-introduces the
Year 2038 Problem for pre-C99 compilers when printing the trace log, but
that is a seldom used feature.

Revision 1.30 / (download) - annotate - [select for diffs], Wed Dec 15 12:58:01 2021 UTC (2 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.29: +6 -4 lines
Diff to previous 1.29 (colored)

make: format comments according to /usr/share/misc/style

Assisted by indent(1), with manual corrections due to its many remaining
bugs.

No functional change.

Revision 1.29 / (download) - annotate - [select for diffs], Tue Sep 21 23:06:18 2021 UTC (2 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.28: +3 -3 lines
Diff to previous 1.28 (colored)

make: reduce relocations, thereby reducing .text size

No functional change.

Revision 1.28 / (download) - annotate - [select for diffs], Fri Feb 5 05:15:12 2021 UTC (3 years, 2 months ago) by rillig
Branch: MAIN
CVS Tags: cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x
Changes since 1.27: +3 -3 lines
Diff to previous 1.27 (colored)

make: in the Var_ functions, move the scope to the front

This change provides for a more natural reading order in the code.
Placing the scope first makes it immediately clear in which context the
remaining parameters are interpreted.

No functional change.

Revision 1.27 / (download) - annotate - [select for diffs], Thu Feb 4 21:33:14 2021 UTC (3 years, 2 months ago) by rillig
Branch: MAIN
Changes since 1.26: +3 -3 lines
Diff to previous 1.26 (colored)

make: rename some VAR constants to SCOPE

The word "context" does not fit perfectly to the variables that are
associate with a GNode, as the context is usually something from the
outside and the variables are more like properties inherent to the
GNode.

The term "global context" fits even less.  Since the thing where
variables are looked up is commonly named a scope, use that term
instead.

This commit only renames the global variables VAR_GLOBAL, VAR_INTERNAL
and VAR_CMDLINE, plus a few very closely related comments.  These are:

	GNode.vars (because of line breaks)
	GNode_Free (dito)
	varname-make_print_var_on_error.mk
	varname-make_print_var_on_error-jobs.mk

The debug message in Var_Stats is left as-is since there is no unit test
for it yet.

The other renamings (variable names "context", "ctxt", as well as
further comments) will be done in a follow-up commit.

Revision 1.26 / (download) - annotate - [select for diffs], Tue Jan 19 20:51:46 2021 UTC (3 years, 2 months ago) by rillig
Branch: MAIN
Changes since 1.25: +4 -4 lines
Diff to previous 1.25 (colored)

make(1): remove do-not-format markers from comments

These markers had been used inconsistently.  Furthermore the source code
had not been formatted automatically before 2020 at all, otherwise there
wouldn't have been any trailing whitespace left.

Revision 1.25 / (download) - annotate - [select for diffs], Sun Dec 20 14:32:13 2020 UTC (3 years, 3 months ago) by rillig
Branch: MAIN
Changes since 1.24: +5 -4 lines
Diff to previous 1.24 (colored)

make(1): change return type of Var_Value to FStr

Revision 1.24 / (download) - annotate - [select for diffs], Sat Dec 12 10:21:50 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.23: +3 -3 lines
Diff to previous 1.23 (colored)

make(1): move Job.xtraced to ShellWriter

This flag was placed wrong in the Job since it is only necessary as long
as the shell commands are written to the shell file.

Resetting it in JobStart and JobExec was completely misguided since that
is far away from writing the shell commands; this should have been done
in JobPrintCommands instead.

The status of this flag doesn't need to be printed in debugging mode
since it is controlled by a single command line option (-dx) and does
not interact with all the other switches.

Revision 1.23 / (download) - annotate - [select for diffs], Thu Dec 10 21:33:25 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.22: +3 -3 lines
Diff to previous 1.22 (colored)

make(1): unpack struct JobFlags

The job flags are only used individually.

Revision 1.22 / (download) - annotate - [select for diffs], Thu Dec 10 20:49:11 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.21: +7 -4 lines
Diff to previous 1.21 (colored)

make(1): split JobFlags into separate fields

Having all these flags in a single bitmask makes it harder to see where
exactly they can possibly be used since their state could also be
modified using the unsuspicious job->flags = 0.  Using individual names
just leaves the single memset, and that is only used during
initialization.

Revision 1.21 / (download) - annotate - [select for diffs], Sat Oct 31 22:05:56 2020 UTC (3 years, 5 months ago) by rillig
Branch: MAIN
Changes since 1.20: +4 -2 lines
Diff to previous 1.20 (colored)

make(1): document possible undefined behavior in trace.c with .CURDIR

Revision 1.20 / (download) - annotate - [select for diffs], Fri Oct 30 20:30:44 2020 UTC (3 years, 5 months ago) by rillig
Branch: MAIN
Changes since 1.19: +3 -3 lines
Diff to previous 1.19 (colored)

make(1): change char * to void * in Var_Value

The only purpose of the parameter freeIt is to free the memory
associated with the return value.  To do this, no pointer arithmetic is
needed.  Therefore, change to a void pointer, to catch accidental use of
that pointer.

Revision 1.19 / (download) - annotate - [select for diffs], Mon Oct 5 19:27:47 2020 UTC (3 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.18: +2 -5 lines
Diff to previous 1.18 (colored)

make(1): revert previous commit

It had accidentally reverted all the work from the past few days.

Revision 1.18 / (download) - annotate - [select for diffs], Mon Oct 5 19:24:29 2020 UTC (3 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.17: +3 -0 lines
Diff to previous 1.17 (colored)

make(1): fix double-free bug in -DCLEANUP mode (since 2020-10-02)

The bug had been introduced with dir.c 1.155 on 2020-10-02 22:20:25.  In
that commit, openDirectories was replaced with a combination of a list
with a hash table, for more efficient lookup by name.

Upon cleanup, OpenDirs_Done is called, which in turn called
Dir_ClearPath.  Dir_ClearPath takes full ownership of the given list and
empties it.  This was no problem before since afterwards the list was
empty and calling Lst_Free just frees the remaining list pointer.

With OpenDirs, this list was combined with a hash table, and the hash
table contains the list nodes, assuming that the OpenDirs functions have
full ownership of both the list and the hash table.  This assumption was
generally correct, except for the one moment during cleanup where full
ownership of the list was passed to Dir_ClearPath, while the hash table
still contained pointers to the (now freed) list nodes.  This by itself
was not a problem since the hash table would be freed afterwards.  But
as part of Dir_ClearPath, OpenDirs_Remove was called, which looked up
the freed directory by name and now found the freed list node, trying to
free it again.  Boom.

Fixed by replacing the call to Dir_ClearPath with code that only frees
the directories, without giving up control over the list.

Revision 1.17 / (download) - annotate - [select for diffs], Sat Oct 3 21:52:50 2020 UTC (3 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.16: +2 -5 lines
Diff to previous 1.16 (colored)

make(1): clean up #include sections

Revision 1.16 / (download) - annotate - [select for diffs], Sun Sep 13 15:15:51 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.15: +3 -11 lines
Diff to previous 1.15 (colored)

make(1): clean up RCSID blocks

These blocks mostly consisted of redundant structure, following the same
#ifndef pattern over and over, with only minimal variation.

It's easier to maintain if the common structure is only written once and
encapsulated in a macro.

To avoid "defined but unused" warnings from GCC in the case where
MAKE_NATIVE is not defined, I had to add volatile.  Adding
MAKE_ATTR_UNUSED alone would not preserve the rcsid variable in the
resulting binary.

Revision 1.15 / (download) - annotate - [select for diffs], Mon Aug 3 20:26:09 2020 UTC (3 years, 8 months ago) by rillig
Branch: MAIN
Changes since 1.14: +4 -4 lines
Diff to previous 1.14 (colored)

make(1): no declaration-after-statement anymore

NetBSD make is intended to be maximally portable, therefore it uses only
C89.  This was not declared in the Makefile before.

There are still a few places in parse.c and metachar.c that use
end-of-line comments.  These will be fixed in a follow-up commit.

Revision 1.14 / (download) - annotate - [select for diffs], Sat Aug 1 09:55:00 2020 UTC (3 years, 8 months ago) by rillig
Branch: MAIN
Changes since 1.13: +5 -5 lines
Diff to previous 1.13 (colored)

make(1): avoid calls to free(3) in the common case of a NULL pointer

Revision 1.13 / (download) - annotate - [select for diffs], Sat Aug 1 09:25:36 2020 UTC (3 years, 8 months ago) by rillig
Branch: MAIN
Changes since 1.12: +4 -4 lines
Diff to previous 1.12 (colored)

make(1): let Var_Value return a const char *

The return value must not be modified anyway, so let the compiler check
this for free.

Revision 1.12 / (download) - annotate - [select for diffs], Fri Jul 3 08:13:23 2020 UTC (3 years, 9 months ago) by rillig
Branch: MAIN
Changes since 1.11: +4 -4 lines
Diff to previous 1.11 (colored)

make(1): remove trailing whitespace

Revision 1.11 / (download) - annotate - [select for diffs], Sun Dec 28 18:31:51 2008 UTC (15 years, 3 months ago) by christos
Branch: MAIN
CVS Tags: yamt-pagecache-tag8, yamt-pagecache-base9, yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6, yamt-pagecache-base5, yamt-pagecache-base4, yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, yamt-pagecache, tls-maxphys-base, tls-maxphys, tls-earlyentropy-base, tls-earlyentropy, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3, riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2, prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, phil-wifi-base, phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, phil-wifi-20191119, phil-wifi-20190609, phil-wifi, pgoyette-localcount-base, pgoyette-localcount-20170426, pgoyette-localcount-20170320, pgoyette-localcount-20170107, pgoyette-localcount-20161104, pgoyette-localcount-20160806, pgoyette-localcount-20160726, pgoyette-localcount, pgoyette-compat-merge-20190127, pgoyette-compat-base, pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, pgoyette-compat-0728, pgoyette-compat-0625, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315, pgoyette-compat, perseant-stdc-iso10646-base, perseant-stdc-iso10646, netbsd-9-base, netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1, netbsd-9, netbsd-8-base, netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1, netbsd-8, netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, netbsd-7-base, netbsd-7-2-RELEASE, netbsd-7-1-RELEASE, netbsd-7-1-RC2, netbsd-7-1-RC1, netbsd-7-1-2-RELEASE, netbsd-7-1-1-RELEASE, netbsd-7-1, netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1, netbsd-7-0-2-RELEASE, netbsd-7-0-1-RELEASE, netbsd-7-0, netbsd-7, netbsd-6-base, netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1-5-RELEASE, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE, netbsd-6-1, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-6-RELEASE, netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE, netbsd-6-0-3-RELEASE, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, netbsd-6-0, netbsd-6, matt-premerge-20091211, matt-nb8-mediatek-base, matt-nb8-mediatek, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus, matt-mips64-premerge-20101231, localcount-20160914, jym-xensuspend-nbase, jym-xensuspend-base, jym-xensuspend, is-mlppp-base, is-mlppp, dholland-make-base, cherry-xenmp-base, cherry-xenmp, bouyer-socketcan-base1, bouyer-socketcan-base, bouyer-socketcan, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2, agc-symver-base, agc-symver
Changes since 1.10: +5 -5 lines
Diff to previous 1.10 (colored)

prepare for time_t 64

Revision 1.10 / (download) - annotate - [select for diffs], Mon Apr 28 20:24:14 2008 UTC (15 years, 11 months ago) by martin
Branch: MAIN
CVS Tags: yamt-pf42-base4, yamt-pf42-base3, yamt-pf42-base2, wrstuden-revivesa-base-3, wrstuden-revivesa-base-2, wrstuden-revivesa-base-1, wrstuden-revivesa-base, wrstuden-revivesa, netbsd-5-base, netbsd-5-2-RELEASE, netbsd-5-2-RC1, netbsd-5-2-3-RELEASE, netbsd-5-2-2-RELEASE, netbsd-5-2-1-RELEASE, netbsd-5-2, netbsd-5-1-RELEASE, netbsd-5-1-RC4, netbsd-5-1-RC3, netbsd-5-1-RC2, netbsd-5-1-RC1, netbsd-5-1-5-RELEASE, netbsd-5-1-4-RELEASE, netbsd-5-1-3-RELEASE, netbsd-5-1-2-RELEASE, netbsd-5-1-1-RELEASE, netbsd-5-1, netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-RC3, netbsd-5-0-RC2, netbsd-5-0-RC1, netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, netbsd-5-0, netbsd-5, matt-nb5-pq3-base, matt-nb5-pq3, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-premerge-20091211, matt-nb5-mips64-k15, matt-nb5-mips64, matt-nb4-mips64-k7-u2a-k9b, matt-mips64-base2, hpcarm-cleanup-nbase
Changes since 1.9: +3 -10 lines
Diff to previous 1.9 (colored)

Remove clause 3 and 4 from TNF licenses

Revision 1.9 / (download) - annotate - [select for diffs], Fri Feb 15 21:29:50 2008 UTC (16 years, 2 months ago) by christos
Branch: MAIN
CVS Tags: yamt-pf42-baseX, yamt-pf42-base, matt-armv6-nbase, keiichi-mipv6-nbase, keiichi-mipv6-base, keiichi-mipv6, hpcarm-cleanup-base
Branch point for: yamt-pf42
Changes since 1.8: +7 -7 lines
Diff to previous 1.8 (colored)

back all changes out until I fix it properly.

Revision 1.8 / (download) - annotate - [select for diffs], Thu Feb 14 22:11:20 2008 UTC (16 years, 2 months ago) by christos
Branch: MAIN
CVS Tags: christos-broken
Changes since 1.7: +10 -10 lines
Diff to previous 1.7 (colored)

- use pid_t/size_t as appropriate instead of int.
- use %ld to print pids.
- fix a bit of lint.
- WARNS=4

Revision 1.7 / (download) - annotate - [select for diffs], Wed Jan 4 21:35:44 2006 UTC (18 years, 3 months ago) by dsl
Branch: MAIN
CVS Tags: wrstuden-fixsa-newbase, wrstuden-fixsa-base-1, wrstuden-fixsa-base, wrstuden-fixsa, netbsd-4-base, netbsd-4-0-RELEASE, netbsd-4-0-RC5, netbsd-4-0-RC4, netbsd-4-0-RC3, netbsd-4-0-RC2, netbsd-4-0-RC1, netbsd-4-0-1-RELEASE, netbsd-4-0, netbsd-4, matt-mips64-base, matt-mips64, matt-armv6-prevmlocking, matt-armv6-base, matt-armv6, hpcarm-cleanup, cube-autoconf-base, cube-autoconf, chap-midi-nbase, chap-midi-base, chap-midi, abandoned-netbsd-4-base, abandoned-netbsd-4
Changes since 1.6: +5 -5 lines
Diff to previous 1.6 (colored)

Expunge last references to jobTokensFree

Revision 1.6 / (download) - annotate - [select for diffs], Fri May 7 00:04:40 2004 UTC (19 years, 11 months ago) by ross
Branch: MAIN
CVS Tags: netbsd-3-base, netbsd-3-1-RELEASE, netbsd-3-1-RC4, netbsd-3-1-RC3, netbsd-3-1-RC2, netbsd-3-1-RC1, netbsd-3-1-1-RELEASE, netbsd-3-1, netbsd-3-0-RELEASE, netbsd-3-0-RC6, netbsd-3-0-RC5, netbsd-3-0-RC4, netbsd-3-0-RC3, netbsd-3-0-RC2, netbsd-3-0-RC1, netbsd-3-0-3-RELEASE, netbsd-3-0-2-RELEASE, netbsd-3-0-1-RELEASE, netbsd-3-0, netbsd-3
Changes since 1.5: +4 -4 lines
Diff to previous 1.5 (colored)

Simplify build, no functional changes.

Instead of adding MAKE_BOOTSTRAP for hosted environments, i.e., when
you want things simple, instead add MAKE_NATIVE to get those hugely
important features like __RCSID().

It's now possible to build make on some hosts with: cc *.c */*.c

Revision 1.5 / (download) - annotate - [select for diffs], Sat Jun 15 18:24:58 2002 UTC (21 years, 10 months ago) by wiz
Branch: MAIN
CVS Tags: netbsd-2-0-base, fvdl_fs64_base
Branch point for: netbsd-2-0
Changes since 1.4: +8 -10 lines
Diff to previous 1.4 (colored)

Remove !__STDC__ stuff, de-__P(), ANSIfy, and de-register.

Revision 1.4 / (download) - annotate - [select for diffs], Sun Jan 27 01:50:55 2002 UTC (22 years, 2 months ago) by reinoud
Branch: MAIN
CVS Tags: netbsd-1-6-base, netbsd-1-6-RELEASE, netbsd-1-6-RC3, netbsd-1-6-RC2, netbsd-1-6-RC1, netbsd-1-6-PATCH002-RELEASE, netbsd-1-6-PATCH002-RC4, netbsd-1-6-PATCH002-RC3, netbsd-1-6-PATCH002-RC2, netbsd-1-6-PATCH002-RC1, netbsd-1-6-PATCH002, netbsd-1-6-PATCH001-RELEASE, netbsd-1-6-PATCH001-RC3, netbsd-1-6-PATCH001-RC2, netbsd-1-6-PATCH001-RC1, netbsd-1-6-PATCH001, netbsd-1-6
Changes since 1.3: +6 -6 lines
Diff to previous 1.3 (colored)

Fix major bug in make(1) ... due to shadowing of the dotLast path used for
the .DOTLAST primitive by a boolean variable with the same name, this whole
mechanism was broken ... it doesn't save much stat calls but it was wrong.

Thanks to Jason Thorpe for the other shadow-variable fixing patches he
made.

Revision 1.3 / (download) - annotate - [select for diffs], Tue Jan 23 02:48:05 2001 UTC (23 years, 3 months ago) by cgd
Branch: MAIN
Changes since 1.2: +4 -4 lines
Diff to previous 1.2 (colored)

<sys/time.h>, rather than <time.h>.  The former is actually the documented
way to get gettimeofday(), etc.  On some systems on which you might want
to host make (e.g. solaris), <time.h> won't get you a struct timeval
definition.

Revision 1.2 / (download) - annotate - [select for diffs], Sat Dec 30 16:38:22 2000 UTC (23 years, 3 months ago) by sommerfeld
Branch: MAIN
Changes since 1.1: +5 -4 lines
Diff to previous 1.1 (colored)

Include token counts in trace output.
Don't let tokensFree go negative.

Revision 1.1 / (download) - annotate - [select for diffs], Fri Dec 29 23:11:08 2000 UTC (23 years, 3 months ago) by sommerfeld
Branch: MAIN

Quick and dirty trace mechanism to make it easier to look at how different
parallel make job distribution algorithms work in practice.

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.




CVSweb <webmaster@jp.NetBSD.org>