From fa9fabb3f699f1e8e8ebbe22228fc4acbc9df2ba Mon Sep 17 00:00:00 2001 From: Tobias Werth Date: Mon, 18 Jan 2021 09:02:36 -0800 Subject: [PATCH] Mention in profile that we are aquiring resources when doing so. Without this additional text it's quite confusing. Before: ![image](https://user-images.githubusercontent.com/418721/104927601-ef0ac800-59a1-11eb-983d-5269969cb187.png) After: ![image](https://user-images.githubusercontent.com/418721/104927686-03e75b80-59a2-11eb-9c06-8039fdb98f06.png) Found while looking at https://github.com/bazelbuild/bazel/issues/12725 Closes #12848. PiperOrigin-RevId: 352421090 --- .../com/google/devtools/build/lib/actions/ResourceManager.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/google/devtools/build/lib/actions/ResourceManager.java b/src/main/java/com/google/devtools/build/lib/actions/ResourceManager.java index 2fc65df87bae65..e8a57f6266fcce 100644 --- a/src/main/java/com/google/devtools/build/lib/actions/ResourceManager.java +++ b/src/main/java/com/google/devtools/build/lib/actions/ResourceManager.java @@ -200,7 +200,8 @@ public ResourceHandle acquireResources(ActionExecutionMetadata owner, ResourceSe Preconditions.checkState( !threadHasResources(), "acquireResources with existing resource lock during %s", owner); - AutoProfiler p = profiled(owner.describe(), ProfilerTask.ACTION_LOCK); + AutoProfiler p = + profiled("Aquiring resources for: " + owner.describe(), ProfilerTask.ACTION_LOCK); CountDownLatch latch = null; try { latch = acquire(resources);