1. 01 Jul, 2015 7 commits
    • Vignesh Gowda's avatar
      Implement a BitVector-based list · 308f7da1
      Vignesh Gowda authored
      Summary: Implemented a BitVector Encoder and BitVector Reader with the same interface as EliasFanoCoding.h
      
      Reviewed By: @ot, @philippv
      
      Differential Revision: D2198935
      308f7da1
    • Andrey Goder's avatar
      fix? AutoTimerTest · cd927a9e
      Andrey Goder authored
      Summary: Apparently this test sometimes fails. @Gownta suggests it's because we're
      storing temproaries in StringPiece. Change it to store in a std::string, which
      should hopefully fix it.
      
      Reviewed By: @Gownta
      
      Differential Revision: D2208643
      cd927a9e
    • Hans Fugal's avatar
      make it really clear that wangle/rx is deprecated · 668192ca
      Hans Fugal authored
      Summary: More people are starting to use Rx. Yay! But they're trying to use `wangle/rx`. So make sure there's no doubt about its deprecated status.
      
      Reviewed By: @yfeldblum
      
      Differential Revision: D2196273
      668192ca
    • Sara Golemon's avatar
      Add missing include for flock() · dc5b3433
      Sara Golemon authored
      Summary: flock() expects sys/file.h which on many platforms
      is getting included as a side-effect, but on at least one
      this isn't the case.
      
      Add the explicit include to fix builds on those platforms.
      
      Closes #232
      
      Facebook
      
      Unrelated runtime failures.
      
      Reviewed By: @JoelMarcey
      
      Differential Revision: D2196306
      dc5b3433
    • Marc Horowitz's avatar
      make folly/detail/FunctionalExcept.* work if FOLLY_HAVE_BITS_FUNCTEXCEPT_H is set or not · 231b7c5a
      Marc Horowitz authored
      Summary: When doing android development, we need to compile with
      FOLLY_HAVE_BITS_FUNCTEXCEPT_H set for some flavors, and
      FOLLY_HAVE_BITS_FUNCTEXCEPT_H unset for others (primarily for tests
      run in the local (xcode) development platform).  This diff adds some
      more conditionals so it all works.
      
      In this repro, these files are never used, so this is more or less a
      noop, but this is the upstream so I'm making these changes here.
      
      Reviewed By: @Gownta
      
      Differential Revision: D2202107
      231b7c5a
    • Woo Xie's avatar
      check ReadCallback before using it · a09c094f
      Woo Xie authored
      Summary: before the first setReadCallback(), the readCallback_ is nullptr.  Thanks @siyengar for pointing out this!
      
      Reviewed By: @siyengar
      
      Differential Revision: D2203489
      a09c094f
    • Woo Xie's avatar
      move the socket setting into setReadCB() · a93384bd
      Woo Xie authored
      Summary: refactor D2201181
      
      Reviewed By: @afrind
      
      Differential Revision: D2202245
      a93384bd
  2. 29 Jun, 2015 4 commits
  3. 26 Jun, 2015 10 commits
    • Mike Arpaia's avatar
      Remove double-conversion as a source dep in OS X script · b75ef0a0
      Mike Arpaia authored
      Summary: double-conversion was recently added to homebrew, making it the last
      folly dependency to do so. this diff modifies the existing OS X
      bootstrap tool to account for that. I also added an rm for the gtest
      wget, so there wasn't a leftover zip file in your repo. alternatively,
      we could remove that and add it to the gitignore.
      
      Reviewed By: @fugalh
      
      Differential Revision: D2196000
      
      Pulled By: @sgolemon
      b75ef0a0
    • Alex Landau's avatar
      Fix passing RequestContext to executor thread · 6b6e6ae3
      Alex Landau authored
      Summary: If x->add() executes its lambda on a different thread and
      doesn't pass the context on its own, the callback wouldn't
      have the correct context set.
      
      Reviewed By: @djwatson
      
      Differential Revision: D2189318
      6b6e6ae3
    • Dave Watson's avatar
      Fix stop_ thread race · a2206d81
      Dave Watson authored
      Summary: make it std::atomic
      
      Reviewed By: @tudor
      
      Differential Revision: D2191861
      a2206d81
    • Yedidya Feldblum's avatar
      to_shared_ptr. · 9b980c75
      Yedidya Feldblum authored
      Summary: [Folly] to_shared_ptr.
      
      So you can write this:
      
          auto sptr = to_shared_ptr(getSomethingUnique<T>());
      
      Instead of this:
      
          auto sptr = shared_ptr<T>(getSomethingUnique<T>());
      
      Useful when `T` is long, such as `T = foobar::cpp2::FooBarServiceAsyncClient`.
      
      Reviewed By: @meyering
      
      Differential Revision: D2193572
      9b980c75
    • Woo Xie's avatar
      opt proxygen with newly added OpenSSL functions · 06557e1f
      Woo Xie authored
      Summary: this taks advantage of SSL_write_iovec and SSL_read_buf functions to improve CPU.  This eliminates one malloc+memcpy+free operation for all HTTPS traffic, and save up to two for small packets.
      
      It saves 10~15% CPU
      https://fburl.com/99681397
      https://fburl.com/99427544
      
      Reviewed By: @djwatson
      
      Differential Revision: D1993764
      06557e1f
    • Tom Jackson's avatar
      GroupBy · df324b0a
      Tom Jackson authored
      Reviewed By: @ot
      
      Differential Revision: D2188740
      df324b0a
    • Hans Fugal's avatar
      (easy) remove cruft comment · 17751e04
      Hans Fugal authored
      Summary: We have this now.
      
      Reviewed By: @jsedgwick
      
      Differential Revision: D2191642
      17751e04
    • Hannes Roth's avatar
      (Wangle) Fix possible race in updating FSM state · 11e76315
      Hannes Roth authored
      Summary: Storing the new state could be a memory race according to C++ (but wasn't in practice). I only checked GCC though.
      
      Reviewed By: @nbronson
      
      Differential Revision: D2189287
      11e76315
    • Hannes Roth's avatar
      (Wangle) Clean up some data races in tests · e51d8547
      Hannes Roth authored
      Summary: Not 100% about the `ThreadWheelTimekeeper` test. It makes TSAN happy
      though.
      
      Reviewed By: @yfeldblum
      
      Differential Revision: D2187901
      e51d8547
    • Hannes Roth's avatar
      (Wangle) Fix bug with CrappyExecutors, and bad PriorityExecutor · be983813
      Hannes Roth authored
      Summary: 1) We forgot to `--attached_` if `x` throws an exception
      2) `PriorityExecutor` didn't execute `Func`, causing leaks in the test (not a bug in Futures)
      3) I moved up the initialization for an empty `Core` into the constructor to make it easier to see
      
      Reviewed By: @jsedgwick
      
      Differential Revision: D2187343
      be983813
  4. 24 Jun, 2015 10 commits
    • Sara Golemon's avatar
      Don't hardcode thread limit in ServerBootstrap · 2c111cff
      Sara Golemon authored
      Summary: This was set to 32 which probably works fine for the
      majority of FB servers, but not everyone's system is so endowed.
      
      Closes #119
      
      Reviewed By: @fredemmott
      
      Differential Revision: D2187008
      2c111cff
    • Hannes Roth's avatar
      (Wangle) Remove unnecessary constructor argument to CollectAnyContext · 5637418f
      Hannes Roth authored
      Summary: See title.
      
      Reviewed By: @fugalh
      
      Differential Revision: D2186833
      5637418f
    • Sara Golemon's avatar
      Fix tests for glog and gflags · c6b30787
      Sara Golemon authored
      Summary: The existing tests were trying to find undocumented
      symbols in glog/glags which aren't guaranteed to be there on all
      platforms.
      
      Use AC_RUN_IFELSE() to try building and executing some code
      typical of the usage of these libraries.
      
      Closes #117
      
      Reviewed By: @JoelMarcey
      
      Differential Revision: D2183526
      c6b30787
    • Sara Golemon's avatar
      Change visibility of folly::Arena constructors to public · 4514c06c
      Sara Golemon authored
      Summary: In the case of the copy constructor, this change
      doesn't really matter, since it's deleted anyway.
      
      In the case of the move constructor, it fixes what was probably
      an unintentional hiding.  The class certainly looks like
      it supports moving.
      
      Closes #121
      
      Reviewed By: @yfeldblum
      
      Differential Revision: D2184131
      4514c06c
    • Sara Golemon's avatar
      Fix copy/pasta in docs · 65eadfc8
      Sara Golemon authored
      Summary: svformat explicitly takes a container for direct indexing,
      but the format string used is per-arg, which corresponds to format/sformat.
      
      Closes #228
      
      Reviewed By: @JoelMarcey
      
      Differential Revision: D2184334
      65eadfc8
    • Sara Golemon's avatar
      Update README.md to refer to homebrew Formula · bdcabdb4
      Sara Golemon authored
      Summary: Release builds should probably favor using
      @marpaia's brew Formula to get a release build.
      
      Leave the boostrap script around to simplify building
      from master.
      
      Closes #229
      
      Reviewed By: @jwatzman
      
      Differential Revision: D2184416
      bdcabdb4
    • Hannes Roth's avatar
      (Wangle) Possibly undefined behavior in collect · fa331472
      Hannes Roth authored
      Summary: Not sure if this is really undefined behavior or whether UBSAN is just super paranoid. Will try to read up on it later.
      
      I also changed some other `std::atomic` initialization to always follow the same pattern, let me know if I should revert those. I couldn't resist, OCD kicked in.
      
      idonthaveocd
      
      Reviewed By: @fugalh
      
      Differential Revision: D2181074
      fa331472
    • Sara Golemon's avatar
      Provide backfill s6_addr16 on BSD platforms · cc89faa3
      Sara Golemon authored
      Summary: Extend the MacOS s6_addr16 hack to Net/Open/FreeBSD
      
      Closes #106
      
      Reviewed By: @JoelMarcey
      
      Differential Revision: D2182912
      cc89faa3
    • Anton Likhtarov's avatar
      Futex: ignore errors on wake · 75bad626
      Anton Likhtarov authored
      Summary: See the comment for details
      
      Reviewed By: @nbronson
      
      Differential Revision: D2181231
      75bad626
    • James Sedgwick's avatar
      rearrange Pipeline to have more functionality in PipelineBase · e4b8b76f
      James Sedgwick authored
      Summary: This way, handlers can carry out more complex manipulations of the pipeline via ctx->getPipeline() without knowing the R/W types
      
      Reviewed By: @djwatson
      
      Differential Revision: D2158736
      e4b8b76f
  5. 23 Jun, 2015 3 commits
  6. 22 Jun, 2015 3 commits
    • Igor Sugak's avatar
      Add missing override and remove redundant virtual in folly · 7f22ad99
      Igor Sugak authored
      Summary: Running clang-tidy to fix this problem, using script D2171334.
      
      I noticed that even without this change clang dev build succeeds for folly and opened a separate task to investigate why.
      
      Reviewed By: @markisaa
      
      Differential Revision: D2179299
      7f22ad99
    • Mike Kaplinskiy's avatar
      Add ./configure check for vsnprintf returning negative on error · 61a1244e
      Mike Kaplinskiy authored
      Summary: This is slightly more correct than assuming that
      __APPLE__ is the only place this assumption breaks.
      
      Pulled from relevant section of folly-PR#95, other sections
      are either already applied by other fixes, or have been code-moved.
      
      Closes #95
      
      Reviewed By: @jwatzman
      
      Differential Revision: D2178439
      61a1244e
    • Adriano Melo's avatar
      Building instructions for MAC OS X (MacPorts) · 33f2a1c9
      Adriano Melo authored
      Summary: Tested on Mac OS X 10.10.3 and MacPorts 2.3.3.
      Closes #227
      
      Reviewed By: @yfeldblum
      
      Differential Revision: D2176700
      
      Pulled By: @sgolemon
      33f2a1c9
  7. 21 Jun, 2015 2 commits
    • Sara Golemon's avatar
      Bump version to 47:0 · 77f37d5d
      Sara Golemon authored
      77f37d5d
    • Yoni Lavi's avatar
      new small_vector tests that fail on trunk and uncover a bug in emplace_back on... · bd51c8db
      Yoni Lavi authored
      new small_vector tests that fail on trunk and uncover a bug in emplace_back on references to memory inside the vector + a fix + perf improvement to const lvalue push_back
      
      Summary: emplace_back() on a small_vector applied on data inside the vector doesn't work properly.
      In standard vectors, this usage is required to work properly, but I'm not sure whether it should in small_vector. Consider fixing / adding a lint rule.
      
      Reviewed By: @yfeldblum
      
      Differential Revision: D2122931
      bd51c8db
  8. 19 Jun, 2015 1 commit
    • Ananth Jasty's avatar
      ARM64 assembler fixes for Folly. · 6457c442
      Ananth Jasty authored
      Summary: Wrap asm("pause") in an inline so that it becomes
      asm("wfe") on aarch64.
      
      Closes #187
      Closes #190
      
      Reviewed By: @yfeldblum
      
      Differential Revision: D2152868
      
      Pulled By: @sgolemon
      6457c442