]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/pprof/internal: move to cmd/internal/pprof
authorDmitry Vyukov <dvyukov@google.com>
Tue, 12 Apr 2016 07:41:11 +0000 (09:41 +0200)
committerDmitry Vyukov <dvyukov@google.com>
Tue, 12 Apr 2016 15:02:28 +0000 (15:02 +0000)
Make internal pprof packages available to cmd/trace.
cmd/trace needs access to them to generate symbolized
svg profiles (create and serialize Profile struct).
And potentially generate svg programmatically instead
of invoking go tool pprof.

Change-Id: Iafd0c87ffdd4ddc081093be0b39761f19507907a
Reviewed-on: https://go-review.googlesource.com/21870
Run-TryBot: Dmitry Vyukov <dvyukov@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
22 files changed:
src/cmd/internal/pprof/commands/commands.go [moved from src/cmd/pprof/internal/commands/commands.go with 98% similarity]
src/cmd/internal/pprof/driver/driver.go [moved from src/cmd/pprof/internal/driver/driver.go with 99% similarity]
src/cmd/internal/pprof/driver/interactive.go [moved from src/cmd/pprof/internal/driver/interactive.go with 99% similarity]
src/cmd/internal/pprof/fetch/fetch.go [moved from src/cmd/pprof/internal/fetch/fetch.go with 97% similarity]
src/cmd/internal/pprof/plugin/plugin.go [moved from src/cmd/pprof/internal/plugin/plugin.go with 99% similarity]
src/cmd/internal/pprof/profile/encode.go [moved from src/cmd/pprof/internal/profile/encode.go with 100% similarity]
src/cmd/internal/pprof/profile/filter.go [moved from src/cmd/pprof/internal/profile/filter.go with 100% similarity]
src/cmd/internal/pprof/profile/legacy_profile.go [moved from src/cmd/pprof/internal/profile/legacy_profile.go with 100% similarity]
src/cmd/internal/pprof/profile/profile.go [moved from src/cmd/pprof/internal/profile/profile.go with 100% similarity]
src/cmd/internal/pprof/profile/profile_test.go [moved from src/cmd/pprof/internal/profile/profile_test.go with 100% similarity]
src/cmd/internal/pprof/profile/proto.go [moved from src/cmd/pprof/internal/profile/proto.go with 100% similarity]
src/cmd/internal/pprof/profile/proto_test.go [moved from src/cmd/pprof/internal/profile/proto_test.go with 100% similarity]
src/cmd/internal/pprof/profile/prune.go [moved from src/cmd/pprof/internal/profile/prune.go with 100% similarity]
src/cmd/internal/pprof/report/report.go [moved from src/cmd/pprof/internal/report/report.go with 99% similarity]
src/cmd/internal/pprof/report/source.go [moved from src/cmd/pprof/internal/report/source.go with 99% similarity]
src/cmd/internal/pprof/report/source_html.go [moved from src/cmd/pprof/internal/report/source_html.go with 100% similarity]
src/cmd/internal/pprof/svg/svg.go [moved from src/cmd/pprof/internal/svg/svg.go with 100% similarity]
src/cmd/internal/pprof/svg/svgpan.go [moved from src/cmd/pprof/internal/svg/svgpan.go with 100% similarity]
src/cmd/internal/pprof/symbolizer/symbolizer.go [moved from src/cmd/pprof/internal/symbolizer/symbolizer.go with 98% similarity]
src/cmd/internal/pprof/symbolz/symbolz.go [moved from src/cmd/pprof/internal/symbolz/symbolz.go with 98% similarity]
src/cmd/internal/pprof/tempfile/tempfile.go [moved from src/cmd/pprof/internal/tempfile/tempfile.go with 100% similarity]
src/cmd/pprof/pprof.go

similarity index 98%
rename from src/cmd/pprof/internal/commands/commands.go
rename to src/cmd/internal/pprof/commands/commands.go
index 9aeee5762e83ec72c0614219018daf643010cd52..5018c02af185e78caebfb0b5202e1293bd76f113 100644 (file)
@@ -16,10 +16,10 @@ import (
        "strings"
        "time"
 
-       "cmd/pprof/internal/plugin"
-       "cmd/pprof/internal/report"
-       "cmd/pprof/internal/svg"
-       "cmd/pprof/internal/tempfile"
+       "cmd/internal/pprof/plugin"
+       "cmd/internal/pprof/report"
+       "cmd/internal/pprof/svg"
+       "cmd/internal/pprof/tempfile"
 )
 
 // Commands describes the commands accepted by pprof.
similarity index 99%
rename from src/cmd/pprof/internal/driver/driver.go
rename to src/cmd/internal/pprof/driver/driver.go
index 7cd1ddc9281a9da8ca4230f94501f6ec637accc1..782acfdf321a68b4afe6a098c36af8448e99428e 100644 (file)
@@ -21,11 +21,11 @@ import (
        "sync"
        "time"
 
-       "cmd/pprof/internal/commands"
-       "cmd/pprof/internal/plugin"
-       "cmd/pprof/internal/profile"
-       "cmd/pprof/internal/report"
-       "cmd/pprof/internal/tempfile"
+       "cmd/internal/pprof/commands"
+       "cmd/internal/pprof/plugin"
+       "cmd/internal/pprof/profile"
+       "cmd/internal/pprof/report"
+       "cmd/internal/pprof/tempfile"
 )
 
 // PProf acquires a profile, and symbolizes it using a profile
similarity index 99%
rename from src/cmd/pprof/internal/driver/interactive.go
rename to src/cmd/internal/pprof/driver/interactive.go
index 13009bf7e9f66a8b32bf8b2f4d52470e49d90d76..1b08226527fd657f4eb57ec6e427133394b87690 100644 (file)
@@ -12,9 +12,9 @@ import (
        "strconv"
        "strings"
 
-       "cmd/pprof/internal/commands"
-       "cmd/pprof/internal/plugin"
-       "cmd/pprof/internal/profile"
+       "cmd/internal/pprof/commands"
+       "cmd/internal/pprof/plugin"
+       "cmd/internal/pprof/profile"
 )
 
 var profileFunctionNames = []string{}
similarity index 97%
rename from src/cmd/pprof/internal/fetch/fetch.go
rename to src/cmd/internal/pprof/fetch/fetch.go
index ec4a6383c6fda0c0e12141e0b615e3c039d8134b..ffd282e74da96ffb2e08b8d9b41d6e00bc052793 100644 (file)
@@ -16,8 +16,8 @@ import (
        "strings"
        "time"
 
-       "cmd/pprof/internal/plugin"
-       "cmd/pprof/internal/profile"
+       "cmd/internal/pprof/plugin"
+       "cmd/internal/pprof/profile"
 )
 
 // FetchProfile reads from a data source (network, file) and generates a
similarity index 99%
rename from src/cmd/pprof/internal/plugin/plugin.go
rename to src/cmd/internal/pprof/plugin/plugin.go
index a22ec5f3c5a1f73355415aa4dcc8dfae88894a7d..d5025d55171a2940b0e0ea253c7607096480a0d4 100644 (file)
@@ -13,7 +13,7 @@ import (
        "strings"
        "time"
 
-       "cmd/pprof/internal/profile"
+       "cmd/internal/pprof/profile"
 )
 
 // A FlagSet creates and parses command-line flags.
similarity index 99%
rename from src/cmd/pprof/internal/report/report.go
rename to src/cmd/internal/pprof/report/report.go
index 86bd4a280b2ea5ac285a982e220ab50431d38a42..c492b752b96fbb66271aaa4f644ef3500974b729 100644 (file)
@@ -17,8 +17,8 @@ import (
        "strings"
        "time"
 
-       "cmd/pprof/internal/plugin"
-       "cmd/pprof/internal/profile"
+       "cmd/internal/pprof/plugin"
+       "cmd/internal/pprof/profile"
 )
 
 // Generate generates a report as directed by the Report.
similarity index 99%
rename from src/cmd/pprof/internal/report/source.go
rename to src/cmd/internal/pprof/report/source.go
index 908be21424f3cd95af306dfeae955ed74f2fa32f..7beea395629fd69aba5b2207e118087e0be9f185 100644 (file)
@@ -18,7 +18,7 @@ import (
        "strconv"
        "strings"
 
-       "cmd/pprof/internal/plugin"
+       "cmd/internal/pprof/plugin"
 )
 
 // printSource prints an annotated source listing, include all
similarity index 98%
rename from src/cmd/pprof/internal/symbolizer/symbolizer.go
rename to src/cmd/internal/pprof/symbolizer/symbolizer.go
index 86de5640d29ca920cae1d9c91c6b9593f48bf431..bc22800530beeb36e86ef3d0f3ea470f2d7b2a7b 100644 (file)
@@ -13,8 +13,8 @@ import (
        "path/filepath"
        "strings"
 
-       "cmd/pprof/internal/plugin"
-       "cmd/pprof/internal/profile"
+       "cmd/internal/pprof/plugin"
+       "cmd/internal/pprof/profile"
 )
 
 // Symbolize adds symbol and line number information to all locations
similarity index 98%
rename from src/cmd/pprof/internal/symbolz/symbolz.go
rename to src/cmd/internal/pprof/symbolz/symbolz.go
index 15b3b6df26049d2ff67a499e1be3d069e134e189..2f2850afeb63760db0f484e6e1bf3c243826a1c8 100644 (file)
@@ -15,7 +15,7 @@ import (
        "strconv"
        "strings"
 
-       "cmd/pprof/internal/profile"
+       "cmd/internal/pprof/profile"
 )
 
 var (
index 1c55d05d5d4f5c1efe4ddc640707e36b3ec47395..bce37dcb97199f0692cc0343d7023b431245ca0e 100644 (file)
@@ -15,13 +15,13 @@ import (
        "sync"
 
        "cmd/internal/objfile"
-       "cmd/pprof/internal/commands"
-       "cmd/pprof/internal/driver"
-       "cmd/pprof/internal/fetch"
-       "cmd/pprof/internal/plugin"
-       "cmd/pprof/internal/profile"
-       "cmd/pprof/internal/symbolizer"
-       "cmd/pprof/internal/symbolz"
+       "cmd/internal/pprof/commands"
+       "cmd/internal/pprof/driver"
+       "cmd/internal/pprof/fetch"
+       "cmd/internal/pprof/plugin"
+       "cmd/internal/pprof/profile"
+       "cmd/internal/pprof/symbolizer"
+       "cmd/internal/pprof/symbolz"
 )
 
 func main() {