aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build
diff options
context:
space:
mode:
authorGravatar Michajlo Matijkiw <michajlo@google.com>2016-07-13 17:00:28 +0000
committerGravatar Kristina Chodorow <kchodorow@google.com>2016-07-14 11:12:39 +0000
commitd902d1568a2ec9c3af12a5f0b30ac4ee4fe9933e (patch)
tree2ee0a6577318d1e5e7f4ff14061f54668f03fafc /src/main/java/com/google/devtools/build
parent015aad979fc44e6477b07a4861314f2a8c15d054 (diff)
Only include name for UserDefinedFunctionProfiling
These are called rather frequently I would imagine, but we don't profile often. Avoid useless object allocation. The SKYLARK_USER_FN qualifier and function name _should_ be enough to identify what's what, though I understand there could be duplicates. If this turns out to be an issue we can add more detail by memoizing location + name, but for now I'm inclined to treat it as YAGNI. -- MOS_MIGRATED_REVID=127328480
Diffstat (limited to 'src/main/java/com/google/devtools/build')
-rw-r--r--src/main/java/com/google/devtools/build/lib/syntax/UserDefinedFunction.java3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/syntax/UserDefinedFunction.java b/src/main/java/com/google/devtools/build/lib/syntax/UserDefinedFunction.java
index 365681eca0..04ff0ac2e7 100644
--- a/src/main/java/com/google/devtools/build/lib/syntax/UserDefinedFunction.java
+++ b/src/main/java/com/google/devtools/build/lib/syntax/UserDefinedFunction.java
@@ -118,8 +118,7 @@ public class UserDefinedFunction extends BaseFunction {
}
}
- Profiler.instance().startTask(ProfilerTask.SKYLARK_USER_FN,
- getLocationPathAndLine() + "#" + getName());
+ Profiler.instance().startTask(ProfilerTask.SKYLARK_USER_FN, getName());
try {
env.enterScope(this, ast, definitionGlobals);
ImmutableList<String> names = signature.getSignature().getNames();