Skip to content
Permalink
Branch: master
Commits on Apr 17, 2019
  1. make arena extent allocator more flexible

    binliu19 authored and hhvm-bot committed Apr 17, 2019
    Summary:
    Previously we create two arenas, each having its own address range and is bump allocated when feeding pages to jemalloc.  This diff rewrites the extent hooks and make it more flexible in two ways:
    
    (1) allow bump allocation from both ends of the range, so that cold and hot data can be split easily.
    
    (2) allow a M:N relation between arenas and address ranges, rather than the old 1:1 mapping; this makes it possible to split the low arena into two in a later diff, because some data are preferably allocated in lower 2G address space to allow the offset to be folded in the TC.
    
    This diff doesn't really create more arenas or separate hot/cold data, but enables future diffs to do so easily.
    
    Reviewed By: markw65
    
    Differential Revision: D14869230
    
    fbshipit-source-id: 3db3286d6552848dfe4158d2a7d2fd7be0ebc4a3
Commits on Apr 16, 2019
  1. LockFreePtrWrapper fix

    binliu19 authored and hhvm-bot committed Apr 16, 2019
    Summary:
    Fix the template function resolution to always match the pointer version when the type is a pointer.
    Also make it return a pointer instead of a const pointer for the pointer version of the template.
    
    Reviewed By: markw65
    
    Differential Revision: D14946651
    
    fbshipit-source-id: b20a82f0632fed0192fcc25a65bea1416c2b0179
  2. move some preprocessor macros to a separate file

    binliu19 authored and hhvm-bot committed Apr 16, 2019
    Summary: A few macros, such as `USE_JEMALLOC`, `USE_JEMALLOC_EXTENT_HOOKS`, along with some global constants, are moved to a separate file, alloc-defs.h, so that it can be included in a few allocator-related files.  With this, I no longer have to place declarations in unnatural places to handle cyclic inclusion among headers.  It also makes it easier to not break mac build, etc.
    
    Reviewed By: markw65
    
    Differential Revision: D14929469
    
    fbshipit-source-id: 9e1c38693ebeb35c269eeb7c70d6bb99b3972f2f
  3. drop special treatment for tcmalloc

    binliu19 authored and hhvm-bot committed Apr 16, 2019
    Summary: TCMalloc hasn't been tested for years.  It may still work, but we don't want to do TCMalloc-specific optimization at the moment.
    
    Reviewed By: markw65
    
    Differential Revision: D14935675
    
    fbshipit-source-id: 7ed76f486072eed73b7a8c98cd23d1387b1dc78c
Commits on Apr 13, 2019
  1. allow request OOM killer to be invoked from admin port

    binliu19 authored and hhvm-bot committed Apr 13, 2019
    Differential Revision: D14719508
    
    fbshipit-source-id: 4619a78f9f98916bbff4fd8db066fe3603208ad3
Commits on Apr 12, 2019
  1. only use hugetlb pages in server mode when fork is impossible

    binliu19 authored and hhvm-bot committed Apr 12, 2019
    Summary: Otherwise the process may experience bus errors soon after fork(), if the system cannot find enough hugetlb pages when copy-on-write occurs on hugetlb pages after fork.
    
    Reviewed By: markw65
    
    Differential Revision: D14885548
    
    fbshipit-source-id: aac18ef2e7942104deb09d8ba843148ce0813c63
  2. limit JIT maturity to below 70 before retranslateAll

    binliu19 authored and hhvm-bot committed Apr 12, 2019
    Reviewed By: markw65
    
    Differential Revision: D14875458
    
    fbshipit-source-id: 7d5f6a9cbb9ca537a06315bdb61a86fd4f25a166
Commits on Apr 5, 2019
  1. make jit maturity in jit-deserialize mode somewhat comparable to that…

    binliu19 authored and hhvm-bot committed Apr 5, 2019
    … in normal mode
    
    Summary: Pretend to have some profiling translations, if we've got optimized ones.
    
    Reviewed By: ottoni
    
    Differential Revision: D14787340
    
    fbshipit-source-id: c89c96a72a3b5404f13518961d5c07fb8c870848
