capture speedup - do not store local variables for frames without debug info

This commit is contained in:
Egor.Ushakov
2017-03-02 19:08:15 +03:00
parent 603f7b55ba
commit c88310d1f8
2 changed files with 4 additions and 4 deletions
@@ -149,7 +149,7 @@ public class LocalVariablesUtil {
public static Map<DecompiledLocalVariable, Value> fetchValues(@NotNull StackFrameProxyImpl frameProxy,
DebugProcess process,
boolean computeNames) throws Exception {
boolean full) throws Exception {
Map<DecompiledLocalVariable, Value> map = new LinkedHashMap<>(); // LinkedHashMap for correct order
Location location = frameProxy.location();
@@ -158,7 +158,7 @@ public class LocalVariablesUtil {
// gather code variables names
MultiMap<Integer, String> namesMap =
computeNames ? calcNames(new SimpleStackFrameContext(frameProxy, process), firstLocalVariableSlot) : MultiMap.empty();
full ? calcNames(new SimpleStackFrameContext(frameProxy, process), firstLocalVariableSlot) : MultiMap.empty();
// first add arguments
int slot = getFirstArgsSlot(method);
@@ -169,7 +169,7 @@ public class LocalVariablesUtil {
slot += getTypeSlotSize(typeNames.get(i));
}
if (!ourInitializationOk) {
if (!full || !ourInitializationOk) {
return map;
}
@@ -114,7 +114,7 @@ public class StackFrameItem {
if (e.getCause() instanceof AbsentInformationException) {
vars.add(JavaStackFrame.createMessageNode(MessageDescriptor.LOCAL_VARIABLES_INFO_UNAVAILABLE.getLabel(),
XDebuggerUIConstants.INFORMATION_MESSAGE_ICON));
// trying to collect values from variable slots
// only args for frames w/o debug info for now
try {
for (Map.Entry<DecompiledLocalVariable, Value> entry : LocalVariablesUtil
.fetchValues(frame, suspendContext.getDebugProcess(), false).entrySet()) {