Update NEWS for "Snoop Dogg"

Reviewed By: @markw65

Differential Revision: D1530250
Rename namespace ARM and X64 to arm and x64

Summary: This is purely for aesthetics and seemed good in the wake
of s/JIT/jit/. Not planning any more churn after this.

Reviewed By: @markw65

Differential Revision: D1519347
CMake: use bundled PCRE if system PCRE doesn't jit

Summary: PCRE comes with its own CMakeLists.txt, fortunately, so all we have to
do is run it.

Caution: I have very little idea what I'm doing when it comes to CMake
-- there's a lot of hidden magic going on -- but I think this is some
approximation of correct.

Reviewed By: @ptarjan

Differential Revision: D1523103
Implemented important remote debugging commands and other fixes necessary for phpstorm

Summary: @jlreyes: This diff gets phpstorm working with xdebug. Everything should work but I haven't had time to cleanup
or write tests.
@paulbiss: added test coverage, fixed broken tests, implemented symbol parsing

Reviewed By: @ptarjan

Differential Revision: D1515484
Fix crash due to hash collisions in POST data

Summary: Too many hash collisions in the POST data resulted in
a warnUnbalanced fatal, which was only caught by the "last resort"
catch in HttpRequestHandler::handleRequest.

This revealed a few bugs: sourceRootInfo and reqURI both contain
smart allocated Strings, but their destructors run after
hphp_session_exit() has destroyed the memory manager. Its not
clear to me why this isn't a problem when we don't fatal, but
I fixed it by splitting handleRequest to ensure the
destructors are called earlier.

This still left us with a problem where we didn't correctly
close the connection, so I fixed that too.

Reviewed By: @dariorussi

Differential Revision: D1496904
XDEBUG_PROFILE should enable profiling

Summary: Closes https://github.com/facebook/hhvm/pull/3641

Reviewed By: @JoelMarcey

Differential Revision: D1530783
Fix assert crash when autocompleting with the same thing defined twice in a file

Summary: We were hitting an assert when the same class/func name was defined twice in the same file.

This was because we were oldifying the same name twice, so the second time, it fail with:
hh_server: hphp/hack/src/heap/hh_shared.c:682: hh_move: Assertion `hashtbl[slot2].addr == ((void *)0)' failed.
@emiraga found a bunch of logs of the same error message. This should fix anything to do with the ide utils stuff. If we still see it in the logs after, it might be a bug in Typing_redecl_service.

Reviewed By: @jwatzman

Differential Revision: D1528258
Add OSS benchmarking suite

Summary: Facebook: moving out from facebook/

Reviewed By: @ptarjan

Differential Revision: D1531518
Fix PDO::bindColumn

Summary: when we call Variant.unset() all refs get lost, use Variant.setNull() instead

Fixes #2914
Closes https://github.com/facebook/hhvm/pull/3638

Reviewed By: @JoelMarcey

Differential Revision: D1530475
Set resumed flag before suspending VarEnv

Summary: Recent cleanup changed the order of operations, causing assertion checks
to fail. Make sure the resumed flag is set before attempting to suspend
VarEnv.

Reviewed By: @​aravind

Differential Revision: D1531325
typechecker: allow static:: for private members of final classes

Summary: Might have been forgotten when adding the check. On the one
 hand, this makes more `<?php` code hackify directly. On the other hand,
 `self::` is safer long-term practice.

Reviewed By: @jwatzman

Differential Revision: D1529377
typechecker: annotate time as returning an int

Summary: Facebook: www cleanup diff is {D1532268}

Reviewed By: @int3

Differential Revision: D1532227
Objprof for HHVM (Approx. instance counter)

Summary: A lot of times something happens and suddenly PHP land OOMs with bad requests spiking.
Today we record allocations stats and post them with every requests for triaging.
Once we know an endpoint has gone bad, there's still a lot of unknown as to what have happened (Every endpoint has a very large code base).

Objprof for HHVM is an extension that attempts to get approximation of instance count per class.
The extension will be triggered periodically and also upon memory outliers.
Using a comparison view of baseline vs. bad behavior should expose interesting aspects as to what takes the memory.

It isn't a lot of code. There are 3 phases to do it-
1. Map all the Class* known to HHVM
2. Traverse the slabs and increment for every valid Class*
3. Dump all mapped Class* with at least 1 instance back to PHP

Reviewed By: @markw65

Differential Revision: D1528183
AcceptorConfiguration is a struct

Summary: All these setters and getters -- just make it a struct!

Reviewed By: @praveenr

Differential Revision: D1526499
Makes <<__Memoize>> work for functions with args of certain types

Summary: Right now, this only works with arguments whose types can safely be used as array keys without conversion. Arbitrary params will come in the next diff.

Reviewed By: @jano

Differential Revision: D1515148
Fix inst_meth example in hhi comment

Summary: `inst_meth` doesn't work on `private` anything due to runtime
restrictions.

Reviewed By: @pikatchu, @elgenie

Differential Revision: D1531767
flakeylist copy_variation6

Summary: It failed on D1479623?id=4938785

Reviewed By: @paulbiss

Differential Revision: D1531609
Fix some crashes in hphpd

Summary: There are plenty of cores showing what is clearly the result of
popping an element from an empty stack, so guard popActiveLineBreak().

getActiveLineBreak() already checks for size() == 0, and is usually followed up
by a call to setActiveLineBreak(), which does not. So fix that too.

Reviewed By: @edwinsmith

Differential Revision: D1533549
Let's not rely on explicit HHVM version numbers in xdebug tests

Summary: We bump the version number quite a bit. Let's not hardcode them in the xdebug tests

Reviewed By: @ptarjan

Differential Revision: D1534339
Clean up printing functions & some const usage in vasm

Summary: Rename some printing functions to be more consistent with the rest of
the jit, make them work with const references, and move function declarations
to vasm-print.h to match the definitions in vasm-print.cpp.

Reviewed By: @edwinsmith

Differential Revision: D1532792