1
0
mirror of https://github.com/golang/go synced 2024-10-05 16:41:21 -06:00
Commit Graph

48 Commits

Author SHA1 Message Date
Austin Clements
0c02bc009a runtime: show panics in traceback
We used to include panic calls in tracebacks; however, when
runtime.panic was renamed to runtime.gopanic in the conversion of the
runtime to Go, we missed the special case in showframe that includes
panic calls even though they're in package runtime.

Fix the function name check in showframe (and, while we're here, fix
the other check for "runtime.panic" in runtime/pprof). Since the
"runtime.gopanic" name doesn't match what users call panic and hence
isn't very user-friendly, make traceback rewrite it to just "panic".

Updates #5832, #13857. Fixes #14315.

Change-Id: I8059621b41ec043e63d5cfb4cbee479f47f64973
Reviewed-on: https://go-review.googlesource.com/19492
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
2016-02-16 16:58:43 +00:00
Brad Fitzpatrick
beceea7339 runtime/pprof: mark dragonfly and solaris as bad at pprof
Updates #13841

Change-Id: I121bce054e2756c820c76444e51357f474b7f3d6
Reviewed-on: https://go-review.googlesource.com/19161
Reviewed-by: Russ Cox <rsc@golang.org>
2016-02-02 19:07:08 +00:00
Austin Clements
7037c15e19 runtime/pprof: retry failed tests with longer duration
Currently we run profiling tests for around 200ms in short mode.
However, even on platforms with good profiling, these tests are
inherently flaky, especially on loaded systems like the builders.

To mitigate this, modify the profiling test harness so that if a test
fails in a way that could indicate there just weren't enough samples,
it retries with a longer duration.

This requires some adjustment to the profile checker to distinguish
"fatal" and "retryable" errors. In particular, we no longer consider
it a fatal error to get a profile with zero samples (which we
previously treated as a parse error). We replace this with a retryable
check that the total number of samples is reasonable.

Fixes #13943. Fixes #13871. Fixes #13223.

Change-Id: I9a08664a7e1734c5334b1f3792a56184fe314c4d
Reviewed-on: https://go-review.googlesource.com/18683
Reviewed-by: Russ Cox <rsc@golang.org>
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-01-26 22:09:40 +00:00
Ian Lance Taylor
7688ffe134 runtime/pprof: document SetCPUProfile with c-archive/c-shared
When using c-archive/c-shared, the signal handler for SIGPROF will not
be installed, which means that runtime/pprof.StartCPUProfile won't work.
There is no really good solution here, as the main program may want to
do its own profiling.  For now, just document that runtime/pprof doesn't
work as expected, but that it will work if you use Notify to install the
Go signal handler.

Fixes #14043.

Change-Id: I7ff7a01df6ef7f63a7f050aac3674d640a246fb4
Reviewed-on: https://go-review.googlesource.com/18911
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: David Crawshaw <crawshaw@golang.org>
2016-01-25 20:55:44 +00:00
Austin Clements
903c307c2b runtime/pprof: skip TestStackBarrierProfiling on FreeBSD, too
Sigh. Sleeps on FreeBSD also yield the rest of the time slice and
profiling signals are only delivered when a process completes a time
slice (worse, itimer time is only accounted to the process that
completes a time slice). It's less noticeable than the other BSDs
because the default tick rate is 1000Hz, but it's still failing
regularly.

Fixes #13846.

Change-Id: I41bf116bffe46682433b677183f86944d0944ed4
Reviewed-on: https://go-review.googlesource.com/18455
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Austin Clements <austin@google.com>
2016-01-08 20:49:26 +00:00
Brad Fitzpatrick
62c280ac1c runtime/pprof: skip TestStackBarrierProfiling on dragonfly too
Just saw a few dragonfly failures here.

I'm tempted to preemptively add plan9 here too, but I'll wait until
I see it fail.

