diff options
author | Dave Watson <davejwatson@fb.com> | 2016-01-12 14:48:09 -0800 |
---|---|---|
committer | Dave Watson <davejwatson@fb.com> | 2016-01-12 15:13:17 -0800 |
commit | f459d5a2034e733eab74cc9b029dfec2ff13b196 (patch) | |
tree | 20246c1e458fcd450b23d11cad74c42f4a481f7b /bin | |
parent | fdbb950495b1f3e000a816f921ed1d97ca4953cb (diff) | |
download | jemalloc-f459d5a2034e733eab74cc9b029dfec2ff13b196.tar.gz |
Detect failed profile fetches
Summary:
Currently an HTTP error response will still try to be parsed, resulting in these messages:
substr outside of string at /home/davejwatson/local/jemalloc-github/bin/jeprof line 3635, <PROFILE> line 1.
Use of uninitialized value in string eq at /home/davejwatson/local/jemalloc-github/bin/jeprof line 3635, <PROFILE> line 1.
substr outside of string at /home/davejwatson/local/jemalloc-github/bin/jeprof line 3637, <PROFILE> line 1.
Use of uninitialized value in string eq at /home/davejwatson/local/jemalloc-github/bin/jeprof line 3637, <PROFILE> line 1.
/home/davejwatson/jeprof/server.1452638936.localhost.pprof.heap: header size >= 2**16
After this fix, curl will return an error status code that will be correctly checked at line 3536, resulting in this error message:
Failed to get profile: curl -s --fail 'http://localhost:4010/pprof/heap' > /home/davejwatson/jeprof/.tmp.server.1452639085.localhost.pprof.heap: No such file or directory
Test Plan:
Tested with MALLOC_CONF="prof:false". Also tested fetching symbols. Didn't test redirects, but this should only affect http error codes >= 400
Diffstat (limited to 'bin')
-rw-r--r-- | bin/jeprof.in | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/jeprof.in b/bin/jeprof.in index a2402f40..dfd9195e 100644 --- a/bin/jeprof.in +++ b/bin/jeprof.in @@ -95,7 +95,7 @@ my @EVINCE = ("evince"); # could also be xpdf or perhaps acroread my @KCACHEGRIND = ("kcachegrind"); my @PS2PDF = ("ps2pdf"); # These are used for dynamic profiles -my @URL_FETCHER = ("curl", "-s"); +my @URL_FETCHER = ("curl", "-s", "--fail"); # These are the web pages that servers need to support for dynamic profiles my $HEAP_PAGE = "/pprof/heap"; |