Commits on Apr 4, 2019
  1. introduce machine.task override

    binliu19 authored and hhvm-bot committed Apr 4, 2019
    Reviewed By: ypisetsky
    
    Differential Revision: D14752618
    
    fbshipit-source-id: 68b38ae6e873543d24c0251c54d0d7dddb147062
Commits on Apr 3, 2019
  1. log cases where future timestamps appear in profile data

    binliu19 authored and hhvm-bot committed Apr 3, 2019
    Summary: Somehow I still see complaints from prof data deserializer when running unit tests.  This adds more information to the error message to help debugging.
    
    Reviewed By: markw65
    
    Differential Revision: D14594924
    
    fbshipit-source-id: 2fcd248cdace99c364a286134469aa4218747f3a
Commits on Mar 29, 2019
  1. delete concurrent lease

    binliu19 authored and hhvm-bot committed Mar 29, 2019
    Summary: It was used to support single jit requests, which no longer exist.
    
    Reviewed By: paulbiss
    
    Differential Revision: D14654494
    
    fbshipit-source-id: b5a50aad6ca0cdf122d461bf85244597148c4354
Commits on Mar 27, 2019
  1. remove single jit requests

    binliu19 authored and hhvm-bot committed Mar 27, 2019
    Summary: They no longer seem useful and have been off in prod.
    
    Reviewed By: ottoni
    
    Differential Revision: D14222806
    
    fbshipit-source-id: 7711ade90f7438e68638a6ae9f323f2caa9be0d4
Commits on Mar 18, 2019
  1. stop using SHUT_FBLISTEN

    binliu19 authored and hhvm-bot committed Mar 18, 2019
    Reviewed By: markw65
    
    Differential Revision: D14480116
    
    fbshipit-source-id: 90e56a7e0f14306b05dff7acab02bf72bcbda60f
Commits on Mar 6, 2019
  1. fix typealias serialization for 'mixed', and add logging for other cases

    binliu19 authored and hhvm-bot committed Mar 6, 2019
    Summary: This hopefully fixes some interpone's generated when jitting from serialized prof data.
    
    Reviewed By: markw65
    
    Differential Revision: D14328628
    
    fbshipit-source-id: d71a5bd8f6251606c60cf8407d375953b976925f
Commits on Feb 28, 2019
  1. set functions in serialized profile data as hot

    binliu19 authored and hhvm-bot committed Feb 28, 2019
    Summary:
    The hot flag doesn't appear to affect compilation result, though.
    It affects annotations in tcdumps, because `dumpTCAnnotation()` looks at it.
    
    Reviewed By: ottoni
    
    Differential Revision: D14255690
    
    fbshipit-source-id: 95637bc709d90ad4d7eb1498ecebbace7b931743
Commits on Feb 26, 2019
  1. configurable number of warmup threads

    binliu19 authored and hhvm-bot committed Feb 26, 2019
    Summary: I plan to retire the 'WarmupConcurrently' option after this.
    
    Reviewed By: alexeyt
    
    Differential Revision: D14119919
    
    fbshipit-source-id: 95ad7676aced3abb5ac87a571cd6c392105a780d
  2. customize log column names, take 2

    binliu19 authored and hhvm-bot committed Feb 26, 2019
    Reviewed By: markw65
    
    Differential Revision: D14202335
    
    fbshipit-source-id: ceea0b95aa5a16b917a86e6ec865d3d05dd6af05
Commits on Feb 19, 2019
  1. Back out "allocate rds together with stack"

    binliu19 authored and hhvm-bot committed Feb 19, 2019
    Reviewed By: alexeyt
    
    Differential Revision: D14121796
    
    fbshipit-source-id: a64b89608d26daf59e414ebc3f21d9a32afcfd7b