Change-Id: Ic99fc088dbfd1aa21f509148aee98ccfe7f640bf
Reviewed-on: https://go-review.googlesource.com/18306
Reviewed-by: Russ Cox <rsc@golang.org>
2016-01-06 22:15:37 +00:00
Russ Cox
13ba968d75 runtime/pprof: point to new docs about kernel bugs
Change-Id: I8ee338c1244fc4e2fb75deec752a7f83239c33ea
Reviewed-on: https://go-review.googlesource.com/18257
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2016-01-06 17:59:35 +00:00
Austin Clements
59ca8789fb runtime/pprof: skip TestStackBarrierProfiling
This test triggers a large number of usleep(100)s. linux/arm, openbsd,
and solaris have very poor timer resolution on the builders, so
usleep(100) actually gives up the whole scheduling quantum. On Linux
and OpenBSD (and probably Solaris), profiling signals are only
generated when a process completes a whole scheduling quantum, so this
test often gets zero profiling signals and fails.

Until we figure out what to do about this, skip this test on these
platforms.

Updates #13405.

Change-Id: Ica94e4a8ae7a8df3e5a840504f83ee2ec08727df
Reviewed-on: https://go-review.googlesource.com/18252
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Austin Clements <austin@google.com>
2016-01-05 18:48:19 +00:00
Russ Cox
9d549b5b62 runtime/pprof: shorten a few tests
For #10571.

Change-Id: I4bdad64e2dfd692ef2adccf2e5e82e9b1996a8ea
Reviewed-on: https://go-review.googlesource.com/18206
Reviewed-by: Austin Clements <austin@google.com>
Run-TryBot: Austin Clements <austin@google.com>
2016-01-04 20:10:10 +00:00
Austin Clements
624d798a41 runtime/pprof: disable TestStackBarrierProfiling on ppc64
This test depends on GODEBUG=gcstackbarrierall, which doesn't work on
ppc64.

Updates #13334.

Change-Id: Ie554117b783c4e999387f97dd660484488499d85
Reviewed-on: https://go-review.googlesource.com/17120
Run-TryBot: Austin Clements <austin@google.com>
Reviewed-by: Russ Cox <rsc@golang.org>
2015-11-20 19:39:36 +00:00
David Crawshaw
2fa64c4182 runtime/pprof: check if test can fork
(TestStackBarrierProfiling is failing on darwin/arm.)

Change-Id: I8006d6222ccafc213821e02105896440079caa37
Reviewed-on: https://go-review.googlesource.com/17091
Reviewed-by: Austin Clements <austin@google.com>
Run-TryBot: David Crawshaw <crawshaw@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2015-11-20 17:52:33 +00:00
Austin Clements
9a7893550c runtime/pprof: test that stack barriers never appear in profile
This adds a test that runs CPU profiling with a high load of stack
barriers and stack barrier insertion/removal operations and checks
that both 1) the runtime doesn't crash and 2) stackBarrier itself
never appears in a profile. Prior to the fix for gentraceback starting
in the middle of stackBarrier, condition 2 often failed.

Change-Id: Ic28860448859029779844c4bf3bb28ca84611e2c
Reviewed-on: https://go-review.googlesource.com/17037
Reviewed-by: Russ Cox <rsc@golang.org>
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2015-11-19 16:35:43 +00:00
Todd Neal
e3e0122ae2 test: use go:noinline consistently
Replace various implementations of inlining prevention with
"go:noinline"

Change-Id: Iac90895c3a62d6f4b7a6c72e11e165d15a0abfa4
Reviewed-on: https://go-review.googlesource.com/16510
Reviewed-by: Keith Randall <khr@golang.org>
Run-TryBot: Todd Neal <todd@tneal.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2015-11-03 02:01:34 +00:00
Russ Cox
6b8762104a runtime/pprof: document content of heap profile
Fixes #11343.

Change-Id: I46efc24b687b9d060ad864fbb238c74544348e38
Reviewed-on: https://go-review.googlesource.com/12556
Reviewed-by: Rob Pike <r@golang.org>
2015-07-27 16:30:27 +00:00
Russ Cox
3b26e8b29a runtime/pprof: ignore too few samples on Windows test
Fixes #10842.

Change-Id: I7de98f3073a47911863a252b7a74d8fdaa48c86f
Reviewed-on: https://go-review.googlesource.com/12529
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-07-22 20:26:37 +00:00
Dmitry Vyukov
ae1ea2aa94 runtime/trace: add new package
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-22 15:47:16 +00:00
Brad Fitzpatrick
2ae77376f7 all: link to https instead of http
The one in misc/makerelease/makerelease.go is particularly bad and
probably warrants rotating our keys.

I didn't update old weekly notes, and reverted some changes involving
test code for now, since we're late in the Go 1.5 freeze. Otherwise,
the rest are all auto-generated changes, and all manually reviewed.

Change-Id: Ia2753576ab5d64826a167d259f48a2f50508792d
Reviewed-on: https://go-review.googlesource.com/12048
Reviewed-by: Rob Pike <r@golang.org>
2015-07-11 14:36:33 +00:00
Dmitry Vyukov
e72f5f67a1 runtime: fix tracing of syscallexit
There were two issues.
1. Delayed EvGoSysExit could have been emitted during TraceStart,
while it had not yet emitted EvGoInSyscall.
2. Delayed EvGoSysExit could have been emitted during next tracing session.

Fixes #10476
Fixes #11262

Change-Id: Iab68eb31cf38eb6eb6eee427f49c5ca0865a8c64
Reviewed-on: https://go-review.googlesource.com/9132
Reviewed-by: Russ Cox <rsc@golang.org>
2015-06-18 13:59:55 +00:00
Russ Cox
7bc3e58806 all: extract "can I exec?" check from tests into internal/testenv
Change-Id: I7b54be9d8b50b39e01c6be21f310ae9a10404e9d
Reviewed-on: https://go-review.googlesource.com/10753
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: David Crawshaw <crawshaw@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2015-06-16 18:07:36 +00:00
Josh Bleecher Snyder
79986e24e0 runtime/pprof: write heap statistics to heap profile always
This is a duplicate of CL 9491.
That CL broke the build due to pprof shortcomings
and was reverted in CL 9565.

CL 9623 fixed pprof, so this can go in again.

Fixes #10659.

Change-Id: If470fc90b3db2ade1d161b4417abd2f5c6c330b8
Reviewed-on: https://go-review.googlesource.com/10212
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
2015-05-18 20:02:21 +00:00
Josh Bleecher Snyder
7bebccb972 Revert "runtime/pprof: write heap statistics to heap profile always"
This reverts commit c26fc88d56.

This broke pprof. See the comments at 9491.

Change-Id: Ic99ce026e86040c050a9bf0ea3024a1a42274ad1
Reviewed-on: https://go-review.googlesource.com/9565
Reviewed-by: Daniel Morsing <daniel.morsing@gmail.com>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
2015-05-01 15:56:20 +00:00
Russ Cox
c26fc88d56 runtime/pprof: write heap statistics to heap profile always
The heap statistics were only written if asked for a profile with debug > 0,
but that also prints a stack trace for each profile line, which is comparatively
much noisier. The statistics are short enough and separate enough
(they only appear at the end) and useful enough that we can print them
always.

This means that people using -test.memprofile in tests will get a memory
profile with statistics included now. Pprof won't care, but if people care to
look, the numbers will be there.

This avoids the need for hacks like using -memprofilerate=1 to find
the number of allocations.

Change-Id: I10a4f593403d0315aad11b37c6e554b734caa73f
Reviewed-on: https://go-review.googlesource.com/9491
Reviewed-by: David Chase <drchase@google.com>
2015-04-29 18:07:43 +00:00
Matthew Dempsky
c0fa9e3f6f runtime/pprof: disable flaky TestTraceFutileWakeup on linux/ppc64le
Update #10512.

Change-Id: Ifdc59c3a5d8aba420b34ae4e37b3c2315dd7c783
Reviewed-on: https://go-review.googlesource.com/9162
Reviewed-by: Dmitry Vyukov <dvyukov@google.com>
2015-04-21 10:01:53 +00:00
Dave Cheney
7ae9d06880 runtime/pprof: disable TestTraceStressStartStop
Updates #10476

Change-Id: Ic4414f669104905c6004835be5cf0fa873553ea6
Reviewed-on: https://go-review.googlesource.com/8962
Reviewed-by: Russ Cox <rsc@golang.org>
2015-04-17 14:54:25 +00:00
David Crawshaw
0a81d31b66 runtime/pprof: skip fork test on darwin/arm64
Just like darwin/arm.

Change-Id: Ic75927bd6457d37cda7dd8279fd9b4cd52edc1d1
Reviewed-on: https://go-review.googlesource.com/8813
Reviewed-by: Minux Ma <minux@golang.org>
2015-04-13 11:58:03 +00:00
Dmitry Vyukov
ca98dd773a runtime/pprof: fix data race in test
rp.Close happened concurrently with rp.Read. Order them.

