Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reference the correct version of the java allocation instrumenter. #13734

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion site/docs/skylark/performance.md
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ You must pass these two startup flags to *every* Bazel invocation:

```
STARTUP_FLAGS=\
--host_jvm_args=-javaagent:$(BAZEL)/third_party/allocation_instrumenter/java-allocation-instrumenter-3.0.1.jar \
--host_jvm_args=-javaagent:$(BAZEL)/third_party/allocation_instrumenter/java-allocation-instrumenter-3.3.0.jar \
--host_jvm_args=-DRULE_MEMORY_TRACKER=1
```
**NOTE**: The bazel repository comes with an allocation instrumenter.
Expand Down
10 changes: 5 additions & 5 deletions site/docs/user-manual.html
Original file line number Diff line number Diff line change
Expand Up @@ -2709,30 +2709,30 @@ <h4 id='memory-tracking'>Memory tracking</h4>
startup flags to Bazel:
</p>
<ul>
<li><code>--host_jvm_args=-javaagent:$BAZEL/third_party/allocation_instrumenter/java-allocation-instrumenter-3.0.1.jar</code></li>
<li><code>--host_jvm_args=-javaagent:$BAZEL/third_party/allocation_instrumenter/java-allocation-instrumenter-3.3.0.jar</code></li>
<li><code>--host_jvm_args=-DRULE_MEMORY_TRACKER=1</code></li>
</ul>
<p>
The java-agent is checked into Bazel at
third_party/allocation_instrumenter/java-allocation-instrumenter-3.0.1.jar, so make
third_party/allocation_instrumenter/java-allocation-instrumenter-3.3.0.jar, so make
sure you adjust <code>$BAZEL</code> for where you keep your Bazel repository.

Do not forget to keep passing these options to Bazel for every command or the server will
restart.
</p>
<p>Example:</p>
<pre>
% bazel --host_jvm_args=-javaagent:$BAZEL/third_party/allocation_instrumenter/java-allocation-instrumenter-3.0.1.jar \
% bazel --host_jvm_args=-javaagent:$BAZEL/third_party/allocation_instrumenter/java-allocation-instrumenter-3.3.0.jar \
--host_jvm_args=-DRULE_MEMORY_TRACKER=1 \
build --nobuild &lt;targets&gt;

# Dump rules
% bazel --host_jvm_args=-javaagent:$BAZEL/third_party/allocation_instrumenter/java-allocation-instrumenter-3.0.1.jar \
% bazel --host_jvm_args=-javaagent:$BAZEL/third_party/allocation_instrumenter/java-allocation-instrumenter-3.3.0.jar \
--host_jvm_args=-DRULE_MEMORY_TRACKER=1 \
dump --rules

# Dump Starlark heap and analyze it with pprof
% bazel --host_jvm_args=-javaagent:$BAZEL/third_party/allocation_instrumenter/java-allocation-instrumenter-3.0.1.jar \
% bazel --host_jvm_args=-javaagent:$BAZEL/third_party/allocation_instrumenter/java-allocation-instrumenter-3.3.0.jar \
--host_jvm_args=-DRULE_MEMORY_TRACKER=1 \
dump --skylark_memory=$HOME/prof.gz
% pprof -flame $HOME/prof.gz
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
* <li>--host_jvm_args=-javaagent:(path to Google's java agent jar)
* <ul>
* <li>For Bazel use <a
* href="https://github.com/bazelbuild/bazel/tree/master/third_party/allocation_instrumenter">java-allocation-instrumenter-3.0.1.jar</a>
* href="https://github.com/bazelbuild/bazel/tree/master/third_party/allocation_instrumenter">java-allocation-instrumenter-3.3.0.jar</a>
* </ul>
* <li>--host_jvm_args=-DRULE_MEMORY_TRACKER=1
* </ol>
Expand Down