stop being dumb with Phar::getPharAndFile

using a "!" and a "===" are really dumb together. I think the old code was right anyways, but this was crazy.

Reviewed By: @alexmalyshev

Differential Revision: D1008302
make RecursiveDirectoryIterator::getSubPathname correct

This was just wrong

Reviewed By: @JoelMarcey

Differential Revision: D1010913
allow PharData to get null as the second arg

Reviewed By: @JoelMarcey

Differential Revision: D1010917
Make pretty json consistent with zend

They put an empty space on empty things

Reviewed By: @JoelMarcey

Differential Revision: D1010909
Fix numa balancing issues

Specifying numa_set_membind doesn't just set the default,
it sets a thread-wide limit on which nodes can provide memory. This
meant that the numa_interleave calls were ineffective.

It turns out that most of the unbalancing occurs during startup/warmup,
so just move the point at which we enable numa.

Reviewed By: @swtaarrs

Differential Revision: D1008356
Get rid of refdata_after_decref_helper

This made it different from all the other countables,
because instead of calling Foo::release, you had to call
refdata_after_decref_helper.

But the only direct calls to release were either using
it to free the memory (so add releaseMem to do that), or were
already checking m_cow. Rewrite release to check m_cow, which
makes the decRefFoo helpers uniform.

Reviewed By: @swtaarrs

Differential Revision: D1009974
spl_autoload_call shouldn't overflow guard

Due to Symfony's use of autoload magic, the infinite recursion
detection is a bit too good and breaks their assumption of being able to
autoload circularly in what would overflow the stack if exit() wasn't
involved. Zend allows this so we probably need to as well.

Closes #1170
Closes #1175

Reviewed By: @markw65

Differential Revision: D1009853
Fix a typo in bytecode.specfication

Fixes a typo in bytecode.specification

Closes #1173

Reviewed By: @edwinsmith

Differential Revision: D1011297

Pulled By: @scannell
Wire up heap profiler to memory manager APIs

This wires up the heap tracking APIs to the actual allocation
functions being used.

Reviewed By: @jdelong

Differential Revision: D1007457
Don't crash on sorting with invalid functions

Right now we crash on the user-defined sort functions if the
function is not valid. Don't do that.

Closes #1165

Reviewed By: @markw65

Differential Revision: D1010050
Fix (non-build-blocking) rebase merge in ref-data.h

"Get rid of refdata_after_decref_helper" added a new call to
smartFreeSize that should be smartFreeSizeLogged.

Reviewed By: @markw65

Differential Revision: D1011305
make --php emulate zend

If we are going to replace zend, we need a CLI that looks like theirs. This is a start. I'll do `-d` next.

Reviewed By: @markw65

Differential Revision: D1009086
Coalesce async functions in hotprofiler output

Generators and async functions become two functions when we compile them: the original function, and another with $continuation on the end of the name. With classic generators the original function is a mere stub which returns a Continuation which will use the $continuation function. That's not too interesting from a  profiler perspective: the original function does pretty much no work. For Async, though, the original function may do significant work before the first await, and may even continue to do work depending on the disposition of the object awaited upon.

The hotprofiler extension was separating these two functions and reporting call counts and times separately. While technically correct, it's also pretty useless and in the Async world will hurt since the time spent in such a function is split in some unknown proportion. This will cause users of the data to devalue the const of async functions unless they realize this implementation detail.

This change ensures that all time spent in a generator or async function is aggregated under a single function name: the original one.

Reviewed By: @jano

Differential Revision: D1010450
Clear up a tiny bit of dead logic/code relating to merge-only units

A couple unused variables/functions, and the mainReturn logic
sets up mainReturn even if you don't have a merge only unit, which I
don't think we should require, so changed it to make getMainReturn
require isMergeOnly as a precondition.  (We could maybe indicate
merge-only-ness by whether the mainReturn is KindOfUninit later
instead of the bool.)

Reviewed By: @markw65

Differential Revision: D1009053
Some {W,}Iter{Init,Next}{K,} spec tweaks

The spec claimed these instructions stored to locals "as a
cell", which sounded to me like it should convert KindOfRef locals
into KindOfCell.  What it meant is that it stored using a normal
assignment (we don't really specify how these work, so I just changed
it to say "with the semantics of SetL").  Also hoist discussion of the
assignment semantics out of the switch (%1) part of the spec.

Reviewed By: @edwinsmith

Differential Revision: D1009178
Specify Strlen opcode

This looks left out.

Reviewed By: @oyamauchi

Differential Revision: D1009227
Add jemalloc include dir during build
Test for jemalloc >= 3.0.0 before using
Fix jemalloc version check

Summary: The jemalloc version check needs to add the include directory
for jemalloc when compiling or it will incorrectly not find jemalloc in
some cases (ex. OS X.)

Reviewed By: @edwinsmith
Improve OSS Framework Unit Testing Script

Added mechanism to print out csv summary results for use in charting (--machine option). Using this option supresses all output except for the csv at thee end.

Show tests that do not give the expected output compared to a previous run.

Enhance help to describe what the colors mean for . and F during test runs.

Add a count of tests that will be compared.

Reviewed By: @ptarjan

Differential Revision: D1010936