153 karma · joined September 15, 2009
http://blog.melski.net/
https://www.informationisbeautiful.net/visualizations/snake-...
"Sandboxing" in a build tool cannot be claimed as Bazel's innovation.
However, Electric Make does emit the output in a deterministic order, in fact in exactly the same order as the build would have produced had it run serially. In practice the delayed output is not such a big deal -- people just don't really seem to care that much, when the build overall finishes 20x - 30x faster than it used to. Electric Make also generates an annotated build log, essentially an XML-marked-up version of the log, which contains a tremendous amount of additional information about the build and vastly simplifies debugging, actually.
1. Electric Make, a high-performance reimplementation of GNU make and ninja, has properly serialized build output logs since it was introduced in 2002 (https://electric-cloud.com/products/electricaccelerator) (disclaimer: I'm the chief architect for ElectricAccelerator, of which Electric Make is a component).
2. I published a technique on CM Crossroads you could use with GNU make 3.81 to descramble parallel build logs in 2009. The article has moved around since then but these days it seems to be found at https://www.cmcrossroads.com/article/descrambling-parallel-b....
3. The maintainers of GNU make took the concept described in that article and baked it into GNU make itself in 2013 for version 4.0 (http://git.savannah.gnu.org/cgit/make.git/tree/NEWS?h=4.0)
Disclaimer: I'm the author of TFA and Chief Architect for Electric Make.
Previous posts:
http://themacro.com/articles/2016/09/introducing-ask-a-femal...
http://themacro.com/articles/2016/09/ask-a-female-engineer-2...
http://themacro.com/articles/2016/10/ask-a-female-engineer-3...
The main problem with strace is not the printing (although that doesn't help) but with the ptrace technology underneath, which basically hits the traced process with a SIGSTOP/SIGCONT pair on every system call, as well as a context switch to the tracing process and another back to the traced process. Even a no-op ptrace-based monitor that does nothing will make individual system calls ~10x slower. In my benchmarks, the best case overall performance impact was about 5%, but some processes were as much as 560% slower.
LD_PRELOAD is faster but has other deficiencies, like it's trivially easy to circumvent the tracing by wiping LD_PRELOAD from the environment before starting a new process. It can also be tricky (though not impossible) to manage implicit state, such as following an application as it first chdir's to a new location, then accesses paths like "../../include". LD_PRELOAD is also tough to get right in the face of multi-threaded applications.
FUSE is interesting but so far I've found the performance to be disappointing. I think that's mostly because it bounces everything through userspace and effectively doubles the filesystem activity for (nearly) everything. For example, with a normal filesystem a read from a user process basically works like this:
user process -> read system call -> filesystem read operation -> return result to user process
With a FUSE filesystem it's something more like this:
user process -> read system call -> FUSE filesystem read operation -> FUSE userspace driver -> read system call on real filesystem -> filesystem read operation -> return result to FUSE userspace driver -> relay result to FUSE filesystem -> return result to user process
There are various caches in place to make this less disastrous than it seems on the surface, but fundamentally this is the architecture. For some applications that's fine; for high-performance build tools I think it's probably a deal-breaker.
This is why we wrote a custom filesystem for Electric Make, and why that's still the approach we take today, nearly 15 years later: nothing else is as robust, and nothing else comes close to the performance.
_Disclaimer: I'm the architect of Electric Make_
With Electric Make you can mark the rule as producing multiple outputs by adding "#pragma multi" above the declaration. See http://blog.melski.net/2013/01/01/pragma-multi-and-rules-wit....
Disclaimer: I'm the Chief Architect of Electric Make
We use ElectricCommander to orchestrate our CI process:
* checkout from Perforce
* build (which uses ElectricAccelerator)
* run unit tests
* build installer
* install on test cluster
* run integration tests
When it comes to the latter, the litmus test I use is, "Is there a clear and urgent need for this law?" In this case, as horrible as human trafficking is, I do not believe that prop 35 passes muster on those grounds. Bear in mind that we're not talking about going from "no penalties for human trafficking" to "some penalties for human trafficking". It's going from significant penalties, to even more severe penalties. There is no urgent need for this law, and therefore no justification for skewering civil liberties.