summaryrefslogtreecommitdiffstats
path: root/src/build_log.cc
Commit message (Collapse)AuthorAgeFilesLines
* Fix AIX compilation error related to printf macrosMike Seplowitz2015-08-191-3/+8
| | | | | On AIX, inttypes.h gets indirectly included by build_log.h. It's easiest just to ask for the printf format macros right away.
* Make sure not to re-define __STDC_FORMAT_MACROS.Lindley French2015-07-311-0/+2
|
* Remove 'Recompacting...' messages.Nico Weber2014-12-181-3/+1
| | | | | | | | | | Recompacting the build log used to be slow, so it made sense to print this message. We then made recompaction much faster, but didn't remove this message back then. The deps log only has it because the build log had it. Since both steps are effectively instant in practice, remove these log messages.
* Don't print "Recompacting..." message from tests.Nico Weber2014-09-191-2/+3
| | | | Now tests don't print anything. Non-test behavior is unchanged.
* Make BuildLogUser reference constant.Nico Weber2014-01-071-2/+3
|
* Rename "IsDead" to "BuildLogUser".Nico Weber2014-01-041-4/+5
|
* Remove dead entries in .ninja_log and .ninja_deps while recompacting.Nico Weber2014-01-021-3/+12
| | | | | | | | | | For .ninja_deps, remove objects that have no in-edges or whose in-edges do not have a "deps" attribute. (This matches the behaviour of `-t deps`). BuildLog doesn't know about state, so let its recompact method take delegate that decides is a path is life or not, and implement it in NinjaMain.
* Minor style fixes, no behavior change.Nico Weber2013-08-231-1/+1
|
* Build log write error checking.Nico Weber2013-07-241-7/+14
| | | | Like f6f00aa40f0c541df06, but for the build log instead of the deps log.
* Merge pull request #616 from nico/recompactEvan Martin2013-07-081-1/+1
|\ | | | | Add a 'recompact' tool, which forces recompaction of the build and deps ...
| * Add a 'recompact' tool, which forces recompaction of the build and deps logs.Nico Weber2013-07-081-1/+1
| | | | | | | | This is useful for performance comparisons between two build directories.
* | Fix murmur hash implementations to work on strict alignmentMatthew Dempsky2013-07-081-12/+13
|/ | | | architectures like OpenBSD/mips64el and OpenBSD/hppa64.
* fix all "class" -> "struct"Evan Martin2012-12-291-2/+1
|
* Fix formattingRobert Iannucci2012-11-301-2/+2
|
* build log: fixing parameter namesMaxim Kalaev2012-10-151-6/+6
|
* build log: mini-refactoring to use constructors to initialize entriesMaxim Kalaev2012-10-121-4/+11
|
* build log: moving HashCommand() calculation out of targets loopMaxim Kalaev2012-10-121-1/+2
|
* Add metric for log recompactingPetr Wolf2012-10-041-0/+1
|
* remove config from BuildLog, rename membersEvan Martin2012-09-021-13/+10
|
* make it more explicit that a bad build log causes us to rebuildEvan Martin2012-08-171-3/+6
| | | | | (Committing this on top of b56fe80 since they're related, but I may end up reverting both.)
* windows: fix size_t<->int conversions in ninja.exeEvan Martin2012-08-101-6/+6
|
* Revert "Make StringPiece data members private."Nico Weber2012-07-281-2/+2
| | | | | | This reverts commit 904c9610fe66c4f4bd63a07d6f057c8603d24394. The commit caused issue #380, this revert fixes it. The revert also makes the test from the previous commit pass.
* Merge pull request #352 from tfarina/string-piece-privateEvan Martin2012-07-271-2/+2
|\ | | | | Make StringPiece data members private.
| * Make StringPiece data members private.Thiago Farina2012-06-301-2/+2
| | | | | | | | Signed-off-by: Thiago Farina <tfarina@chromium.org>
* | Minor: zero log buffer before reading data/parsing itMaxim Kalaev2012-07-271-1/+3
| | | | | | | | Not a real problem, mainly to make valgrind happy
* | don't leak file handle on fail-to-upgrade caseScott Graham2012-06-191-0/+1
|/
* switch build log to print hashes as hexEvan Martin2012-06-191-2/+2
| | | | | | Nico convinced me that it's safe to do this without revving the build log format: the old decimal values will still parse as hex (just as different numbers) and cause a superfluous rebuild.
* drop support of log formats < 4Evan Martin2012-06-181-10/+15
| | | | | Log format 4 was introduced in January. There's been plenty of time to migrate.
* use PRIu64 for printing 64-bit in, %d for printing intEvan Martin2012-06-181-2/+4
| | | | Fixes a warning.
* no recompacting needed when log file is emptyPeter Kuemmel2012-06-181-3/+7
|
* Only store command hashes in the build log.Nico Weber2012-06-151-5/+59
| | | | | | | | | | | | | | .build_log load time 350ms -> 17ms, filesize 197MB -> 1.6MB on Mac. On Windows, it's 500ms -> 20ms. Makes the build log a lot less useful for scripts, but there could be a tool for use cases that need log information. A prototype of such a tool is in https://github.com/nico/ninja/commit/1b243d311 The hash function is 64bit murmurhash2. Assuming that that different commands get the same hash only by chance, it's is very unlikely for two different commands to hash to the same value with a 64bit hash.
* Switch LineReader from fgets() to just fread().Nico Weber2012-05-101-5/+33
| | | | | | | | | | | | | | | | | | | | | fgets() needs to search for a \n in the input, and LineReader's strstr() did the same work again. By using fread() directly, this duplicate work can be saved. (I tried using readline() / fgetln() for the same saving, but those functions are not standard, and were slower than the code in this CL.) Results from running build_log_perftest, on OS X: Before: min 369ms max 372ms avg 370.4ms After: min 243ms max 247ms avg 244.8ms On Windows: Before: min 796ms max 904ms avg 858.0ms After: min 359ms max 375ms avg 371.4ms On Linux: Before: min 161ms max 169ms avg 164.8ms Before: min 130ms max 137ms avg 132.6ms
* Pull BuildLog line reading into its own class. No performance or behavior ↵Nico Weber2012-05-101-11/+36
| | | | change.
* Don't write ninja log header to log on every build on Windows.Nico Weber2012-05-081-0/+4
|
* Merge pull request #290 from nico/metricsEvan Martin2012-05-021-0/+2
|\ | | | | Add .ninja_log load time to metrics.
| * Add .ninja_log load time to metrics.Nico Weber2012-05-011-0/+2
| | | | | | | | On my system, it takes 22% of the empty build time for chrome.
* | Fix Windows build.Nico Weber2012-04-301-0/+3
|/
* Include unistd.h where neededBen Boeckel2012-03-281-0/+1
|
* Fix resources leaksPierre Schweitzer2012-03-131-0/+1
|
* Response filesunknown2012-02-091-1/+1
|
* Fix cygwin build by including stdio.h hereokuoku2012-01-251-1/+0
|
* BuildLog: Use Log::insert(Log::value_type()) to avoid invalid strings.Evan Jones2012-01-131-2/+2
| | | | | | | The MSVC std::string implementation copies strings, so using make_pair resulted in a pointer to invalid memory. This ensures the insert uses a StringPiece without an intermediate std::string copy, so the correct pointer ends up in the hash_map.
* convert ExternalStringHash to use StringPieceEvan Martin2012-01-091-4/+4
|
* convert all time_t to a new TimeStamp typeEvan Martin2012-01-051-2/+2
|
* make my last change actually workEvan Martin2012-01-051-2/+2
|
* remove build_log v1/v2 codeEvan Martin2012-01-051-24/+14
|
* Switch build log to use tabs as field separators, to support outputs with ↵Nico Weber2012-01-051-6/+9
| | | | spaces.
* Protect BuildLog data member variables by making them private.Thiago Farina2011-12-201-2/+6
| | | | | | | | | They are not accessed outside of BuildLog and there is even a SetConfig function to set the |config_| variable. So better to make them private to BuildLog now while nobody is using it outside. Signed-off-by: Thiago Farina <tfarina@chromium.org>
* merge FileStat into NodeEvan Martin2011-12-071-1/+1
| | | | | | The two were always one-to-one anyway. I started adding accessors to FileStat and then realized most users wanted them on Node and that forwarding them through was silly.
* Merge pull request #125 from pcc/outputs-readyEvan Martin2011-11-021-14/+25
|\ | | | | CMake requirements: Make-style order-only dependencies, restat rules