Commits on Feb 16, 2019
  1. allocate rds together with stack

    binliu19 authored and hhvm-bot committed Feb 16, 2019
    Summary:
    AsyncFunc allows allocating extra space for the thread.  Use the space for RDS if available. It is OK if the thread doesn't have the extra space allocated.
    Also change option name 'JitTargetCacheSize' to 'RDSSize'.
    
    Reviewed By: markw65
    
    Differential Revision: D14013379
    
    fbshipit-source-id: 8ee4d462a5217a075389fff43e72ea173bbf5e4d
  2. ServerStats rework

    binliu19 authored and hhvm-bot committed Feb 16, 2019
    Summary:
    1. Simplify the Collect->Filter->Aggregate procedure when reporting stats.  All we report is just stats in the past few timeslots, and we don't distinguish between different TimeSlots in the report.  Thus, it is unnecessary to maintain time series when collecting data; it is also unnecessary to aggregate all data, only to find that most keys are not needed in the report.  This diff uses a much simpler approach, by just merging all interesting data into a single TimeSlot, and avoid the unnecessary complexity.
    2. Improve the /sec reporting. At the time of reporting, the most recent TimeSlot is still being filled.  Previously we divide by (MaxSlot * SlotDuration), which gives a result smaller than the actual value.  Here we try to be more precise about the denominator by looking at current time.
    3. Various cleanups along the way: use a lot of auto const, avoid explicit new/delete in a few places, delete unnecessary fields, reduce size of some buffers, use hphp_fast_string_map instead of std::map.
    
    Reviewed By: markw65
    
    Differential Revision: D13970304
    
    fbshipit-source-id: bc4ff524223e8f879db9f460597b1dca78bdba56
Commits on Feb 15, 2019
  1. avoid duplicated counters

    binliu19 authored and hhvm-bot committed Feb 15, 2019
    Reviewed By: markw65
    
    Differential Revision: D13981377
    
    fbshipit-source-id: ef19fca97aff0105fbf8f07c1e1b7e4502047226
  2. fix the 'waitForRetranslateAll' timer

    binliu19 authored and hhvm-bot committed Feb 15, 2019
    Summary: The previous approach actually included time for other operations (e.g., waiting on readhead repo).
    
    Reviewed By: markw65
    
    Differential Revision: D13998370
    
    fbshipit-source-id: eb0dd7b3b15708cded93d695edd7d1ead107177d
  3. customize log column names

    binliu19 authored and hhvm-bot committed Feb 14, 2019
    Reviewed By: markw65
    
    Differential Revision: D14000935
    
    fbshipit-source-id: 38ed7847a5d9394cc619da24c023f6f732fccacf
Commits on Feb 8, 2019
  1. export some jit serialize stats

    binliu19 authored and hhvm-bot committed Feb 8, 2019
    Summary:
    move the build host and build time from ProfDataDeserializer into ProdData.
    export stats about whether deserialization was attempted/succeeded in admin port command.
    
    Reviewed By: jgasperetti
    
    Differential Revision: D13977806
    
    fbshipit-source-id: 836f03c3066b2d09a3be3f94d305b8b3943cc109
Commits on Feb 7, 2019
  1. avoid duplicate function id in OptimizeData

    binliu19 authored and hhvm-bot committed Feb 7, 2019
    Summary: `tc::FuncMetaInfo` already has function id.
    
    Reviewed By: markw65
    
    Differential Revision: D13912483
    
    fbshipit-source-id: bd36417affd5a31fe8a80728b14472c2ea769539
  2. move retranslateAll*() functions to a single place

    binliu19 authored and hhvm-bot committed Feb 7, 2019
    Reviewed By: ottoni
    
    Differential Revision: D13855871
    
    fbshipit-source-id: 75606591f4d1212b0efeddd36966d8a41a4511e1
