]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/pprof: move cmd/internal/pprof back to cmd/pprof/internal
authorRuss Cox <rsc@golang.org>
Mon, 31 Oct 2016 16:09:03 +0000 (12:09 -0400)
committerRuss Cox <rsc@golang.org>
Wed, 2 Nov 2016 19:09:21 +0000 (19:09 +0000)
CL 21870 moved the entire cmd/pprof/internal directory to cmd/internal/pprof
for use by cmd/trace, but really cmd/trace only needed cmd/pprof/internal/profile,
which became cmd/internal/pprof/profile, and then internal/pprof/profile.

Move the rest back under cmd/pprof so that it is clear that no other code
is reaching into the guts of cmd/pprof. Just like functions should not be
exported unless necessary, internals should not be made visible to more
code than necessary.

Raúl Silvera noted after the commit of CL 21870 that only the profile package
should have moved, but there was no followup fix (until now).

Change-Id: I603f4dcb0616df1e5d5eb7372e6fccda57e05079
Reviewed-on: https://go-review.googlesource.com/32453
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
14 files changed:
src/cmd/pprof/internal/commands/commands.go [moved from src/cmd/internal/pprof/commands/commands.go with 98% similarity]
src/cmd/pprof/internal/driver/driver.go [moved from src/cmd/internal/pprof/driver/driver.go with 99% similarity]
src/cmd/pprof/internal/driver/interactive.go [moved from src/cmd/internal/pprof/driver/interactive.go with 99% similarity]
src/cmd/pprof/internal/fetch/fetch.go [moved from src/cmd/internal/pprof/fetch/fetch.go with 98% similarity]
src/cmd/pprof/internal/plugin/plugin.go [moved from src/cmd/internal/pprof/plugin/plugin.go with 100% similarity]
src/cmd/pprof/internal/report/report.go [moved from src/cmd/internal/pprof/report/report.go with 99% similarity]
src/cmd/pprof/internal/report/source.go [moved from src/cmd/internal/pprof/report/source.go with 99% similarity]
src/cmd/pprof/internal/report/source_html.go [moved from src/cmd/internal/pprof/report/source_html.go with 100% similarity]
src/cmd/pprof/internal/svg/svg.go [moved from src/cmd/internal/pprof/svg/svg.go with 100% similarity]
src/cmd/pprof/internal/svg/svgpan.go [moved from src/cmd/internal/pprof/svg/svgpan.go with 100% similarity]
src/cmd/pprof/internal/symbolizer/symbolizer.go [moved from src/cmd/internal/pprof/symbolizer/symbolizer.go with 99% similarity]
src/cmd/pprof/internal/symbolz/symbolz.go [moved from src/cmd/internal/pprof/symbolz/symbolz.go with 100% similarity]
src/cmd/pprof/internal/tempfile/tempfile.go [moved from src/cmd/internal/pprof/tempfile/tempfile.go with 100% similarity]
src/cmd/pprof/pprof.go

similarity index 98%
rename from src/cmd/internal/pprof/commands/commands.go
rename to src/cmd/pprof/internal/commands/commands.go
index 4a4fb927ef012e01f6c7c7e3cf269cc44df644fa..143b7c21bc8aff15b128825cdfaf4e04a3d92149 100644 (file)
@@ -16,10 +16,10 @@ import (
        "time"
 
        "cmd/internal/browser"
-       "cmd/internal/pprof/plugin"
-       "cmd/internal/pprof/report"
-       "cmd/internal/pprof/svg"
-       "cmd/internal/pprof/tempfile"
+       "cmd/pprof/internal/plugin"
+       "cmd/pprof/internal/report"
+       "cmd/pprof/internal/svg"
+       "cmd/pprof/internal/tempfile"
 )
 
 // Commands describes the commands accepted by pprof.
