Ori.livneh has uploaded a new change for review. https://gerrit.wikimedia.org/r/172314
Change subject: Add https://github.com/facebook/hhvm/pull/4199 ...................................................................... Add https://github.com/facebook/hhvm/pull/4199 Change-Id: I3d294e246bab44e330c1456e465edfd3f8b25a7b --- A debian/patches/add-jemalloc-prof-status.patch M debian/patches/series 2 files changed, 37 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/debs/hhvm refs/changes/14/172314/1 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 0443128..513bad1 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -12,3 +12,4 @@ fix-memcached-increment-decrement.patch Only-initialze-sweepables-on-new-threads.patch add-adminserver-httpport.patch +add-jemalloc-prof-status.patch -- To view, visit https://gerrit.wikimedia.org/r/172314 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3d294e246bab44e330c1456e465edfd3f8b25a7b Gerrit-PatchSet: 1 Gerrit-Project: operations/debs/hhvm Gerrit-Branch: master Gerrit-Owner: Ori.livneh <[email protected]> _______________________________________________ MediaWiki-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
