Commit 027e47b7 authored by Lynn Boger's avatar Lynn Boger Committed by Ian Lance Taylor

runtime: Change memprofrate to memprofilerate

Use memprofilerate in GODEBUG instead of memprofrate to be
consistent with other uses.

Change-Id: Iaf6bd3b378b1fc45d36ecde32f3ad4e63ca1e86b
Reviewed-on: https://go-review.googlesource.com/3800Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
parent 01ba4c00
......@@ -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.
......
......@@ -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 {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment