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

[6.5.0] Add profiling to remoteActionBuildingSemaphore.acquire() #20549

Merged
merged 1 commit into from
Dec 15, 2023
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,10 @@ private ToolSignature getToolSignature(Spawn spawn, SpawnExecutionContext contex
/** Creates a new {@link RemoteAction} instance from spawn. */
public RemoteAction buildRemoteAction(Spawn spawn, SpawnExecutionContext context)
throws IOException, ExecException, ForbiddenActionInputException, InterruptedException {
remoteActionBuildingSemaphore.acquire();
try (SilentCloseable c =
Profiler.instance().profile(ProfilerTask.REMOTE_SETUP, "acquiring semaphore")) {
remoteActionBuildingSemaphore.acquire();
}
try {
ToolSignature toolSignature = getToolSignature(spawn, context);
final MerkleTree merkleTree = buildInputMerkleTree(spawn, context, toolSignature);
Expand Down Expand Up @@ -1460,7 +1463,10 @@ public void uploadInputsIfNotPresent(RemoteAction action, boolean force)
// concurrency. This prevents memory exhaustion. We assume that
// ensureInputsPresent() provides enough parallelism to saturate the
// network connection.
remoteActionBuildingSemaphore.acquire();
try (SilentCloseable c =
Profiler.instance().profile(ProfilerTask.UPLOAD_TIME, "acquiring semaphore")) {
remoteActionBuildingSemaphore.acquire();
}
try {
MerkleTree merkleTree = action.getMerkleTree();
if (merkleTree == null) {
Expand Down