Fixes #10280

Change-Id: I7b083bcc336d15396c4e42fc4654ba34fad4a4cc
Reviewed-on: https://go-review.googlesource.com/8211
Reviewed-by: Dave Cheney <dave@cheney.net>
2015-03-29 12:24:16 +00:00
Hyang-Ah Hana Kim
39bc78845b runtime/pprof: fix TestCPUProfileWithFork for GOOS=android.
1) Large allocation in this test caused crash. This was not
detected by builder because builder runs tests with -test.short.

2) The command "go" for forking doesn't exist in some platforms
including android. This change uses the test binary itself which
is guaranteed to exist.

This change also adds logging of the total samples collected in
TestCPUProfileMultithreaded test that is flaky in android-arm
builder.

Change-Id: I225c6b7877d811edef8b25e7eb00559450640c42
Reviewed-on: https://go-review.googlesource.com/8131
Reviewed-by: David Crawshaw <crawshaw@golang.org>
Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2015-03-27 18:07:06 +00:00
Dmitry Vyukov
4396ea96c4 runtime: remove futile wakeups from trace
Channels and sync.Mutex'es allow another goroutine to acquire resource
ahead of an unblocked goroutine. This is good for performance, but
leads to futile wakeups (the unblocked goroutine needs to block again).
Futile wakeups caused user confusion during the very first evaluation
of tracing functionality on a real server (a goroutine as if acquires a mutex
in a loop, while there is no loop in user code).

This change detects futile wakeups on channels and emits a special event
to denote the fact. Later parser finds entire wakeup sequences
(unblock->start->block) and removes them.

sync.Mutex will be supported in a separate change.

Change-Id: Iaaaee9d5c0921afc62b449a97447445030ac19d3
Reviewed-on: https://go-review.googlesource.com/7380
Reviewed-by: Keith Randall <khr@golang.org>
2015-03-17 14:14:55 +00:00
Dmitry Vyukov
7b0c73aa28 cmd/trace: move goroutine analysis code to internal/trace
This allows to test goroutine analysis code in runtime/pprof tests.
Also fix a nil-deref crash in goroutine analysis code that happens on runtime/pprof tests.

Change-Id: Id7884aa29f7fe4a8d7042482a86fe434e030461e
Reviewed-on: https://go-review.googlesource.com/7301
Run-TryBot: Dmitry Vyukov <dvyukov@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Andrew Gerrand <adg@golang.org>
2015-03-11 12:53:24 +00:00
Dmitry Vyukov
9d332a8324 cmd/trace: dump thread id on proc start
Augment ProcStart events with OS thread id.
This helps in scheduler locality analysis.

Change-Id: I93fea75d3072cf68de66110d0b59d07101badcb5
Reviewed-on: https://go-review.googlesource.com/7302
Reviewed-by: Keith Randall <khr@golang.org>
2015-03-11 12:52:41 +00:00
Dmitry Vyukov
5471e02338 runtime/pprof: fix trace test
Some of the trace stacks are OS-dependent due to OS-specific code
in net package. Check these stacks only on subset of OSes.

Change-Id: If95e4485839f4120fd6395725374c3a2f8706dfc
Reviewed-on: https://go-review.googlesource.com/7300
Run-TryBot: Dmitry Vyukov <dvyukov@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Dmitry Vyukov <dvyukov@google.com>
2015-03-10 16:29:25 +00:00
Dmitry Vyukov
919fd24884 runtime: remove runtime frames from stacks in traces
Stip uninteresting bottom and top frames from trace stacks.
This makes both binary and json trace files smaller,
and also makes stacks shorter and more readable in the viewer.

Change-Id: Ib9c80ccc280504f0e235f867f53f1d2652c41583
Reviewed-on: https://go-review.googlesource.com/5523
Reviewed-by: Keith Randall <khr@golang.org>
Run-TryBot: Dmitry Vyukov <dvyukov@google.com>
2015-03-10 14:46:15 +00:00
David Crawshaw
90dbd428e5 runtime/pprof: skip tests that fork on darwin/arm
Change-Id: I9b08b74214e5a41a7e98866a993b038030a4c073
Reviewed-on: https://go-review.googlesource.com/6251
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
2015-02-27 19:55:54 +00:00
Shenghou Ma
f0bbb5c450 runtime/pprof: make TestBlockProfile more robust
It's using debug mode of pprof.writeBlock, so the output actually goes
through text/tabwriter. It is possible that tabwriter expands each tab
into multiple tabs in certain cases.

For example, this output has been observed on the new arm64 port:
10073805 1 @ 0x1088ec 0xd1b8c 0xd0628 0xb68c0 0x867f4
#	0x1088ec	sync.(*Cond).Wait+0xfc				/home/minux/go.git/src/sync/cond.go:63
#	0xd1b8c		runtime/pprof_test.blockCond+0x22c		/home/minux/go.git/src/runtime/pprof/pprof_test.go:454
#	0xd0628		runtime/pprof_test.TestBlockProfile+0x1b8	/home/minux/go.git/src/runtime/pprof/pprof_test.go:359
#	0xb68c0		testing.tRunner+0x140				/home/minux/go.git/src/testing/testing.go:447

10069965 1 @ 0x14008 0xd1390 0xd0628 0xb68c0 0x867f4
#	0x14008	runtime.chansend1+0x48				/home/minux/go.git/src/runtime/chan.go:76
#	0xd1390	runtime/pprof_test.blockChanSend+0x100		/home/minux/go.git/src/runtime/pprof/pprof_test.go:396
#	0xd0628	runtime/pprof_test.TestBlockProfile+0x1b8	/home/minux/go.git/src/runtime/pprof/pprof_test.go:359
#	0xb68c0	testing.tRunner+0x140				/home/minux/go.git/src/testing/testing.go:447

10069706 1 @ 0x108e0c 0xd193c 0xd0628 0xb68c0 0x867f4
#	0x108e0c	sync.(*Mutex).Lock+0x19c			/home/minux/go.git/src/sync/mutex.go:67
#	0xd193c		runtime/pprof_test.blockMutex+0xbc		/home/minux/go.git/src/runtime/pprof/pprof_test.go:441
#	0xd0628		runtime/pprof_test.TestBlockProfile+0x1b8	/home/minux/go.git/src/runtime/pprof/pprof_test.go:359
#	0xb68c0		testing.tRunner+0x140				/home/minux/go.git/src/testing/testing.go:447

Change-Id: I3bef778c5fe01a894cfdc526fdc5fecb873b8ade
Signed-off-by: Shenghou Ma <minux@golang.org>
Reviewed-on: https://go-review.googlesource.com/5554
Reviewed-by: Dmitry Vyukov <dvyukov@google.com>
2015-02-23 21:05:55 +00:00
Dmitry Vyukov
edadffa2f3 cmd/trace: add new command
Trace command allows to visualize and analyze traces.
Run as:
$ go tool trace binary trace.file
The commands opens web browser with the main page,
which contains links for trace visualization,
blocking profiler, network IO profiler and per-goroutine
traces.

Also move trace parser from runtime/pprof/trace_parser_test.go
to internal/trace/parser.go, so that it can be shared between
tests and the command.

Change-Id: Ic97ed59ad6e4c7e1dc9eca5e979701a2b4aed7cf
Reviewed-on: https://go-review.googlesource.com/3601
Reviewed-by: Andrew Gerrand <adg@golang.org>
2015-02-20 18:31:25 +00:00
Dmitry Vyukov
3c3848ad92 runtime: fix system memory allocator on plan9
The following line in sysFree:
n += (n + memRound) &^ memRound
doubles value of n (n += n).
Which is wrong and can lead to memory corruption.

Fixes #9712

Change-Id: I3c141b71da11e38837c09408cf4f1d22e8f7f36e
Reviewed-on: https://go-review.googlesource.com/3602
Reviewed-by: David du Colombier <0intro@gmail.com>
2015-01-30 12:01:31 +00:00
Dmitry Vyukov
256116ad25 runtime: fix trace ticks frequency on windows
Change-Id: I8c7fcc7705070bc9979e39d08a4c9b2870087a08
Reviewed-on: https://go-review.googlesource.com/3500
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
2015-01-30 08:35:38 +00:00
Dmitry Vyukov
4737399bd9 runtime/pprof: skip trace tests on solaris and windows
Coarse-grained test skips to fix bots.
Need to look closer at windows and nacl failures.

Change-Id: I767ef1707232918636b33f715459ee3c0349b45e
Reviewed-on: https://go-review.googlesource.com/3416
Reviewed-by: Aram Hăvărneanu <aram@mgk.ro>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-01-28 19:29:39 +00:00
Dmitry Vyukov
2059ffbc8d runtime/pprof: add tests for tracer
Change-Id: I832a433f0f2fc10b0a2fea0bfb003a988fc2c81b
Reviewed-on: https://go-review.googlesource.com/2039
Reviewed-by: Russ Cox <rsc@golang.org>
2015-01-28 16:52:10 +00:00
Dmitry Vyukov
986a1d2d1c runtime/pprof: add tracing support
runtime/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: I3143a569cbd33576f19ca47308d1ff5200d8c955
Reviewed-on: https://go-review.googlesource.com/1452
Reviewed-by: Russ Cox <rsc@golang.org>
2015-01-28 16:40:35 +00:00
Burcu Dogan
dc72db90ea runtime/pprof: ignore CPU profile test failures in QEMU
Fixes #9605

Change-Id: Iafafa4c1362bbd1940f8e4fb979f72feae3ec3ad
Reviewed-on: https://go-review.googlesource.com/3000
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-01-20 18:15:06 +00:00
Russ Cox
b2cdf30eb6 [dev.cc] runtime: convert scheduler from C to Go
The conversion was done with an automated tool and then
modified only as necessary to make it compile and run.

[This CL is part of the removal of C code from package runtime.
See golang.org/s/dev.cc for an overview.]

LGTM=r
R=r, daniel.morsing
CC=austin, dvyukov, golang-codereviews, iant, khr
https://golang.org/cl/172260043
2014-11-11 17:08:33 -05:00
Dmitriy Vyukov
f4de59e234 runtime/pprof: fix memory profiler test
Don't use cmd/pprof as it is not necessary installed
and does not work on nacl and plan9.
Instead just look at the raw profile.

LGTM=crawshaw, rsc
R=golang-codereviews, crawshaw, 0intro, rsc
CC=golang-codereviews
https://golang.org/cl/159010043
2014-10-17 21:28:47 +04:00
Russ Cox
fb173c4185 runtime/pprof: fix test
gogo called from GC is okay
for the same reasons that
gogo called from System or ExternalCode is okay.
All three are fake stack traces.

Fixes #8408.

LGTM=dvyukov, r
R=r, dvyukov
CC=golang-codereviews
https://golang.org/cl/152580043
2014-10-17 11:23:15 -04:00
Russ Cox
25f79b9dbe runtime/pprof: disable new memory test
It cannot run 'go tool pprof'. There is no guarantee that's installed.
It needs to build a temporary pprof binary and run that.
It also needs to skip the test on systems that can't build and
run binaries, namely android and nacl.

See src/cmd/nm/nm_test.go's TestNM for a template.

Update #8867
Status: Accepted

TBR=dvyukov
CC=golang-codereviews
https://golang.org/cl/153710043
2014-10-16 14:58:11 -04:00
Dmitriy Vyukov
8f47c837fd runtime: fix memory profiler
There are 3 issues:
1. Skip argument of callers is off by 3,
so that all allocations are deep inside of memory profiler.
2. Memory profiling statistics are not updated after runtime.GC.
3. Testing package does not update memory profiling statistics
before capturing the profile.
Also add an end-to-end test.
Fixes #8867.

LGTM=rsc
R=rsc
CC=golang-codereviews
https://golang.org/cl/148710043
2014-10-16 22:11:26 +04:00
Alex Brainman
d72029e3a3 undo CL 140110043 / 17b5fc2aa130
I have found better approach, then longer wait.
See CL 134360043 for details.

««« original CL description
runtime/pprof: adjust cpuHogger so that tests pass on windows builders

LGTM=rsc
R=dvyukov, rsc
CC=golang-codereviews
https://golang.org/cl/140110043

»»»

LGTM=dave
R=golang-codereviews, dave, dvyukov
CC=golang-codereviews
https://golang.org/cl/133500043
2014-09-09 16:05:00 +10:00
Russ Cox
c007ce824d build: move package sources from src/pkg to src
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.
2014-09-08 00:08:51 -04:00