Add a new config param, Server.FileSocket. When
Server.FileSocket
is set it will be used inplace of a network socket for the primary
server. This uses a new parameter to ServerOptions, m_useFileSocket,
to toggle between treating the address as a socket path or a network
address.
To initialize a socket connection thrift expects the socket file to not
exist. To support this the 'something nice' retry in startServer will
unlink an existing socket only if fuser claims it is unused.
Server.EvilShutdown enables unlinking the socket regardless of current
users.
Closes#1594
Reviewed By: @ptarjan
Differential Revision: D1135876
Pulled By: @sgolemon
Switches Map and Set to use tracked allocators. Vector uses
smart_realloc which will require a bit more work.
Reviewed By: @edwinsmith
Differential Revision: D1146939
For small responses this was ok, since sending the data didn't take much time. For large requests, they would get truncated without this.
I checked for leaks by printing in the FastCGIConnection constructor and destructor and making sure they match up.
Closes#1631
Reviewed By: @simpkins
Differential Revision: D1147016
Update SimpleXML to be compliant with Zend and fix a bunch of
tests.
Closes#1387Closes#1530
Reviewed By: @ptarjan
Differential Revision: D1135882
Pulled By: @scannell
Intel VTune Amplifier XE
(http://software.intel.com/en-us/intel-vtune-amplifier-xe), the
performance analysis tool, supports mapping of performance data from IP
addresses to function names and source file/lines for custom JIT
engines; the engine should provide mapping from generated code to source
using JIT API (http://software.intel.com/en-us/node/458070). This patch
add the reporting to hhvm, allowing to profile PHP code execution and
see both generated assembly and PHP source for hotspots.
The reporting is controlled via Eval.JitUseVtuneAPI runtime option, so
the default behaviour is not affected. If the option is set and hhvm is
profiled by VTune, the information on compiled code is reported via JIT
API and stored in data file which is used during postprocessing and data
visualization.
The patch includes some files from VTune; the are distrubuted under BSD
license.
Closes#1254
Reviewed By: @ottoni
Differential Revision: D1133559
Pulled By: @scannell
After LdLoc went down, this is the next top punt. This forced me to get
the bind-call machinery working, and a bunch of other stuff -- it kind
of snowballed on me. Redispatching from prologues and handling stack
overflow also had to work. We were also forgetting to rewind the
globalData frontier if translation failed, and this change combined with
that to actually blow out globalData in a couple of tests.
Small bonus: deleting a bunch of "JIT::" that used to be "Transl::".
Reviewed By: @edwinsmith
Differential Revision: D1134414
Bug #64458 fixed an off by one error when decoding TXT records
that resulted with garbage at the end of the string returned.
Reviewed By: @scannell
Differential Revision: D1146140
If a valid handler is passed in, but wasn't registered, we'd just remove the last one:
- find_if() would return ::end()
- erase() treats that to mean erase the last one
Behavior in the new test was:
- correctly remove 'b'
- incorrectly remove 'a' when asked to remove 'b' again
- segfault when asked to remove 'b' a third time
Reviewed By: @ptarjan
Differential Revision: D1145531
Previously: ==580== ERROR: AddressSanitizer: attempting free on address which was not malloc()-ed: 0x604400212103
We were recursively freeing the node, including the attribute nodes - however, libxml2 doesn't malloc them separately - all we needed to do was unlink and free the root.
This fixes a fatal in PHPUnit's test suite.
Reviewed By: @ptarjan
Differential Revision: D1144722
This diff updates the implementation of array_shift to support mutable
collections. A very simple scheme was used to make Vector and Set support
adding elements to the front similar to what HphpArray currently does. I
leave improving the data structures' perf when adding elements to the front
to a subsequent diff.
Reviewed By: @elgenie
Differential Revision: D1140008
... attempting to use diff on expect files containing
non-printing characters doesn't seem like a good idea, and having
.expect that are treated as binary makes them hard to review.
Reviewed By: @hermanventer
Differential Revision: D1144149
(flaky www test)
Some fastcgi documentation doesn't tell you to pass all the params, only a handful. Even the official docs say this http://wiki.nginx.org/HttpFastcgiModule I think we should support the mode where we don't know the document root, jsut the absolute filename. I've already had to help 2 people in github with this issue so I think it is prevelant
Reviewed By: @scannell
Differential Revision: D1125309
If XLS spills a SIMD register, we need the spill slot to
be 16-byte aligned. Also the checkShuffle() assertions weren't
quite right when spilling/loading SIMD registers.
Reviewed By: @jdelong
Differential Revision: D1144168
SpillFrame is the next top punt after Call. This diff is preparation to
get the Call diff to pass all the tests. Also:
- I removed some code that I said I was going to remove in my last diff
but forgot. :/
- There was a bug in emitStore, where I was failing to zero-extend bool
srcs. This caused some interesting test failures once CallBuiltin was
implemented, because if you call a builtin that returns bool from C++,
you'll get garbage in the higher-order bytes.
- I had to increase the max number of arguments you can pass to a host
call.
- Finally, I moved the reserved-stack-space constants out of the X64
namespace and strengthened some of the asserts around the simulator's
stack pointer (I ran into this while working).
Reviewed By: @edwinsmith
Differential Revision: D1139057
Also rename linear-scan.h to reg-alloc.h, it still contains
a few leftover definitions and it's a useful place to put
declarations that don't depend on the implementation.
Reviewed By: @swtaarrs
Differential Revision: D1135081
This diff updates the implementation of array_unshift to support Vector
and Set for the first parameter. A very simple scheme was used to make
Vector and Set support adding elements to the front similar to what
HphpArray currently does. I leave improving the data structures' perf
when adding elements to the front to a subsequent diff.
Along the way, I fixed the behavior of array_unshift() to match PHP 5.5
in the case where the first parameter is not an array, Vector, or Set.
Reviewed By: @elgenie
Differential Revision: D1139932
Reported on freenode by nelt. The deepInitHelper code
assumes the result of any deep-initialized property is reference
counted. Since we recently changed opcodes that push static strings
to push KindOfStaticString, this means in the interpreter we'd hit an
assertion here. (The JIT was unaffected, and neither case does
anything wrong in an opt build.)
Reviewed By: @paroski
Differential Revision: D1144110
A straight-forward delegation to ArrayIter does the job.
After analysis of the uses of slicing code, it seems that slicing can
be confined to just the ext_array function, since the other uses for
func_get_args have been subsumed by special purpose bytecodes. Thus,
this diff also removes Array::slice, ArrayUtil::Slice, func_get_arg,
and func_get_args.
Reviewed By: @jdelong
Differential Revision: D1142189
... since StableMap is an alias for Map (as of {D1116834}),
there can be no collections of this type.
Reviewed By: @jdelong
Differential Revision: D1119658
* Turns ##c_StableMap## into a typedef for ##c_Map##
* ## StableMap ## and ## Map ## are both parse-time aliases for ## HH\Map ## (auto-imported under HipHopSyntax)
* Incorporates anietoro's {D1105491}.
Note: this cannot be committed until we're sure about the equality
semantics that make the most sense for the Map/StableMap hybrid (see {D1116829})
Reviewed By: @paroski
Differential Revision: D1116834
Same big-O complexity, but smaller constant factors ... iterate
~1/2 as many elements, generate 1 instead of n random numbers.
Reviewed By: @jdelong
Differential Revision: D1142089
Doing block->next() on an empty block causes an assertion
failure. While that should never happen in normal operation, it's
kind of annoying when you're in gdb and want to print a block without
checking first whether it's empty.
Reviewed By: @ottoni
Differential Revision: D1143080
Rather than building a way of iterating every collection in
reverse, `array_reverse` is accomplished by reversing the result of
converting the collection to an array.
Reviewed By: @paroski
Differential Revision: D1142062
If you do `parent::class` in a pseudomain you end up in this case. Zend gives this message in that case
Reviewed By: @elgenie
Differential Revision: D1140116
- Disable sleep_await.php and curlUpload.php for being flaky
- Remove potentially flaky parts from ext_network.php
Reviewed By: @bertmaher
Differential Revision: D1143085
These were all causing me trouble with my upcoming diffs -- punting on
these was causing some tests to time out due to punting so much.
Reviewed By: @edwinsmith
Differential Revision: D1142730
I'm only 95% convinced that this is the cause of a sandcastle crash.
We're not calling transCounterAddr with sequential translation ids
anymore (apparently) so it's possible that we need to allocate more than
one chunk of new counters.
I ran a sandcastle with this fix applied and it didn't crash, but the
crash wasn't 100% before, so you never know.
Reviewed By: @ottoni
Differential Revision: D1142512
Mainly interested in the perflab here, as looping over all the values
is certainly less efficient O(autoload-depth) as opposed to O(1).
Also, gets rid of the last use of Array::valueExists
Reviewed By: @scannell
Differential Revision: D1137619