Commits on Feb 2, 2019
  1. allow requests to catch signals (such as SIGTERM) in server mode

    binliu19 authored and hhvm-bot committed Feb 2, 2019
    Summary:
    Use a dedicated thread to receive and handle certain signals (particularly ones that terminates the process) in a synchronous way.
    CLI mode has been running with this mechanism.  This diff extends it to the server mode.
    When a signal is received by the server process, it will broadcast SIGTERM (instead of the original signal) to all ongoing requests.  If a request registers a handler, it gets a chance to run cleanup code.
    Beware that if the request doesn't finish cleanup within the shutdown grace period, the process will exit abruptly anyway.  So there isn't a real guarantee that the cleanup will happen, unless we have very big grace period.
    
    With this mechanism, we also unify the server shutdown process: `HttpServer::stopOnSignal()` sends the signal to the handler thread, which calls `HttpServer::stop()`.
    
    Reviewed By: markw65
    
    Differential Revision: D13925122
    
    fbshipit-source-id: 73bfa62703b5910ac57ad9e35bf6a472f2d2d27e
Commits on Jan 31, 2019
  1. include function order when serializing profile data

    binliu19 authored and hhvm-bot committed Jan 31, 2019
    Summary: Avoid hfsort to make deserialization faster.  It also gives a stable order, even when hfsort isn't stable.
    
    Reviewed By: markw65
    
    Differential Revision: D13855770
    
    fbshipit-source-id: e0fe84f79544671b4c5eb4fbe3b89fe54bfcfd69
  2. delete healthlevel from server stats

    binliu19 authored and hhvm-bot committed Jan 30, 2019
    Summary:
    The only way this can be observed is by sending an admin-port command /stats.kvp?keys=health_level.
    The value is almost always 0 ("Bold").  When it isn't, knowing the health level without the reason for unhealthiness isn't quite useful.
    
    Reviewed By: markw65
    
    Differential Revision: D13877199
    
    fbshipit-source-id: a9615aee291ce6a094d3e1fe78772943c7730505
Commits on Jan 25, 2019
  1. don't let warmup requests OOM

    binliu19 authored and hhvm-bot committed Jan 25, 2019
    Summary:
    Only 'standard' requests can OOM.  warmup/profile requests are allowed to go beyond memory limit.
    
    We used to use 'standard' to indicate 'allowed to run jitted code', which isn't accurate.
    
    Reviewed By: markw65
    
    Differential Revision: D13705124
    
    fbshipit-source-id: 3f4f6bac624d76c9267ace8906e2cb5c52b9d928
Commits on Jan 24, 2019
  1. prefer 2M hugetlb pages, and fallback to transparent hugepages in man…

    binliu19 authored and hhvm-bot committed Jan 24, 2019
    …aged arenas
    
    Summary: This backs low arena, and the arena for VM/APC.
    
    Reviewed By: ottoni
    
    Differential Revision: D13729913
    
    fbshipit-source-id: c9c0a5437f555c69c842c877732a4fda7aee86fd
Commits on Jan 18, 2019
  1. refactor and unbreak OSS build

    binliu19 authored and hhvm-bot committed Jan 18, 2019
    Reviewed By: fredemmott
    
    Differential Revision: D13722384
    
    fbshipit-source-id: cbc2aca98956aca8efbed674f74817f093cc98a8
Commits on Jan 17, 2019
  1. log the trigger of retranslateAll

    binliu19 authored and hhvm-bot committed Jan 17, 2019
    Reviewed By: ottoni
    
    Differential Revision: D13686238
    
    fbshipit-source-id: 48aea7c163f2a00dda7444a5ff6362aacdd00337
Commits on Jan 16, 2019
  1. avoid running out of AProf

    binliu19 authored and hhvm-bot committed Jan 16, 2019
    Reviewed By: ottoni
    
    Differential Revision: D13686234
    
    fbshipit-source-id: 9a5a1cd0aca3b30760ffd0461500d6a4485c1b0e
Commits on Jan 14, 2019
  1. Don't mark retranslateAll as complete when only dumping out profile data

    binliu19 authored and hhvm-bot committed Jan 14, 2019
    Summary: In SerializeAndExit mode, we return early before doing the optimized translations.
    
    Reviewed By: markw65
    
    Differential Revision: D13652594
    
    fbshipit-source-id: 820c9a177dc002cc0252bd29b758f60b852b9063
Older
You can’t perform that action at this time.