]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: Change memprofrate to memprofilerate
authorLynn Boger <laboger@linux.vnet.ibm.com>
Tue, 3 Feb 2015 18:13:31 +0000 (12:13 -0600)
committerIan Lance Taylor <iant@golang.org>
Tue, 3 Feb 2015 19:05:52 +0000 (19:05 +0000)
Use memprofilerate in GODEBUG instead of memprofrate to be
consistent with other uses.

Change-Id: Iaf6bd3b378b1fc45d36ecde32f3ad4e63ca1e86b
Reviewed-on: https://go-review.googlesource.com/3800
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/runtime/extern.go
src/runtime/runtime1.go

index 7141cd8a7a13d77d84f7fe3ab6c6582f06ef3b93..cd90390b34a613ba7ffcae1a04c56fd8cdba2010 100644 (file)
@@ -45,7 +45,7 @@ a comma-separated list of name=val pairs. Supported names are:
        This should only be used as a temporary workaround to diagnose buggy code.
        The real fix is to not store integers in pointer-typed locations.
 
-       memprofrate: setting memprofrate=X will update the value of runtime.MemProfileRate.
+       memprofilerate: setting memprofilerate=X will update the value of runtime.MemProfileRate.
        When set to 0 memory profiling is disabled.  Refer to the description of
        MemProfileRate for the default value.
 
index 337a44f553866cbb4e299ca6bf680c8348fa1811..c056bfcdbfc9b7d28228fe764505208f01f63236 100644 (file)
@@ -309,7 +309,7 @@ type dbgVar struct {
 // TODO(rsc): Make GC respect debug.invalidptr.
 
 // Holds variables parsed from GODEBUG env var,
-// except for "memprofrate" since there is an
+// except for "memprofilerate" since there is an
 // existing int var for that value, which may
 // already have an initial value.
 var debug struct {
@@ -357,9 +357,9 @@ func parsedebugvars() {
                key, value := field[:i], field[i+1:]
 
                // Update MemProfileRate directly here since it
-               // int, not int32, and should only be updated
+               // is int, not int32, and should only be updated
                // if specified in GODEBUG.
-               if key == "memprofrate" {
+               if key == "memprofilerate" {
                        MemProfileRate = atoi(value)
                } else {
                        for _, v := range dbgvars {