aboutsummaryrefslogtreecommitdiff
path: root/src/net/http/pprof
AgeCommit message (Collapse)Author
2024-01-22net/http/pprof: configure WriteDeadlineAlexander Yastrebov
Configure write deadline according to requested profiling duration. Fixes #62358 Change-Id: I2350110ff20a637c7e90bdda57026b0b0d9c87ba GitHub-Last-Rev: b79ae38defc4d9b58b23a9d13ff86fa863f18b00 GitHub-Pull-Request: golang/go#64360 Reviewed-on: https://go-review.googlesource.com/c/go/+/544756 Reviewed-by: Damien Neil <dneil@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Auto-Submit: Damien Neil <dneil@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2024-01-10net: add available godoc linkcui fliter
Change-Id: Ib7c4baf0247c421954aedabfbb6a6af8a08a8936 Reviewed-on: https://go-review.googlesource.com/c/go/+/540021 Reviewed-by: Damien Neil <dneil@google.com> Run-TryBot: shuang cui <imcusg@gmail.com> TryBot-Result: Gopher Robot <gobot@golang.org> Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
2023-12-07internal/profile: fully decode proto even if there are no samplesMichael Pratt
This is a partial revert of CL 483137. CL 483137 started checking errors in postDecode, which is good. Now we can catch more malformed pprof protos. However this made TestEmptyProfile fail, so an early return was added when the profile was "empty" (no samples). Unfortunately, this was problematic. Profiles with no samples can still be valid, but skipping postDecode meant that the resulting Profile was missing values from the string table. In particular, net/http/pprof needs to parse empty profiles in order to pass through the sample and period types to a final output proto. CL 483137 broke this behavior. internal/profile.Parse is only used in two places: in cmd/compile to parse PGO pprof profiles, and in net/http/pprof to parse before/after pprof profiles for delta profiles. In both cases, the input is never literally empty (0 bytes). Even a pprof proto with no samples still contains some header fields, such as sample and period type. Upstream github.com/google/pprof/profile even has an explicit error on 0 byte input, so `go tool pprof` will not support such an input. Thus TestEmptyProfile was misleading; this profile doesn't need to support empty input at all. Resolve this by removing TestEmptyProfile and replacing it with an explicit error on empty input, as upstream github.com/google/pprof/profile has. For non-empty input, always run postDecode to ensure the string table is processed. TestConvertCPUProfileEmpty is reverted back to assert the values from before CL 483137. Note that in this case "Empty" means no samples, not a 0 byte input. Continue to allow empty files for PGO in order to minimize the chance of last minute breakage if some users have empty files. Fixes #64566. Change-Id: I83a1f0200ae225ac6da0009d4b2431fe215b283f Reviewed-on: https://go-review.googlesource.com/c/go/+/547996 Reviewed-by: Michael Knyszek <mknyszek@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Cherry Mui <cherryyz@google.com>
2023-05-24net/http/pprof: adjust URL in package docJoe Tsai
The indentation makes the URL be treated as a code block, thus preventing automatic detection of this URL. Avoid using a code block for this. Change-Id: Ie37ae18ec0969ef2d5a6e3b92b2512dac093dbf6 Reviewed-on: https://go-review.googlesource.com/c/go/+/478015 TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Ian Lance Taylor <iant@google.com> Reviewed-by: Cherry Mui <cherryyz@google.com> Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org> Reviewed-by: Ian Lance Taylor <iant@google.com>
2023-05-20net/http/pprof: document query paramsSean Liao
Fixes #59452 Change-Id: Ia0b5a03565f663190c480ef9e26309fa85ff192c Reviewed-on: https://go-review.googlesource.com/c/go/+/496144 Reviewed-by: Ian Lance Taylor <iant@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Run-TryBot: Ian Lance Taylor <iant@google.com> Auto-Submit: Ian Lance Taylor <iant@google.com>
2022-09-29net/http: using strings.CutPrefix replace strings.HasPrefix and ↵cuiweixie
strings.TrimPrefix Change-Id: I0b7b6e4e9d2539e4fcb5c08430ba5a74733fad3c Reviewed-on: https://go-review.googlesource.com/c/go/+/435136 Reviewed-by: Ian Lance Taylor <iant@google.com> Run-TryBot: Ian Lance Taylor <iant@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Auto-Submit: Ian Lance Taylor <iant@google.com> Run-TryBot: xie cui <523516579@qq.com>
2022-08-31net/http/pprof: link docs to runtime/pprofSean Liao
And add some documentation for the debug query param. Fixes #27737 Fixes #53971 Change-Id: I629aaa2d4a43175381eb04872f1caad238519a41 Reviewed-on: https://go-review.googlesource.com/c/go/+/421635 Run-TryBot: Cherry Mui <cherryyz@google.com> Reviewed-by: Than McIntosh <thanm@google.com> Reviewed-by: Daniel Martí <mvdan@mvdan.cc> Reviewed-by: Cherry Mui <cherryyz@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
2022-04-11all: gofmt main repoRuss Cox
[This CL is part of a sequence implementing the proposal #51082. The design doc is at https://go.dev/s/godocfmt-design.] Run the updated gofmt, which reformats doc comments, on the main repository. Vendored files are excluded. For #51082. Change-Id: I7332f099b60f716295fb34719c98c04eb1a85407 Reviewed-on: https://go-review.googlesource.com/c/go/+/384268 Reviewed-by: Jonathan Amsterdam <jba@google.com> Reviewed-by: Ian Lance Taylor <iant@golang.org>
2022-03-08net/http/pprof: skip TestDeltaProfile on all arm and arm64 architecturesBryan C. Mills
Given that we have seen failures with the same failure mode on both openbsd/arm and android/arm64, it seems likely that the underlying bug affects at least all ARM-based architectures. It appears that either these architectures are not able to sample at the frequency expected by the test, or the samples are for some reason being dropped. For #50218 Change-Id: I42a6c8ecda57448f8068e8facb42a4a2cecbbb37 Reviewed-on: https://go-review.googlesource.com/c/go/+/383997 Trust: Bryan Mills <bcmills@google.com> Run-TryBot: Bryan Mills <bcmills@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Cherry Mui <cherryyz@google.com>
2021-12-16net/http/pprof: skip TestDeltaProfile on openbsd/armBryan C. Mills
It is observed to be flaky on the only openbsd/arm builder. Skipping on that platform until someone can investigate. For #50218 Change-Id: Id3a6dc12b93b3cec67870d8d81bd608c4589c952 Reviewed-on: https://go-review.googlesource.com/c/go/+/372794 Trust: Bryan Mills <bcmills@google.com> Run-TryBot: Bryan Mills <bcmills@google.com> Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com> TryBot-Result: Gopher Robot <gobot@golang.org>
2021-10-02net/http/pprof: use "curl" instead of "wget" in usage exampleLeon Klingele
The "curl" binary is already used at several other places inside the code base, whereas this was the only occurrence of "wget". Change-Id: I2b9c5c353d08b3ba8289819b4a602c51f1ebd593 GitHub-Last-Rev: abf94855223c4ceac08dd0d18c5a2b97d1abcca9 GitHub-Pull-Request: golang/go#48718 Reviewed-on: https://go-review.googlesource.com/c/go/+/353401 Reviewed-by: Cherry Mui <cherryyz@google.com> Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Cherry Mui <cherryyz@google.com> TryBot-Result: Go Bot <gobot@golang.org>
2021-04-10all: fix spellingsNaman Gera
This follows the spelling choices that the Go project has made for English words. https://github.com/golang/go/wiki/Spelling Change-Id: Ie7c586d2cf23020cb492cfff58c0831d2d8d3a78 GitHub-Last-Rev: e16a32cd225a275f73d236bcb33703986d110ded GitHub-Pull-Request: golang/go#45442 Reviewed-on: https://go-review.googlesource.com/c/go/+/308291 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org> Trust: Emmanuel Odeke <emmanuel@orijtech.com>
2021-03-13all: use HTML5 br tagsJohn Bampton
In HTML5 br tags don't need a closing slash Change-Id: Ic53c43faee08c5b1267daa9a02cc186b1c255ca1 GitHub-Last-Rev: 652208116944d01b23b8af8f1af485da5e916d32 GitHub-Pull-Request: golang/go#44283 Reviewed-on: https://go-review.googlesource.com/c/go/+/292370 Reviewed-by: Russ Cox <rsc@golang.org> Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Go Bot <gobot@golang.org> Trust: Emmanuel Odeke <emmanuel@orijtech.com>
2020-12-14net/http/pprof: don't treat os.Args as format string in Cmdline handlerBrad Fitzpatrick
Found by @josharian running staticcheck against a fork of this code elsewhere. Change-Id: Ica8bae5df71adde1a71e541dd55b0b81b97b3baf Reviewed-on: https://go-review.googlesource.com/c/go/+/277992 Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com> Reviewed-by: Ian Lance Taylor <iant@golang.org> Trust: Josh Bleecher Snyder <josharian@gmail.com>
2020-10-20all: update references to symbols moved from io/ioutil to ioRuss Cox
The old ioutil references are still valid, but update our code to reflect best practices and get used to the new locations. Code compiled with the bootstrap toolchain (cmd/asm, cmd/dist, cmd/compile, debug/elf) must remain Go 1.4-compatible and is excluded. Also excluded vendored code. For #41190. Change-Id: I6d86f2bf7bc37a9d904b6cee3fe0c7af6d94d5b1 Reviewed-on: https://go-review.googlesource.com/c/go/+/263142 Trust: Russ Cox <rsc@golang.org> Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com>
2020-10-09net/http/pprof: remove html/template dependencyEgon Elbre
html/template indirectly uses reflect MethodByName, this causes linker to use conservative mode resulting in larger binaries. The template here is trivial and can be replaced by string manipulation. This reduces a binary using only net/http/pprof by ~2.5MB. Fixes #41569 Change-Id: I240e1daa6376182ff4961997ee3ec7b96cb07be8 Reviewed-on: https://go-review.googlesource.com/c/go/+/256900 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Hajime Hoshi <hajimehoshi@gmail.com> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Go Bot <gobot@golang.org> Trust: Hajime Hoshi <hajimehoshi@gmail.com> Trust: Brad Fitzpatrick <bradfitz@golang.org>
2020-10-07net/http/pprof: use Request.Context, not the deprecated CloseNotifierAyan George
Prior to this commit, the profiling code had a sleep() function that waits and unblocks on either time.After() or a channel provided by an http.CloseNotifier derived from a supplied http.ResponseWriter. According to the documentation, http.CloseNotifier is deprecated: Deprecated: the CloseNotifier interface predates Go's context package. New code should use Request.Context instead. This patch does just that -- sleep() now takes an *http.Request and uses http.Request.Context() to signal when a request has been cancelled. Change-Id: I98702314addf494f5743a4f99172dc607389dbb8 GitHub-Last-Rev: c1e37a03ca28417ed5833618d3eeddb2eecccd09 GitHub-Pull-Request: golang/go#41756 Reviewed-on: https://go-review.googlesource.com/c/go/+/259157 Reviewed-by: Bryan C. Mills <bcmills@google.com> Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com> Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com> Trust: Bryan C. Mills <bcmills@google.com> Trust: Emmanuel Odeke <emm.odeke@gmail.com> Run-TryBot: Bryan C. Mills <bcmills@google.com> TryBot-Result: Go Bot <gobot@golang.org>
2020-05-09net/http/pprof: document the trace endpoint is for execution traceHana (Hyang-Ah) Kim
Update google/pprof#529 Change-Id: Iec3b343a487b399ada3a6f73c120b5f7ed8938be Reviewed-on: https://go-review.googlesource.com/c/go/+/230538 Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com>
2020-04-22net/http/pprof: allow "seconds" parameters to most profilesHana (Hyang-Ah) Kim
golang.org/cl/147598 added the support for delta computation for mutex and block profiles. In fact, this delta computation makes sense for other types of profiles. For example, /debug/pprof/allocs?seconds=x will provide how much allocation was made during the specified period. /debug/pprof/goroutine?seconds=x will provide the changes in the list of goroutines. This also makes sense for custom profiles. Update #23401 Update google/pprof#526 Change-Id: I45e9073eb001ea5b3f3d16e5a57f635193610656 Reviewed-on: https://go-review.googlesource.com/c/go/+/229537 Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com>
2020-04-22net/http/pprof: make TestDeltaProfile less flaky by retryingHana (Hyang-Ah) Kim
In some slow environment, the goroutine for mutexHog2 may not run within 1secs. So, try with increasing seconds parameters, and declare failure if it still fails with the longest duration parameter (32sec). Also, relax the test condition - previously we expected the profile's duration is within 0.5~2sec. But obviously, in some slow environment, that's not even guaranteed. Just check we get non-zero duration in the result. Update #38544 Change-Id: Ia9b0d51429a2093e6c9eb92cf463ff6952ef3e10 Reviewed-on: https://go-review.googlesource.com/c/go/+/229498 Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com> Reviewed-by: Ian Lance Taylor <iant@golang.org>
2020-04-17net/http/pprof: support the "seconds" param for block, mutex profilesHana Kim
When the seconds param is given, the block and mutex profile endpoints report the difference between two measurements collected the given seconds apart. Historically, the block and mutex profiles have reported the cumulative counts since the process start, and it turned out they are more useful when interpreted along with the time duration. Note: cpu profile and trace endpoints already accept the "seconds" parameter. With this CL, the block and mutex profile endpoints will accept the "seconds" parameter. Providing the "seconds" parameter to other types of profiles is an error. This change moves runtime/pprof/internal/profile to internal/profile and adds part of merge logic from github.com/google/pprof/profile/merge.go to internal/profile, in order to allow both net/http/pprof and runtime/pprof to access it. Fixes #23401 Change-Id: Ie2486f1a63eb8ff210d7d3bc2de683e9335fd5cd Reviewed-on: https://go-review.googlesource.com/c/go/+/147598 Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com> Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com>
2020-02-21net/http/pprof: set content type for /debug/pprofHana (Hyang-Ah) Kim
Fixes #37311 Change-Id: I9e1f37e991e5c203fe72061692f47584fbadfc58 Reviewed-on: https://go-review.googlesource.com/c/go/+/220324 Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com>
2019-10-21net/http/pprof: explicitly mention DefaultServeMux for default handlersharsimran1
Change-Id: I224db88f3809001802e004077ce856f0e3347c67 Reviewed-on: https://go-review.googlesource.com/c/go/+/169017 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-05-10net/http/pprof: fix typo on new index pageIngo Oeser
s/thread/thead/ as this is Table HEAD and not a thread as indicated by the closing tag an context this apears in. Change-Id: I3aa0cc95b96c9a594cb5a49713efa22d67e4990c Reviewed-on: https://go-review.googlesource.com/112675 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-05-10net/http/pprof: update the /debug/pprof endpointAgniva De Sarker
- Documented the duration parameter in Profile() to match with Trace(). - Properly handling the error from strconv.ParseInt to match with Trace(). - Updated the profiles tables to include additional handlers exposed from net/http/pprof. Added a separate section at the bottom to explain what the profiles are and how to use them. Fixes #24380 Change-Id: I8b7e100d6826a4feec81f29f918e7a7f7ccc71a0 Reviewed-on: https://go-review.googlesource.com/112495 Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
2018-03-28net/http/pprof: harden handler responsesAndrew Bonventre
A very small number of old browsers consider content as HTML even when it is explicitly stated in the Content-Type header that it is not. If content served is based on user-supplied input, then an XSS is possible. Introduce three mitigations: + Don't reflect user input in error strings + Set a Content-Disposition header when requesting a resource that should never be displayed in a browser window + Set X-Content-Type-Options: nosniff on all responses Change-Id: I81c9d6736e0439ebd1db99cd7fb701cc56d24805 Reviewed-on: https://go-review.googlesource.com/102318 Run-TryBot: Andrew Bonventre <andybons@golang.org> Reviewed-by: Filippo Valsorda <filippo@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
2017-10-30net/http/pprof: attach handlers using http.HandleFuncTerin Stock
Simplify how pprof attaches the handlers to the DefaultMux by using http.HandleFunc instead of manually wrapping the handlers in a http.HandlerFunc. Change-Id: I65db262ebb2e29e4b6f30df9d2688f5daf782c29 Reviewed-on: https://go-review.googlesource.com/71251 Reviewed-by: Sam Whited <sam@samwhited.com> Reviewed-by: Tom Bergan <tombergan@google.com> Run-TryBot: Sam Whited <sam@samwhited.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
2017-06-26net/http/pprof: mention mutex profile in docHana (Hyang-Ah) Kim
mutex profile requires explicit calls to runtime.SetMutexProfileFraction to enable/disable profiling (like block profile). It is worth mentioning in the doc. Change-Id: I2b8d654be9f5c6bc49fc802b7708c4c552fea9b2 Reviewed-on: https://go-review.googlesource.com/42070 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-04-19all: remove redundant returnsDaniel Martí
Returns at the end of func bodies where the funcs have no return values are pointless. Change-Id: I0da5ea78671503e41a9f56dd770df8c919310ce5 Reviewed-on: https://go-review.googlesource.com/41093 Run-TryBot: Daniel Martí <mvdan@mvdan.cc> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
2017-02-08net/http/pprof: return error when requested profile duration exceeds ↵Kale Blankenship
WriteTimeout Updates Profile and Trace handlers to reject requests for durations >= WriteTimeout. Modifies go tool pprof to print the body of the http response when status != 200. Fixes #18755 Change-Id: I6faed21685693caf39f315f003039538114937b0 Reviewed-on: https://go-review.googlesource.com/35564 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-06-28net/http/pprof: remove comments pointing to gperftoolsRaul Silvera
The version of pprof in gperftools has been deprecated. No need to have a pointer to that version since go tool pprof is included with the Go distro. Change-Id: I6d769a68f64280f5db89ff6fbc67bfea9c8f1526 Reviewed-on: https://go-review.googlesource.com/24509 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2016-04-11net/http/pprof: accept fractional seconds in trace handlerRuss Cox
For heavily loaded servers, even 1 second of trace is too large to process with the trace viewer; using a float64 here allows fetching /debug/pprof/trace?seconds=0.1. Change-Id: I286c07abf04f9c1fe594b0e26799bf37f5c734db Reviewed-on: https://go-review.googlesource.com/21455 Reviewed-by: Austin Clements <austin@google.com>
2016-04-06net/http/pprof: note calling runtime.SetBlockProfileRate is required for ↵Dan Peterson
block profile Fixes #15076 Change-Id: I5ce8f6253245d8cc1f862a1bf618775f557f955d Reviewed-on: https://go-review.googlesource.com/21610 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2016-03-02all: single space after period.Brad Fitzpatrick
The tree's pretty inconsistent about single space vs double space after a period in documentation. Make it consistently a single space, per earlier decisions. This means contributors won't be confused by misleading precedence. This CL doesn't use go/doc to parse. It only addresses // comments. It was generated with: $ perl -i -npe 's,^(\s*// .+[a-z]\.) +([A-Z]),$1 $2,' $(git grep -l -E '^\s*//(.+\.) +([A-Z])') $ go test go/doc -update Change-Id: Iccdb99c37c797ef1f804a94b22ba5ee4b500c4f7 Reviewed-on: https://go-review.googlesource.com/20022 Reviewed-by: Rob Pike <r@golang.org> Reviewed-by: Dave Day <djd@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-03-01all: make copyright headers consistent with one space after periodBrad Fitzpatrick
This is a subset of https://golang.org/cl/20022 with only the copyright header lines, so the next CL will be smaller and more reviewable. Go policy has been single space after periods in comments for some time. The copyright header template at: https://golang.org/doc/contribute.html#copyright also uses a single space. Make them all consistent. Change-Id: Icc26c6b8495c3820da6b171ca96a74701b4a01b0 Reviewed-on: https://go-review.googlesource.com/20111 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-01-06net/http/pprof: stop profiling if client's connection closesBrad Fitzpatrick
Fixes #13833 Change-Id: If0bd5f7dcfc39d34680d11eb998050f0900d5a26 Reviewed-on: https://go-review.googlesource.com/18283 Reviewed-by: Russ Cox <rsc@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
2015-07-22runtime/trace: add new packageDmitry Vyukov
Move tracing functions from runtime/pprof to the new runtime/trace package. Fixes #9710 Change-Id: I718bcb2ae3e5959d9f72cab5e6708289e5c8ebd5 Reviewed-on: https://go-review.googlesource.com/12511 Reviewed-by: Russ Cox <rsc@golang.org>
2015-07-12all: link to https for golang subdomains tooBrad Fitzpatrick
The previous commit (git 2ae77376) just did golang.org. This one includes golang.org subdomains like blog, play, and build. Change-Id: I4469f7b307ae2a12ea89323422044e604c5133ae Reviewed-on: https://go-review.googlesource.com/12071 Reviewed-by: Rob Pike <r@golang.org>
2015-03-19net/http/pprof: Correct body tag in index templateQuoc-Viet Nguyen
The body tag in the pprof template was misplaced. Change-Id: Icd7948b358f52df1acc7e033ab27a062990ef977 Reviewed-on: https://go-review.googlesource.com/7795 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-03-12net/http/pprof: Use relative links to profiles in index htmlMatt Joiner
This allows /debug/pprof/ and descendents to be used through http.StripPrefix and other path rewriting handlers. Change-Id: I53673876c107bbfaf430123ead78e6524b42ac21 Reviewed-on: https://go-review.googlesource.com/7351 Reviewed-by: Andrew Gerrand <adg@golang.org>
2015-01-28net/http/pprof: add tracing supportDmitry Vyukov
net/http/pprof part of tracing functionality: https://docs.google.com/document/u/1/d/1FP5apqzBgr7ahCCgFO-yoVhk4YZrNIDNf9RybngBc14/pub Full change: https://codereview.appspot.com/146920043 Change-Id: I9092028fcbd5e8f97a56f2c155889ccdfb494afb Reviewed-on: https://go-review.googlesource.com/1453 Reviewed-by: Russ Cox <rsc@golang.org>
2014-10-24net/http/pprof: run GC for /debug/pprof/heap?gc=1Russ Cox
We force runtime.GC before WriteHeapProfile with -test.heapprofile. Make it possible to do the same with the HTTP interface. Some servers only run a GC every few minutes. On such servers, the heap profile will be a few minutes stale, which may be too old to be useful. Requested by private mail. LGTM=dvyukov R=dvyukov CC=golang-codereviews https://golang.org/cl/161990043
2014-09-08build: move package sources from src/pkg to srcRuss Cox
Preparation was in CL 134570043. This CL contains only the effect of 'hg mv src/pkg/* src'. For more about the move, see golang.org/s/go14nopkg.