summaryrefslogtreecommitdiff
path: root/src/large_pages/node_large_page.cc
AgeCommit message (Collapse)Author
2019-11-07src: do not use `std::function` for `OnScopeLeave`Anna Henningsen
Using `std::function` adds an extra layer of indirection, and in particular, heap allocations that are not necessary in our use case here. PR-URL: https://github.com/nodejs/node/pull/30134 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2019-10-16src: refine maps parsing for large pagesGabriel Schulhof
Multiple sections may be marked as "r-xp" and with the executable's path. We use the location of the `__nodetext` symbol added by the linker script to ensure that the range we retrieve from the maps file does indeed contain the Node.js text section. Thanks to Suresh Srinivas <suresh.srinivas@intel.com>! PR-URL: https://github.com/nodejs/node/pull/29973 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com>
2019-10-11src: fix largepages regressionGabriel Schulhof
During the addition of macOS support for large pages, a `memcpy` ended up under the wrong preprocessor directive. As a result, the newly allocated large pages were not initialized with a copy of the text section. Thanks to Suresh Srinivas <suresh.srinivas@intel.com>! PR-URL: https://github.com/nodejs/node/pull/29914 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com>
2019-08-20src: add large page support for macOSDavid Carlier
Proposal to bring the support for this platform. We assume the pse36 cpu flag is present for 2MB large page support present in recent years in mac line (not to be backported to 10.x anyway). Recommended better for mac production servers rather than casual mac books. PR-URL: https://github.com/nodejs/node/pull/28977 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com>
2019-07-30src: large pages fix FreeBSD fix region sizeDavid Carlier
Makes the size aligned to huge page size by calculating it from the aligned lower and upper boundary of the executable address. PR-URL: https://github.com/nodejs/node/pull/28735 Reviewed-By: Rod Vagg <rod@vagg.org> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-07-30src: readlink("/proc/self/exe") -> uv_exename()Ben Noordhuis
This commit also adds error handling. A THP-enabled build terminated with an out-of-memory error on a system without /proc because it cast the -1 from readlink() to size_t (i.e. ULONG_MAX) and then tried to allocate a string of that size. PR-URL: https://github.com/nodejs/node/pull/28333 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
2019-07-15src: large pages option: FreeBSD support proposalDavid Carlier
Enabling on amd64 and as Linux, are 2MB large. The ELF section linkage script is compatible only with GNU ld. PR-URL: https://github.com/nodejs/node/pull/28331 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-04-26src: apply clang-tidy modernize-deprecated-headers found by Jenkins CIgengjiawen
PR-URL: https://github.com/nodejs/node/pull/27279 Reviewed-By: Anna Henningsen <anna@addaleax.net>
2019-03-12src: de-lint header usageRefael Ackermann
PR-URL: https://github.com/nodejs/node/pull/26306 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
2018-10-18src: initial large page (2M) supportSuresh Srinivas
PR-URL: https://github.com/nodejs/node/pull/22079 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Denys Otrishko <shishugi@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com>