Repository navigation
prof: profile a compiled server under load (serve.sh, report.php thread mode, docs/profiling.md) - #561
Merged
Conversation
…ad mode gives one thread's self and inclusive time
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
tools/profprofiled only the compiler. There was no way to see where a compiled server (symfony-app) spends a request.What
tools/prof/serve.sh [--build] <app-dir> [path]: buildsbin/app.profwithMANTICORE_FRAME_POINTERS=1once, runs it with one worker, loads it withwrk, samples the worker with macOSsample, prints the report. Artifacts are removed on exit (KEEP=1keeps them).report.php thread <sample.txt> [top] [thread]: one thread's SELF and INCLUSIVE time fromsample's call tree. The existingsamplemode sums every thread, so a pool idling inread(2)hid the main thread (82% of the table).docs/profiling.md, a README line and a row intools/prof/README.md.Frame pointers matter: without them
samplecuts each stack at the first function without a frame record and inclusive numbers are meaningless.First reading (symfony-app,
GET /, one worker, main thread)Kernel::handle62%,HttpKernel::handleRaw50%,EventDispatcher::dispatch31%,RouterListener::onKernelRequest13%,Kernel::boot11% andServicesResetter::reset10% on every request,Request::createFromGlobals7%, socket I/O about 11%.Not run
Linux (macOS
sampleonly;tools/docker/profis the Linux path). Nosrc/change, so no gate impact.