Add a CPU timer to RequestInjectionData

Summary: We'd like to be able to kill a runaway CPU-eating request before it
hits the full wall-time timeout.  Requests generally use a lot less CPU than
wall time, so we should be able to be more aggressive with it.

Reviewed By: @markw65

Differential Revision: D1702049
Quote the path passed to hh_server

Summary: When hh_client spawns a server, quote the path so that paths with spaces in the
name are correctly handled.

Fixes #4310

Closes https://github.com/facebook/hhvm/pull/4321

Reviewed By: @​svcscm

Differential Revision: D1701186

Pulled By: @int3
Fix a frame state tracing bug I introduced

Summary: If you turn tracing up too high now you get folly::format exceptions.

Reviewed By: @bertmaher, @alexmalyshev

Differential Revision: D1708102

Signature: t1:1708102:1417061596:3674837cec575ff003de9845fe73f02139d5d58e
Revert "Move all inlining work to translateRegion()"

Summary: This reverts commit 7a17649306b003c961a86e9e33b5bb92e979192e.

Perflab says it broke lots of things.

Reviewed By: @jdelong

Differential Revision: D1709049

Signature: t1:1709049:1417208800:3f72a2a4d47968d7db9ae906c71ab28c54929041
Fix predicted local type invariant failure (test/slow/ext_collator/1810.php)

Summary: It looks like this test is failing in trunk?  This fixes it, and is
definitely a bug fix (because we might only have Gen for the local now even if
we had a LdLoc that knew more earlier, so taking this prediction could lead to
an invariant violation of exactly this sort).  I didn't think through all the
details of why exactly it failed though.

Reviewed By: @markw65

Differential Revision: D1708111

Signature: t1:1708111:1417210961:f0d864b7a9cd844d83f21411e050079150f3255b
Lazy-init freelist headers

Summary: It's a clear regression to initialize a free header every time we
push onto the freelist (a few alu operations plus an additional store),
so do it lazily before parsing the heap.

This effectively moves the cost from the mutator to the allocator,
and the amortized cost depends on how often we parse the heap instead
of how often we free objects.

Reviewed By: @jdelong

Differential Revision: D1709018

Signature: t1:1709018:1417204521:321b84f8a86d857481d5487a0b22acff08dac47b
^^cmake phase never completed
Improve the property accessing API of Class.

Summary: Affects Class methods getDeclPropIndex(), findSProp(), getSProp(), and
zGetSProp(). They were taking two boolean arguments by reference and setting
them: visible and accessible.

visible is unneeded. It was set iff the property existed, but that could be
checked against the return values of those functions (either "value == nullptr"
or "slotIdx == kInvalidInd").

That left returning a some representation of the property (either a Slot,
TypedValue*, or RefData*) and the accessible flag, which I turned into a struct
templated on the property.

Reviewed By: @jdelong

Differential Revision: D1708784

Signature: t1:1708784:1417282914:1782c28704245b9b2a50520936dcabc155e13a77
Fix for issue when file or directory name is "0"

Summary: If name of file or directory is `0` - this name shouldn't be removed in `::resolveDotDots` method.
Solution is to use `strlen` function as callback in `array_filter` - it will works similarly, but keeps values of 0 (zero).

Likely, should be backported into 3.3 LTS branch (I can add another pull request against 3.3 branch if this is OK).
Closes https://github.com/facebook/hhvm/pull/4266

Reviewed By: @fredemmott

Differential Revision: D1687469

Signature: t1:1687469:1417307697:14f3413565305ff2289b271c91b188c28bdc688f
Remove a warning from msg_receive function

Summary: Remove a warning from `msg_receive` function for consistency with php:
https://github.com/php/php-src/blob/a770d29df74515197c76efdf1a64d9794c27b4af/ext/sysvmsg/sysvmsg.c#L377-L379
Closes https://github.com/facebook/hhvm/pull/4325

Reviewed By: @fredemmott

Differential Revision: D1700537

Signature: t1:1700537:1417318587:0560094192f76da223b5c379bd9da929f28f1b1e
Make options with dashes show correctly on option error.

Summary: There is a bug in at least Boost 1.54 where options with dashes `-` in them are
not handled correctly. Basically all but the last substring after the last dash
is returned.

See: https://github.com/facebook/hhvm/issues/2864

So our error string when an option had an invalid argument was just plain wrong.
Since we can't fix boost very easily and are not planning to upgrade yet, we
workaround it with this fix.

Fixes: #2864

Reviewed By: @paulbiss

Differential Revision: D1681063

Signature: t1:1681063:1416505169:7664cff3c23b8fdfec995c54897eb276d44f92d6