diff options
author | Felix Lange <fjl@twurst.com> | 2016-05-06 17:15:05 +0800 |
---|---|---|
committer | Felix Lange <fjl@twurst.com> | 2016-05-06 17:15:05 +0800 |
commit | ae9ed5c420dc7babc5754fbb88c7bfe893d5dcf0 (patch) | |
tree | 0afff0a9a51256873b44a4a026eb955ad8651257 /internal/debug | |
parent | a1c201a5ac977bd090ca07fecdb29f494afb5ce2 (diff) | |
download | dexon-ae9ed5c420dc7babc5754fbb88c7bfe893d5dcf0.tar dexon-ae9ed5c420dc7babc5754fbb88c7bfe893d5dcf0.tar.gz dexon-ae9ed5c420dc7babc5754fbb88c7bfe893d5dcf0.tar.bz2 dexon-ae9ed5c420dc7babc5754fbb88c7bfe893d5dcf0.tar.lz dexon-ae9ed5c420dc7babc5754fbb88c7bfe893d5dcf0.tar.xz dexon-ae9ed5c420dc7babc5754fbb88c7bfe893d5dcf0.tar.zst dexon-ae9ed5c420dc7babc5754fbb88c7bfe893d5dcf0.zip |
internal/debug: also rename debug_startTrace to debug_startGoTrace
This was missing from the previous change.
Diffstat (limited to 'internal/debug')
-rw-r--r-- | internal/debug/api.go | 6 | ||||
-rw-r--r-- | internal/debug/flags.go | 4 | ||||
-rw-r--r-- | internal/debug/trace.go | 6 | ||||
-rw-r--r-- | internal/debug/trace_fallback.go | 4 |
4 files changed, 10 insertions, 10 deletions
diff --git a/internal/debug/api.go b/internal/debug/api.go index a0bff2768..96091541b 100644 --- a/internal/debug/api.go +++ b/internal/debug/api.go @@ -51,7 +51,7 @@ type HandlerT struct { traceFile string } -// Verbosity sets the glog verbosity floor. +// Verbosity sets the glog verbosity ceiling. // The verbosity of individual packages and source files // can be raised using Vmodule. func (*HandlerT) Verbosity(level int) { @@ -134,11 +134,11 @@ func (h *HandlerT) StopCPUProfile() error { // GoTrace turns on tracing for nsec seconds and writes // trace data to file. func (h *HandlerT) GoTrace(file string, nsec uint) error { - if err := h.StartTrace(file); err != nil { + if err := h.StartGoTrace(file); err != nil { return err } time.Sleep(time.Duration(nsec) * time.Second) - h.StopTrace() + h.StopGoTrace() return nil } diff --git a/internal/debug/flags.go b/internal/debug/flags.go index 76f32561a..5b1a9b23c 100644 --- a/internal/debug/flags.go +++ b/internal/debug/flags.go @@ -89,7 +89,7 @@ func Setup(ctx *cli.Context) error { runtime.MemProfileRate = ctx.GlobalInt(memprofilerateFlag.Name) Handler.SetBlockProfileRate(ctx.GlobalInt(blockprofilerateFlag.Name)) if traceFile := ctx.GlobalString(traceFlag.Name); traceFile != "" { - if err := Handler.StartTrace(traceFile); err != nil { + if err := Handler.StartGoTrace(traceFile); err != nil { return err } } @@ -114,5 +114,5 @@ func Setup(ctx *cli.Context) error { // respective file. func Exit() { Handler.StopCPUProfile() - Handler.StopTrace() + Handler.StopGoTrace() } diff --git a/internal/debug/trace.go b/internal/debug/trace.go index 45637977a..c0cf921ff 100644 --- a/internal/debug/trace.go +++ b/internal/debug/trace.go @@ -27,8 +27,8 @@ import ( "github.com/ethereum/go-ethereum/logger/glog" ) -// StartTrace turns on tracing, writing to the given file. -func (h *HandlerT) StartTrace(file string) error { +// StartGoTrace turns on tracing, writing to the given file. +func (h *HandlerT) StartGoTrace(file string) error { h.mu.Lock() defer h.mu.Unlock() if h.traceW != nil { @@ -49,7 +49,7 @@ func (h *HandlerT) StartTrace(file string) error { } // StopTrace stops an ongoing trace. -func (h *HandlerT) StopTrace() error { +func (h *HandlerT) StopGoTrace() error { h.mu.Lock() defer h.mu.Unlock() trace.Stop() diff --git a/internal/debug/trace_fallback.go b/internal/debug/trace_fallback.go index 319945925..4118ff408 100644 --- a/internal/debug/trace_fallback.go +++ b/internal/debug/trace_fallback.go @@ -22,10 +22,10 @@ package debug import "errors" -func (*HandlerT) StartTrace(string) error { +func (*HandlerT) StartGoTrace(string) error { return errors.New("tracing is not supported on Go < 1.5") } -func (*HandlerT) StopTrace() error { +func (*HandlerT) StopGoTrace() error { return errors.New("tracing is not supported on Go < 1.5") } |