Skip to content

Commit

Permalink
internal/debug: also rename debug_startTrace to debug_startGoTrace
Browse files Browse the repository at this point in the history
This was missing from the previous change.
  • Loading branch information
fjl committed May 6, 2016
1 parent a1c201a commit ae9ed5c
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
6 changes: 3 additions & 3 deletions internal/debug/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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
}

Expand Down
4 changes: 2 additions & 2 deletions internal/debug/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
Expand All @@ -114,5 +114,5 @@ func Setup(ctx *cli.Context) error {
// respective file.
func Exit() {
Handler.StopCPUProfile()
Handler.StopTrace()
Handler.StopGoTrace()
}
6 changes: 3 additions & 3 deletions internal/debug/trace.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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()
Expand Down
4 changes: 2 additions & 2 deletions internal/debug/trace_fallback.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
8 changes: 4 additions & 4 deletions internal/web3ext/web3ext.go
Original file line number Diff line number Diff line change
Expand Up @@ -371,13 +371,13 @@ web3._extend({
params: 2
}),
new web3._extend.Method({
name: 'startTrace',
call: 'debug_startTrace',
name: 'startGoTrace',
call: 'debug_startGoTrace',
params: 1
}),
new web3._extend.Method({
name: 'stopTrace',
call: 'debug_stopTrace',
name: 'stopGoTrace',
call: 'debug_stopGoTrace',
params: 0
}),
new web3._extend.Method({
Expand Down

0 comments on commit ae9ed5c

Please sign in to comment.