Giuseppe Lavagetto has submitted this change and it was merged. Change subject: Add <https://github.com/facebook/hhvm/pull/4199> ......................................................................
Add <https://github.com/facebook/hhvm/pull/4199> Change-Id: Ief59eb46fbfa8f6bf933525551f5930618668cce --- A debian/patches/add-jemalloc-prof-status.patch M debian/patches/series 2 files changed, 37 insertions(+), 0 deletions(-) Approvals: Giuseppe Lavagetto: Verified; Looks good to me, approved diff --git a/debian/patches/add-jemalloc-prof-status.patch b/debian/patches/add-jemalloc-prof-status.patch new file mode 100644 index 0000000..aedaf48 --- /dev/null +++ b/debian/patches/add-jemalloc-prof-status.patch @@ -0,0 +1,36 @@ +--- a/hphp/runtime/server/admin-request-handler.cpp ++++ b/hphp/runtime/server/admin-request-handler.cpp +@@ -231,6 +231,8 @@ + " activate heap profiling\n" + "/jemalloc-prof-deactivate:\n" + " deactivate heap profiling\n" ++ "/jemalloc-prof-status:\n" ++ " report heap profiling status\n" + "/jemalloc-prof-dump:\n" + " dump heap profile\n" + " file optional, filesystem path\n" +@@ -497,6 +499,24 @@ + } + break; + } ++ if (cmd == "jemalloc-prof-status") { ++ bool active = false; ++ size_t activeSize = sizeof(active); ++ int err = 0; ++ err = mallctl("opt.prof", &active, &activeSize, nullptr, 0); ++ if (active && err == 0) { ++ err = mallctl("prof.active", &active, &activeSize, nullptr, 0); ++ } ++ if (err) { ++ std::ostringstream estr; ++ estr << "Error " << err << " in mallctl(...)" ++ << endl; ++ transport->sendString(estr.str()); ++ } else { ++ transport->sendString(active ? "ACTIVE\n" : "DISABLED\n"); ++ } ++ break; ++ } + if (cmd == "jemalloc-prof-deactivate") { + int err = jemalloc_pprof_disable(); + if (err) { diff --git a/debian/patches/series b/debian/patches/series index 9e1f677..55c6ab2 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -21,4 +21,5 @@ only-initialize-sweepables-on-new-threads.patch prevent-domdocument-memleak.patch add-adminserver-httpport.patch +add-jemalloc-prof-status.patch -- To view, visit https://gerrit.wikimedia.org/r/172315 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ief59eb46fbfa8f6bf933525551f5930618668cce Gerrit-PatchSet: 1 Gerrit-Project: operations/debs/hhvm Gerrit-Branch: master_330 Gerrit-Owner: Ori.livneh <o...@wikimedia.org> Gerrit-Reviewer: Giuseppe Lavagetto <glavage...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits