X-Git-Url: http://git.sourceforge.jp/view?p=pf3gnuchains%2Fgcc-fork.git;a=blobdiff_plain;f=libgo%2Fgo%2Fruntime%2Fpprof%2Fpprof.go;h=d14bb141c4a8b4ae602eb4288de8b391abf7b3b5;hp=702289645450d512c5d14804e88c0f962270abfb;hb=6692ad1d1b2710fc619d04aad2ae0668cc59f4db;hpb=96265ae6967d08ca35d36e87b7588c0c9e6e5cca diff --git a/libgo/go/runtime/pprof/pprof.go b/libgo/go/runtime/pprof/pprof.go index 70228964545..d14bb141c4a 100644 --- a/libgo/go/runtime/pprof/pprof.go +++ b/libgo/go/runtime/pprof/pprof.go @@ -12,7 +12,6 @@ import ( "bufio" "fmt" "io" - "os" "runtime" "sync" ) @@ -23,7 +22,7 @@ import ( // WriteHeapProfile writes a pprof-formatted heap profile to w. // If a write to w returns an error, WriteHeapProfile returns that error. // Otherwise, WriteHeapProfile returns nil. -func WriteHeapProfile(w io.Writer) os.Error { +func WriteHeapProfile(w io.Writer) error { // Find out how many records there are (MemProfile(nil, false)), // allocate that many records, and get the data. // There's a race—more records might be added between @@ -119,7 +118,7 @@ var cpu struct { // StartCPUProfile enables CPU profiling for the current process. // While profiling, the profile will be buffered and written to w. // StartCPUProfile returns an error if profiling is already enabled. -func StartCPUProfile(w io.Writer) os.Error { +func StartCPUProfile(w io.Writer) error { // The runtime routines allow a variable profiling rate, // but in practice operating systems cannot trigger signals // at more than about 500 Hz, and our processing of the