similarity index 99%
rename from src/cmd/internal/pprof/driver/driver.go
rename to src/cmd/pprof/internal/driver/driver.go
index f3210723cdcf0fb73d5b0618d1212560395bfd13..344d458e13b45d8f00cba232f224f19001e31ad6 100644 (file)
@@ -21,10 +21,10 @@ import (
        "sync"
        "time"
 
-       "cmd/internal/pprof/commands"
-       "cmd/internal/pprof/plugin"
-       "cmd/internal/pprof/report"
-       "cmd/internal/pprof/tempfile"
+       "cmd/pprof/internal/commands"
+       "cmd/pprof/internal/plugin"
+       "cmd/pprof/internal/report"
+       "cmd/pprof/internal/tempfile"
        "internal/pprof/profile"
 )
 
similarity index 99%
rename from src/cmd/internal/pprof/driver/interactive.go
rename to src/cmd/pprof/internal/driver/interactive.go
index 81df976fa1046a65af058d0a717c1c0ccfcc0d32..1fa07a2cd75437b6aa8d4eb893a11c7db36b5e01 100644 (file)
@@ -12,8 +12,8 @@ import (
        "strconv"
        "strings"
 
-       "cmd/internal/pprof/commands"
-       "cmd/internal/pprof/plugin"
+       "cmd/pprof/internal/commands"
+       "cmd/pprof/internal/plugin"
        "internal/pprof/profile"
 )
 
similarity index 98%
rename from src/cmd/internal/pprof/fetch/fetch.go
rename to src/cmd/pprof/internal/fetch/fetch.go
index 95d9be6aa26762d0f9f5965c63b10e069cde4712..2e2de575f8c1cedf5af677f50e65367d27216fd9 100644 (file)
@@ -16,7 +16,7 @@ import (
        "strings"
        "time"
 
-       "cmd/internal/pprof/plugin"
+       "cmd/pprof/internal/plugin"
        "internal/pprof/profile"
 )
 
similarity index 99%
rename from src/cmd/internal/pprof/report/report.go
rename to src/cmd/pprof/internal/report/report.go
index 4f5252b28e806d03cf79331bf199a93621c14574..14875c16dbb3f4b6a77bab04a983ad4c57fdfead 100644 (file)
@@ -17,7 +17,7 @@ import (
        "strings"
        "time"
 
-       "cmd/internal/pprof/plugin"
+       "cmd/pprof/internal/plugin"
        "internal/pprof/profile"
 )
 
similarity index 99%
rename from src/cmd/internal/pprof/report/source.go
rename to src/cmd/pprof/internal/report/source.go
index 608e4d561df6880e692b4c72f4b3e64b1610d819..7ab7e3861f79a7f88c18f8e3963cb1e11f0d77e0 100644 (file)
@@ -18,7 +18,7 @@ import (
        "strconv"
        "strings"
 
-       "cmd/internal/pprof/plugin"
+       "cmd/pprof/internal/plugin"
 )
 
 // printSource prints an annotated source listing, include all
similarity index 99%
rename from src/cmd/internal/pprof/symbolizer/symbolizer.go
rename to src/cmd/pprof/internal/symbolizer/symbolizer.go
index d81f3eafafaef45cbdf768928f23caa1e30c42f9..06a3976838a6adaf1b02d559dacf453cc13910e7 100644 (file)
@@ -13,7 +13,7 @@ import (
        "path/filepath"
        "strings"
 
-       "cmd/internal/pprof/plugin"
+       "cmd/pprof/internal/plugin"
        "internal/pprof/profile"
 )
 
index 01f44566ba3d76872b3b2f1b61ce3f328feba035..18479b45a60774ecb39c26642dea6d1cff6efba0 100644 (file)
@@ -15,12 +15,12 @@ import (
        "sync"
 
        "cmd/internal/objfile"
-       "cmd/internal/pprof/commands"
-       "cmd/internal/pprof/driver"
-       "cmd/internal/pprof/fetch"
-       "cmd/internal/pprof/plugin"
-       "cmd/internal/pprof/symbolizer"
-       "cmd/internal/pprof/symbolz"
+       "cmd/pprof/internal/commands"
+       "cmd/pprof/internal/driver"
+       "cmd/pprof/internal/fetch"
+       "cmd/pprof/internal/plugin"
+       "cmd/pprof/internal/symbolizer"
+       "cmd/pprof/internal/symbolz"
        "internal/pprof/profile"
 )