RELNOTES: --bep_publish_used_heap_size_post_build is deprecated. Use --memory_profile=/dev/null instead.

PiperOrigin-RevId: 387881320
diff --git a/site/docs/bep-glossary.md b/site/docs/bep-glossary.md
index 69f550c..df26f52 100644
--- a/site/docs/bep-glossary.md
+++ b/site/docs/bep-glossary.md
@@ -75,8 +75,8 @@
 
 Note that `memory_metrics` may not be populated if there was no Java garbage
 collection during the command's execution. Users may set the
-`--bep_publish_used_heap_size_post_build` option which forces the garbage
-collector to run at the end of the command to populate `memory_metrics`.
+`--memory_profile=/dev/null` option which forces the garbage collector to run at
+the end of the command to populate `memory_metrics`.
 
 <p>
   <button class="btn btn-primary" type="button" data-toggle="collapse"
diff --git a/src/main/java/com/google/devtools/build/lib/buildeventstream/proto/build_event_stream.proto b/src/main/java/com/google/devtools/build/lib/buildeventstream/proto/build_event_stream.proto
index 72f0a78..f154fc1 100644
--- a/src/main/java/com/google/devtools/build/lib/buildeventstream/proto/build_event_stream.proto
+++ b/src/main/java/com/google/devtools/build/lib/buildeventstream/proto/build_event_stream.proto
@@ -867,8 +867,7 @@
 
   message MemoryMetrics {
     // Size of the JVM heap post build in bytes. This is only collected if
-    // --bep_publish_used_heap_size_post_build or --memory_profile is set, since
-    // it forces a full GC.
+    // --memory_profile is set, since it forces a full GC.
     int64 used_heap_size_post_build = 1;
 
     // Size of the peak JVM heap size in bytes post GC. Note that this reports 0
diff --git a/src/main/java/com/google/devtools/build/lib/metrics/MetricsModule.java b/src/main/java/com/google/devtools/build/lib/metrics/MetricsModule.java
index a0e0514..6f0f7a7 100644
--- a/src/main/java/com/google/devtools/build/lib/metrics/MetricsModule.java
+++ b/src/main/java/com/google/devtools/build/lib/metrics/MetricsModule.java
@@ -36,6 +36,7 @@
         defaultValue = "false",
         documentationCategory = OptionDocumentationCategory.LOGGING,
         effectTags = {OptionEffectTag.UNKNOWN},
+        deprecationWarning = "Use --memory_profile=/dev/null instead",
         help =
             "When set we collect and publish used_heap_size_post_build "
                 + "from build_event_stream.proto. This forces a full GC and is off by default.")