proj_name stringclasses 70
values | relative_path stringlengths 37 333 | class_name stringlengths 1 78 | func_name stringlengths 1 94 | func_body stringlengths 0 7.93k | masked_class stringlengths 47 8.74k | len_input int64 24 2.03k | len_output int64 1 2k | total int64 26 2.05k | finetune_output stringlengths 0 11.3k | filled_file_finetune_output stringlengths 54 493k | compile_info_filled_file_finetune_output stringclasses 177
values |
|---|---|---|---|---|---|---|---|---|---|---|---|
AdoptOpenJDK_jitwatch | jitwatch/core/src/main/java/org/adoptopenjdk/jitwatch/chain/CompileChainWalker.java | CompileChainWalker | processParseTag |
String methodID = null;
CompileNode lastNode = null;
Map<String, String> methodAttrs = new HashMap<>();
Map<String, String> callAttrs = new HashMap<>();
for (Tag child : parseTag.getChildren())
{
String tagName = child.getName();
Map<String, String> tagAttrs = child.getAttributes();
switch (tag... | class CompileChainWalker extends AbstractCompilationVisitable
{
private static final Logger logger = LoggerFactory.getLogger(CompileChainWalker.class);
private IReadOnlyJITDataModel model;
private CompileNode root = null;
private Compilation compilation;
public CompileChainWalker(IReadOnlyJITDataModel model)
... | 792 | 739 | 1,531 |
String methodID = parseTag.getAttributes().get(ATTR_METHOD);
String methodType = parseTag.getAttributes().get(ATTR_TYPE);
String methodAttrs = parseTag.getAttributes().get(ATTR_METHOD_ATTRS);
String callAttrs = parseTag.getAttributes().get(ATTR_CALL_ATTRS);
String tagAttrs = parseTag.getAttributes().get(ATTR... | /*
* Copyright (c) 2013-2021 Chris Newland.
* Licensed under https://github.com/AdoptOpenJDK/jitwatch/blob/master/LICENSE-BSD
* Instructions: https://github.com/AdoptOpenJDK/jitwatch/wiki
*/
package org.adoptopenjdk.jitwatch.chain;
import static org.adoptopenjdk.jitwatch.core.JITWatchConstants.ATTR_ID;
import stat... | <COMPILED_SUCCESSFULLY> |
AdoptOpenJDK_jitwatch | jitwatch/core/src/main/java/org/adoptopenjdk/jitwatch/chain/CompileNode.java | CompileNode | setInlined |
this.inlined = inlined;
| class CompileNode
{
private boolean inlined = false;
private boolean virtualCall = false;
private String tooltip;
private List<CompileNode> children;
private CompileNode parent = null;
private String methodID = null;
private IParseDictionary parseDictionary;
private IReadOnlyJITDataModel model;
... | 1,000 | 13 | 1,013 |
this.inlined = inlined;
| /*
* Copyright (c) 2013-2017 Chris Newland.
* Licensed under https://github.com/AdoptOpenJDK/jitwatch/blob/master/LICENSE-BSD
* Instructions: https://github.com/AdoptOpenJDK/jitwatch/wiki
*/
package org.adoptopenjdk.jitwatch.chain;
import java.util.ArrayList;
import java.util.List;
import org.adoptopenjdk.jitwatc... | <COMPILED_SUCCESSFULLY> |
AdoptOpenJDK_jitwatch | jitwatch/core/src/main/java/org/adoptopenjdk/jitwatch/compilation/AbstractCompilationWalker.java | AbstractCompilationWalker | walkCompilations |
TreeVisitor.walkTree(model, this);
| class AbstractCompilationWalker extends AbstractCompilationVisitable implements ITreeVisitable
{
protected IReadOnlyJITDataModel model;
public AbstractCompilationWalker(IReadOnlyJITDataModel model)
{
this.model = model;
}
public void walkCompilations()
{<FILL_FUNCTION_BODY>}
@Override
public void visitT... | 116 | 17 | 133 |
for (Compilation compilation : model.getCompilations())
{
visitCompilation(compilation);
}
| /*
* Copyright (c) 2017 Chris Newland.
* Licensed under https://github.com/AdoptOpenJDK/jitwatch/blob/master/LICENSE-BSD
* Instructions: https://github.com/AdoptOpenJDK/jitwatch/wiki
*/
package org.adoptopenjdk.jitwatch.compilation;
import org.adoptopenjdk.jitwatch.model.IParseDictionary;
import org.adoptopenjdk.j... | <COMPILED_SUCCESSFULLY> |
AdoptOpenJDK_jitwatch | jitwatch/core/src/main/java/org/adoptopenjdk/jitwatch/compilation/codecache/CodeCacheEventWalker.java | CodeCacheEventWalker | visit |
if (metaMember != null && metaMember.isCompiled())
{
for (Compilation compilation : metaMember.getCompilations())
{
if (compilation.isFailed())
{
continue;
}
String address = compilation.getNativeAddress(); // hex string
if (address != null)
{
long addressLong = 0;
l... | class CodeCacheEventWalker extends AbstractCompilationWalker
{
private CodeCacheWalkerResult result = new CodeCacheWalkerResult();
private static final Logger logger = LoggerFactory.getLogger(CodeCacheEventWalker.class);
public CodeCacheEventWalker(IReadOnlyJITDataModel model)
{
super(model);
}
@Override
pu... | 155 | 343 | 498 |
if (metaMember instanceof ICodeCacheEvent)
{
ICodeCacheEvent codeCacheEvent = (ICodeCacheEvent) metaMember;
result.addCodeCacheEvent(codeCacheEvent);
}
else
{
logger.warn("Unknown meta member type: " + metaMember.getClass().getName());
}
| /*
* Copyright (c) 2017-2021 Chris Newland.
* Licensed under https://github.com/AdoptOpenJDK/jitwatch/blob/master/LICENSE-BSD
* Instructions: https://github.com/AdoptOpenJDK/jitwatch/wiki
*/
package org.adoptopenjdk.jitwatch.compilation.codecache;
import org.adoptopenjdk.jitwatch.compilation.AbstractCompilationWal... | <COMPILED_SUCCESSFULLY> |
AdoptOpenJDK_jitwatch | jitwatch/core/src/main/java/org/adoptopenjdk/jitwatch/core/ErrorLog.java | ErrorLog | addEntry |
if (errorCountMap.containsKey(entry))
{
errorCountMap.put(entry, errorCountMap.get(entry) + 1);
}
else
{
errorCountMap.put(entry, 1);
}
| class ErrorLog
{
private Map<String, Integer> errorCountMap = new LinkedHashMap<>();
public void clear()
{
errorCountMap.clear();
}
public void addEntry(String entry)
{<FILL_FUNCTION_BODY>}
@Override
public String toString()
{
StringBuilder builder = new StringBuilder();
for (Map.Entry<String, Intege... | 256 | 67 | 323 |
String[] parts = entry.split(S_SPACE);
String msg = parts[0];
int count = 1;
if (parts.length > 1)
{
try
{
count = Integer.parseInt(parts[1]);
}
catch (NumberFormatException e)
{
// ignore
}
}
Integer countInteger = errorCountMap.get(msg);
if (countInteger == null)
{
c... | /*
* Copyright (c) 2013-2017 Chris Newland.
* Licensed under https://github.com/AdoptOpenJDK/jitwatch/blob/master/LICENSE-BSD
* Instructions: https://github.com/AdoptOpenJDK/jitwatch/wiki
*/
package org.adoptopenjdk.jitwatch.core;
import static org.adoptopenjdk.jitwatch.core.JITWatchConstants.S_CLOSE_PARENTHESES;
... | <COMPILED_SUCCESSFULLY> |
AdoptOpenJDK_jitwatch | jitwatch/core/src/main/java/org/adoptopenjdk/jitwatch/core/TagProcessor.java | TagProcessor | processValidLine |
if (DEBUG_LOGGING_TAGPROCESSOR)
{
logger.debug("processValidLine(line:{}, indexEndName:{}, selfClosing:{})", line, indexEndName, selfClosing);
}
Tag result = null;
String name = line.substring(1, indexEndName);
String attributeString = line.substring(indexEndName);
Map<String, String> attrs = Stri... | class TagProcessor
{
private static final Logger logger = LoggerFactory.getLogger(TagProcessor.class);
private Stack<String> methodIDStack = new Stack<>();
private Tag currentTag;
private Tag topTag = null;
private boolean fragmentSeen;
public String getTopTagName()
{
String result = null;
if (topTag !=... | 1,017 | 1,008 | 2,025 |
Tag result = null;
String name = line.substring(2, indexEndName);
if (S_FRAGMENT.equals(name))
{
fragmentSeen = true;
}
if (S_METHOD.equals(name))
{
if (JITWatchConstants.TAG_PARSE.equals(topTag.getName()))
{
methodIDStack.push(name);
}
}
else if (S_CLASS.equals(name))
{
if (J... | /*
* Copyright (c) 2013-2021 Chris Newland.
* Licensed under https://github.com/AdoptOpenJDK/jitwatch/blob/master/LICENSE-BSD
* Instructions: https://github.com/AdoptOpenJDK/jitwatch/wiki
*/
package org.adoptopenjdk.jitwatch.core;
import static org.adoptopenjdk.jitwatch.core.JITWatchConstants.C_CLOSE_ANGLE;
import... | Line: 232, Column: 2, Error: reached end of file while parsing)
|
AdoptOpenJDK_jitwatch | jitwatch/core/src/main/java/org/adoptopenjdk/jitwatch/histo/AbstractHistoVisitable.java | AbstractHistoVisitable | buildHistogram |
histo = new Histo(resolution);
TreeVisitor.walkTree(model, this);
return histo;
| class AbstractHistoVisitable extends AbstractCompilationVisitable implements IHistoVisitable
{
protected Histo histo;
protected IReadOnlyJITDataModel model;
protected long resolution;
public AbstractHistoVisitable(IReadOnlyJITDataModel model, long resolution)
{
this.model = model;
this.resolution = resolution... | 158 | 37 | 195 |
return histo;
| /*
* Copyright (c) 2013-2015 Chris Newland.
* Licensed under https://github.com/AdoptOpenJDK/jitwatch/blob/master/LICENSE-BSD
* Instructions: https://github.com/AdoptOpenJDK/jitwatch/wiki
*/
package org.adoptopenjdk.jitwatch.histo;
import org.adoptopenjdk.jitwatch.compilation.AbstractCompilationVisitable;
import o... | <COMPILED_SUCCESSFULLY> |
AdoptOpenJDK_jitwatch | jitwatch/core/src/main/java/org/adoptopenjdk/jitwatch/hotthrow/HotThrowFinder.java | HotThrowFinder | visitTag |
String currentMethod = null;
String holder = null;
String currentBCI = null;
Map<String, String> attrs = parseTag.getAttributes();
String methodID = attrs.get(ATTR_METHOD);
Tag methodTag = parseDictionary.getMethod(methodID);
Map<String, String> methodTagAttributes = methodTag.getAttributes();
cur... | class HotThrowFinder extends AbstractCompilationVisitable
{
private Set<HotThrowResult> result;
private IReadOnlyJITDataModel model;
private static final Logger logger = LoggerFactory.getLogger(HotThrowFinder.class);
public HotThrowFinder(IReadOnlyJITDataModel model)
{
this.model = model;
ignoreTags.add(TAG... | 497 | 938 | 1,435 |
if (ignoreTags.contains(parseTag.getTag()))
{
return;
}
if (parseTag.getTag().equals(TAG_HOT_THROW))
{
HotThrowResult hotThrowResult = new HotThrowResult();
hotThrowResult.setHotThrow(parseTag.getArgument(0));
hotThrowResult.setHotThrowCount(parseTag.getArgument(1));
hotThrowResult.setHotThro... | /*
* Copyright (c) 2016-2021 Chris Newland.
* Licensed under https://github.com/AdoptOpenJDK/jitwatch/blob/master/LICENSE-BSD
* Instructions: https://github.com/AdoptOpenJDK/jitwatch/wiki
*/
package org.adoptopenjdk.jitwatch.hotthrow;
import static org.adoptopenjdk.jitwatch.core.JITWatchConstants.ATTR_HOLDER;
impo... | Line: 129, Column: 143, Error: ')' expected)
|
AdoptOpenJDK_jitwatch | jitwatch/core/src/main/java/org/adoptopenjdk/jitwatch/jarscan/allocationcount/AllocCountMap.java | AllocCountMap | countAllocationOfType |
Integer count = typeCountMap.get(type);
if (count == null)
{
count = 1;
}
else
{
count++;
}
typeCountMap.put(type, count);
| class AllocCountMap
{
private Map<String, Integer> typeCountMap = new TreeMap<>();
public void countAllocationOfType(String type)
{<FILL_FUNCTION_BODY>}
public String toString(Opcode prefix, int limitPerInvoke)
{
StringBuilder builder = new StringBuilder();
List<Map.Entry<String, Integer>> sortedList = ... | 413 | 70 | 483 |
Integer count = typeCountMap.get(type);
if (count == null)
{
count = 0;
}
typeCountMap.put(type, count + 1);
| /*
* Copyright (c) 2013-2017 Chris Newland.
* Licensed under https://github.com/AdoptOpenJDK/jitwatch/blob/master/LICENSE-BSD
* Instructions: https://github.com/AdoptOpenJDK/jitwatch/wiki
*/
package org.adoptopenjdk.jitwatch.jarscan.allocationcount;
import static org.adoptopenjdk.jitwatch.core.JITWatchConstants.C_... | <COMPILED_SUCCESSFULLY> |
AdoptOpenJDK_jitwatch | jitwatch/core/src/main/java/org/adoptopenjdk/jitwatch/jarscan/invokecount/InvokeMethodCountMap.java | InvokeMethodCountMap | countInvocationOfMethod |
MethodCountMap invokeCountMap = opcodeMap.get(opcode);
if (invokeCountMap == null)
{
invokeCountMap = new MethodCountMap();
opcodeMap.put(opcode, invokeCountMap);
}
invokeCountMap.count(method);
| class InvokeMethodCountMap
{
private Map<Opcode, MethodCountMap> opcodeMap = new EnumMap<>(Opcode.class);
public void countInvocationOfMethod(Opcode opcode, String method)
{<FILL_FUNCTION_BODY>}
public String toString(int limitPerInvoke)
{
StringBuilder builder = new StringBuilder();
for (Map.Entry<Opcode, ... | 185 | 79 | 264 |
MethodCountMap invokeCountMap = opcodeMap.get(opcode);
if (invokeCountMap == null)
{
invokeCountMap = new MethodCountMap();
opcodeMap.put(opcode, invokeCountMap);
}
invokeCountMap.countInvocation(method);
| /*
* Copyright (c) 2013-2016 Chris Newland.
* Licensed under https://github.com/AdoptOpenJDK/jitwatch/blob/master/LICENSE-BSD
* Instructions: https://github.com/AdoptOpenJDK/jitwatch/wiki
*/
package org.adoptopenjdk.jitwatch.jarscan.invokecount;
import java.util.EnumMap;
import java.util.Map;
import org.adoptopen... | <COMPILED_SUCCESSFULLY> |
AdoptOpenJDK_jitwatch | jitwatch/core/src/main/java/org/adoptopenjdk/jitwatch/jarscan/invokecount/MethodCountMap.java | MethodCountMap | toString |
StringBuilder builder = new StringBuilder();
List<Map.Entry<String, Integer>> sortedList = new ArrayList<>(methodCountMap.entrySet());
Collections.sort(sortedList, new Comparator<Map.Entry<String, Integer>>()
{
@Override
public int compare(Map.Entry<String, Integer> o1, Map.Entry<String, Integer> o2)... | class MethodCountMap
{
private Map<String, Integer> methodCountMap = new TreeMap<>();
public void count(String method)
{
Integer count = methodCountMap.get(method);
if (count == null)
{
count = 1;
}
else
{
count++;
}
methodCountMap.put(method, count);
}
public String toString(Opcode... | 139 | 338 | 477 |
StringBuilder sb = new StringBuilder();
for (Map.Entry<String, Integer> entry : methodCountMap.entrySet())
{
if (sb.length() > 0)
{
sb.append(", ");
}
sb.append(prefix).append(entry.getKey()).append(" = ").append(entry.getValue());
if (entry.getValue() > limitPerInvoke)
{
sb.... | /*
* Copyright (c) 2013-2017 Chris Newland.
* Licensed under https://github.com/AdoptOpenJDK/jitwatch/blob/master/LICENSE-BSD
* Instructions: https://github.com/AdoptOpenJDK/jitwatch/wiki
*/
package org.adoptopenjdk.jitwatch.jarscan.invokecount;
import static org.adoptopenjdk.jitwatch.core.JITWatchConstants.C_COMM... | <COMPILED_SUCCESSFULLY> |
AdoptOpenJDK_jitwatch | jitwatch/core/src/main/java/org/adoptopenjdk/jitwatch/jarscan/methodlength/MethodLengthOperation.java | MethodLengthOperation | processInstructions |
List<BytecodeInstruction> instructions = memberBytecode.getInstructions();
if (instructions != null && instructions.size() > 0)
{
BytecodeInstruction lastInstruction = instructions.get(instructions.size() - 1);
// final instruction is a return for 1 byte
int bcSize = 1 + lastInstruction.getOffset();
... | class MethodLengthOperation implements IJarScanOperation
{
private int findSize;
private Map<MemberSignatureParts, Integer> methodMap = new HashMap<>();
public MethodLengthOperation(int findSize)
{
this.findSize = findSize;
}
@Override
public String getReport()
{
List<Map.Entry<MemberSignatureParts, Inte... | 686 | 171 | 857 |
MemberSignatureParts msp = memberBytecode.getMemberSignatureParts();
Integer size = methodMap.get(msp);
if (size == null)
{
size = 0;
}
size += memberBytecode.getBytecodeSize();
methodMap.put(msp, size);
| /*
* Copyright (c) 2013-2016 Chris Newland.
* Licensed under https://github.com/AdoptOpenJDK/jitwatch/blob/master/LICENSE-BSD
* Instructions: https://github.com/AdoptOpenJDK/jitwatch/wiki
*/
package org.adoptopenjdk.jitwatch.jarscan.methodlength;
import static org.adoptopenjdk.jitwatch.core.JITWatchConstants.C_COM... | <COMPILED_SUCCESSFULLY> |
AdoptOpenJDK_jitwatch | jitwatch/core/src/main/java/org/adoptopenjdk/jitwatch/jarscan/nextinstruction/NextInstructionOperation.java | NextInstructionOperation | getReport |
if (nextBytecodeMap == null)
{
calculate();
}
StringBuilder builder = new StringBuilder();
List<Map.Entry<Opcode, NextInstructionCountList>> sortedList = new ArrayList<>(nextBytecodeMap.entrySet());
Collections.sort(sortedList, new Comparator<Map.Entry<Opcode, NextInstructionCountList>>()
{
@O... | class NextInstructionOperation extends SequenceCountOperation
{
private Map<Opcode, NextInstructionCountList> nextBytecodeMap;
private int maxChildren = 0;
public NextInstructionOperation(int maxChildren)
{
super(2);
this.maxChildren = maxChildren;
}
private void calculate()
{
nextBytecodeMap = new Enu... | 368 | 386 | 754 |
StringBuilder sb = new StringBuilder();
sb.append("Next instruction count: ");
Map<Opcode, NextInstructionCountList> nextBytecodeMap = getNextBytecodeMap();
for (Map.Entry<Opcode, NextInstructionCountList> entry : nextBytecodeMap.entrySet())
{
Opcode root = entry.getKey();
NextInstructionCountList ... | /*
* Copyright (c) 2013-2016 Chris Newland.
* Licensed under https://github.com/AdoptOpenJDK/jitwatch/blob/master/LICENSE-BSD
* Instructions: https://github.com/AdoptOpenJDK/jitwatch/wiki
*/
package org.adoptopenjdk.jitwatch.jarscan.nextinstruction;
import static org.adoptopenjdk.jitwatch.core.JITWatchConstants.S_... | <COMPILED_SUCCESSFULLY> |
AdoptOpenJDK_jitwatch | jitwatch/core/src/main/java/org/adoptopenjdk/jitwatch/jarscan/sequencecount/InstructionSequence.java | InstructionSequence | equals |
return toString().equals(obj.toString());
| class InstructionSequence implements Comparable<InstructionSequence>
{
private List<Opcode> sequence = new ArrayList<>();
public InstructionSequence(List<Opcode> opcodeList)
{
sequence.addAll(opcodeList);
}
@Override
public String toString()
{
StringBuilder builder = new StringBuilder();
for (Opcode opc... | 265 | 15 | 280 |
if (obj == null)
{
return false;
}
if (obj == this)
{
return true;
}
if (!(obj instanceof InstructionSequence))
{
return false;
}
return toString().equals(((InstructionSequence) obj).toString());
| /*
* Copyright (c) 2013-2016 Chris Newland.
* Licensed under https://github.com/AdoptOpenJDK/jitwatch/blob/master/LICENSE-BSD
* Instructions: https://github.com/AdoptOpenJDK/jitwatch/wiki
*/
package org.adoptopenjdk.jitwatch.jarscan.sequencecount;
import java.util.ArrayList;
import java.util.List;
import org.adop... | <COMPILED_SUCCESSFULLY> |
AdoptOpenJDK_jitwatch | jitwatch/core/src/main/java/org/adoptopenjdk/jitwatch/jarscan/sequencecount/SequenceCountOperation.java | SequenceCountOperation | getSortedData |
List<Map.Entry<InstructionSequence, Integer>> result = new ArrayList<>(chainCountMap.entrySet());
Collections.sort(result, new Comparator<Map.Entry<InstructionSequence, Integer>>()
{
@Override
public int compare(Map.Entry<InstructionSequence, Integer> o1, Map.Entry<InstructionSequence, Integer> o2)
{
... | class SequenceCountOperation implements IJarScanOperation
{
protected Map<InstructionSequence, Integer> chainCountMap = new TreeMap<>();
private List<Opcode> chain = new LinkedList<>();
private int maxLength = 0;
public SequenceCountOperation(int maxLength)
{
this.maxLength = maxLength;
}
private void stor... | 1,186 | 127 | 1,313 |
List<Map.Entry<InstructionSequence, Integer>> sortedData = new ArrayList<>(chainCountMap.entrySet());
Collections.sort(sortedData, new Comparator<Map.Entry<InstructionSequence, Integer>>()
{
@Override
public int compare(Map.Entry<InstructionSequence, Integer> o1, Map.Entry<InstructionSequence, Integer> o2... | /*
* Copyright (c) 2013-2017 Chris Newland.
* Licensed under https://github.com/AdoptOpenJDK/jitwatch/blob/master/LICENSE-BSD
* Instructions: https://github.com/AdoptOpenJDK/jitwatch/wiki
*/
package org.adoptopenjdk.jitwatch.jarscan.sequencecount;
import static org.adoptopenjdk.jitwatch.core.JITWatchConstants.S_NE... | <COMPILED_SUCCESSFULLY> |
AdoptOpenJDK_jitwatch | jitwatch/core/src/main/java/org/adoptopenjdk/jitwatch/jarscan/sequencesearch/FoundSequence.java | FoundSequence | equals |
if (this == obj)
{
return true;
}
if (obj == null)
{
return false;
}
if (getClass() != obj.getClass())
{
return false;
}
FoundSequence other = (FoundSequence) obj;
if (msp == null)
{
if (other.msp != null)
{
return false;
}
}
else if (!msp.equals(other.msp))
... | class FoundSequence
{
private int startingBCI;
private MemberSignatureParts msp;
public FoundSequence(int startingBCI, MemberSignatureParts msp)
{
this.startingBCI = startingBCI;
this.msp = msp;
}
public int getStartingBCI()
{
return startingBCI;
}
public MemberSignatureParts getMemberSignatureParts(... | 248 | 186 | 434 |
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass()!= obj.getClass())
return false;
FoundSequence other = (FoundSequence) obj;
if (msp == null)
{
if (other.msp!= null)
return false;
} else if (!msp.equals(other.msp))
return false;
if (startingBCI!= other.start... | /*
* Copyright (c) 2013-2016 Chris Newland.
* Licensed under https://github.com/AdoptOpenJDK/jitwatch/blob/master/LICENSE-BSD
* Instructions: https://github.com/AdoptOpenJDK/jitwatch/wiki
*/
package org.adoptopenjdk.jitwatch.jarscan.sequencesearch;
import org.adoptopenjdk.jitwatch.model.MemberSignatureParts;
publ... | <COMPILED_SUCCESSFULLY> |
AdoptOpenJDK_jitwatch | jitwatch/core/src/main/java/org/adoptopenjdk/jitwatch/jarscan/sequencesearch/SequenceSearchOperation.java | SequenceSearchOperation | handleChainStartingAtIndex |
boolean stopChain = false;
boolean abandonChain = false;
boolean matched = false;
Set<Integer> visitedBCI = new HashSet<>();
while (chain.size() < wantedChain.size())
{
BytecodeInstruction instruction = instructions.get(index);
int instrBCI = instruction.getOffset();
visitedBCI.add(instrBCI);... | class SequenceSearchOperation implements IJarScanOperation
{
private List<FoundSequence> matchingMethods = new ArrayList<>();
private List<Opcode> chain = new LinkedList<>();
private List<Opcode> wantedChain = new LinkedList<>();
public SequenceSearchOperation(String sequence)
{
String[] searchSequence = sequ... | 846 | 611 | 1,457 |
boolean matched = false;
BytecodeInstruction instruction = instructions.get(index);
if (instruction.getOpcode() == Opcode.NOP)
{
matched = handleChainStartingAtIndex(index + 1, instructions);
}
else
{
chain.add(instruction.getOpcode());
if (compareChains())
{
matched = true;
}
el... | /*
* Copyright (c) 2013-2016 Chris Newland.
* Licensed under https://github.com/AdoptOpenJDK/jitwatch/blob/master/LICENSE-BSD
* Instructions: https://github.com/AdoptOpenJDK/jitwatch/wiki
*/
package org.adoptopenjdk.jitwatch.jarscan.sequencesearch;
import static org.adoptopenjdk.jitwatch.core.JITWatchConstants.S_C... | <COMPILED_SUCCESSFULLY> |
AdoptOpenJDK_jitwatch | jitwatch/core/src/main/java/org/adoptopenjdk/jitwatch/jvmlang/LanguageManager.java | LanguageManager | getLanguageFromFile |
String result = null;
String fileExtension = getFileExtension(sourceFile);
if (fileExtension != null)
{
fileExtension = fileExtension.toLowerCase();
switch (fileExtension)
{
case "java":
result = VM_LANGUAGE_JAVA;
break;
case "scala":
result = VM_LANGUAGE_SCALA;
break;
case... | class LanguageManager
{
private JITWatchConfig config;
private ILogListener logListener;
public LanguageManager(JITWatchConfig config, ILogListener logListener)
{
this.config = config;
this.logListener = logListener;
}
public ICompiler getCompiler(String vmLanguage, String languageHomeDir)
{
ICompiler re... | 1,240 | 280 | 1,520 |
String result = null;
if (sourceFile!= null)
{
String filename = sourceFile.getName();
int lastDotPos = filename.lastIndexOf(C_DOT);
if (lastDotPos!= -1)
{
result = filename.substring(lastDotPos + 1);
}
}
return result;
| /*
* Copyright (c) 2013-2015 Chris Newland.
* Licensed under https://github.com/AdoptOpenJDK/jitwatch/blob/master/LICENSE-BSD
* Instructions: https://github.com/AdoptOpenJDK/jitwatch/wiki
*/
package org.adoptopenjdk.jitwatch.jvmlang;
import static org.adoptopenjdk.jitwatch.core.JITWatchConstants.C_DOT;
import stat... | <COMPILED_SUCCESSFULLY> |
AdoptOpenJDK_jitwatch | jitwatch/core/src/main/java/org/adoptopenjdk/jitwatch/loader/DisposableURLClassLoader.java | DisposableURLClassLoader | getURLListCopy |
return Collections.unmodifiableList(urlList);
| class DisposableURLClassLoader extends URLClassLoader
{
private List<URL> urlList = new ArrayList<>();
public DisposableURLClassLoader(final List<URL> urls)
{
super(urls.toArray(new URL[urls.size()]));
urlList.addAll(urls);
}
public List<URL> getURLListCopy()
{<FILL_FUNCTION_BODY>}
} | 114 | 17 | 131 |
return new ArrayList<>(urlList);
| /*
* Copyright (c) 2013-2015 Chris Newland.
* Licensed under https://github.com/AdoptOpenJDK/jitwatch/blob/master/LICENSE-BSD
* Instructions: https://github.com/AdoptOpenJDK/jitwatch/wiki
*/
package org.adoptopenjdk.jitwatch.loader;
import java.net.URL;
import java.net.URLClassLoader;
import java.util.ArrayList;
i... | <COMPILED_SUCCESSFULLY> |
AdoptOpenJDK_jitwatch | jitwatch/core/src/main/java/org/adoptopenjdk/jitwatch/model/AnnotationException.java | AnnotationException | getMessage |
StringBuilder builder = new StringBuilder();
builder.append(super.getMessage());
builder.append(" at offset: ").append(bytecodeOffset).append(C_SPACE);
builder.append("but was mnemonic: ");
if (instruction != null && instruction.getOpcode() != null)
{
builder.append(instruction.getOpcode().getMnemonic... | class AnnotationException extends Exception
{
private static final long serialVersionUID = 1L;
private int bytecodeOffset;
private BytecodeInstruction instruction;
public AnnotationException(String msg, int offset, BytecodeInstruction instruction)
{
super(msg);
this.bytecodeOffset = offset;
this.instructio... | 152 | 139 | 291 |
return super.getMessage() + " at " + bytecodeOffset + " " + instruction;
| /*
* Copyright (c) 2013-2015 Chris Newland.
* Licensed under https://github.com/AdoptOpenJDK/jitwatch/blob/master/LICENSE-BSD
* Instructions: https://github.com/AdoptOpenJDK/jitwatch/wiki
*/
package org.adoptopenjdk.jitwatch.model;
import org.adoptopenjdk.jitwatch.model.bytecode.BytecodeInstruction;
import static... | <COMPILED_SUCCESSFULLY> |
AdoptOpenJDK_jitwatch | jitwatch/core/src/main/java/org/adoptopenjdk/jitwatch/model/CodeCacheEvent.java | CodeCacheEvent | setNativeAddress |
this.nativeAddress = address;
| class CodeCacheEvent
{
public enum CodeCacheEventType
{
COMPILATION, SWEEPER, CACHE_FULL
};
private CodeCacheEventType eventType;
private long stamp;
private long nativeCodeSize;
private long freeCodeCache;
private long nativeAddress;
private Compilation compilation;
private int compilationLevel;
pub... | 372 | 12 | 384 |
this.nativeAddress = address;
| /*
* Copyright (c) 2013-2017 Chris Newland.
* Licensed under https://github.com/AdoptOpenJDK/jitwatch/blob/master/LICENSE-BSD
* Instructions: https://github.com/AdoptOpenJDK/jitwatch/wiki
*/
package org.adoptopenjdk.jitwatch.model;
public class CodeCacheEvent
{
public enum CodeCacheEventType
{
COMPILATION, SWE... | <COMPILED_SUCCESSFULLY> |
AdoptOpenJDK_jitwatch | jitwatch/core/src/main/java/org/adoptopenjdk/jitwatch/model/CompilerThread.java | CompilerThread | getLatestNMethodEmittedTime |
long result = 0;
if (!compilations.isEmpty())
{
Compilation first = compilations.get(0);
result = first.getStampNMethodEmitted();
}
for (Compilation compilation : compilations)
{
long emitted = compilation.getStampNMethodEmitted();
if (emitted > result)
{
result = emitted;
}
... | class CompilerThread
{
private String threadId;
private String threadName;
private List<Compilation> compilations;
public String getThreadId()
{
return threadId;
}
public CompilerThread(String threadId, String threadName)
{
this.threadId = threadId;
this.threadName = threadName;
compilations = new ... | 609 | 128 | 737 |
long result = 0;
if (!compilations.isEmpty())
{
Compilation first = compilations.get(0);
result = first.getStampNMethodEmitted();
}
for (Compilation compilation : compilations)
{
if (compilation.getStampNMethodEmitted() > result)
{
result = compilation.getStampNMethodEmitted();
}
}
... | /*
* Copyright (c) 2017 Chris Newland.
* Licensed under https://github.com/AdoptOpenJDK/jitwatch/blob/master/LICENSE-BSD
* Instructions: https://github.com/AdoptOpenJDK/jitwatch/wiki
*/
package org.adoptopenjdk.jitwatch.model;
import java.util.ArrayList;
import java.util.List;
public class CompilerThread
{
priv... | <COMPILED_SUCCESSFULLY> |
AdoptOpenJDK_jitwatch | jitwatch/core/src/main/java/org/adoptopenjdk/jitwatch/model/EliminatedAllocation.java | EliminatedAllocation | getBytecodeOffset |
return bytecodeOffset;
| class EliminatedAllocation
{
private String type;
private int bytecodeOffset;
public String getType()
{
return type;
}
public void setType(String type)
{
this.type = type;
}
public int getBytecodeOffset()
{<FILL_FUNCTION_BODY>}
public void setBytecodeOffset(int bytecodeOffset)
{
this.bytecodeOffse... | 155 | 10 | 165 |
return bytecodeOffset;
| /*
* Copyright (c) 2013-2015 Chris Newland.
* Licensed under https://github.com/AdoptOpenJDK/jitwatch/blob/master/LICENSE-BSD
* Instructions: https://github.com/AdoptOpenJDK/jitwatch/wiki
*/
package org.adoptopenjdk.jitwatch.model;
public class EliminatedAllocation
{
private String type;
private int bytecodeOffs... | <COMPILED_SUCCESSFULLY> |
AdoptOpenJDK_jitwatch | jitwatch/core/src/main/java/org/adoptopenjdk/jitwatch/model/JITEvent.java | JITEvent | toString |
StringBuilder sb = new StringBuilder();
sb.append(StringUtil.formatTimestamp(stamp, true)).append(C_SPACE);
sb.append(StringUtil.alignRight(eventType.getText(), 14)).append(C_SPACE).append(C_COLON).append(C_SPACE);
sb.append(eventMember.toString());
return sb.toString()... | class JITEvent
{
private long stamp;
private EventType eventType;
private IMetaMember eventMember;
public JITEvent(long stamp, EventType eventType, IMetaMember eventMember)
{
this.stamp = stamp;
this.eventType = eventType;
this.eventMember = eventMember;
}
public lo... | 181 | 102 | 283 |
return "JITEvent{" +
"stamp=" + stamp +
", eventType=" + eventType +
", eventMember=" + eventMember +
'}';
| /*
* Copyright (c) 2013-2016 Chris Newland.
* Licensed under https://github.com/AdoptOpenJDK/jitwatch/blob/master/LICENSE-BSD
* Instructions: https://github.com/AdoptOpenJDK/jitwatch/wiki
*/
package org.adoptopenjdk.jitwatch.model;
import static org.adoptopenjdk.jitwatch.core.JITWatchConstants.C_COLON;
import stat... | <COMPILED_SUCCESSFULLY> |
AdoptOpenJDK_jitwatch | jitwatch/core/src/main/java/org/adoptopenjdk/jitwatch/model/JITStats.java | JITStats | incCountProtected |
countProtected++;
| class JITStats
{
// method modifiers
private long countPrivate = 0;
private long countProtected = 0;
private long countPublic = 0;
private long countStatic = 0;
private long countFinal = 0;
private long countSynchronized = 0;
private long countStrictfp = 0;
private long countNative = 0;
private long countAbst... | 1,245 | 12 | 1,257 |
countProtected++;
| /*
* Copyright (c) 2013-2015 Chris Newland.
* Licensed under https://github.com/AdoptOpenJDK/jitwatch/blob/master/LICENSE-BSD
* Instructions: https://github.com/AdoptOpenJDK/jitwatch/wiki
*/
package org.adoptopenjdk.jitwatch.model;
public class JITStats
{
// method modifiers
private long countPrivate = 0;
priva... | <COMPILED_SUCCESSFULLY> |
AdoptOpenJDK_jitwatch | jitwatch/core/src/main/java/org/adoptopenjdk/jitwatch/model/MetaConstructor.java | MetaConstructor | toString |
String methodSigWithoutThrows = constructorToString;
int closingParentheses = methodSigWithoutThrows.indexOf(JITWatchConstants.S_CLOSE_PARENTHESES);
if (closingParentheses != methodSigWithoutThrows.length() - 1)
{
methodSigWithoutThrows = methodSigWithoutThrows.substring(0, closingParentheses + 1);
}
... | class MetaConstructor extends AbstractMetaMember
{
private String constructorToString;
public MetaConstructor(Constructor<?> constructor, MetaClass methodClass)
{
super(StringUtil.getUnqualifiedMemberName(constructor.getName()));
this.constructorToString = constructor.toString();
this.metaClass = methodCla... | 201 | 123 | 324 |
return constructorToString;
| /*
* Copyright (c) 2013-2016 Chris Newland.
* Licensed under https://github.com/AdoptOpenJDK/jitwatch/blob/master/LICENSE-BSD
* Instructions: https://github.com/AdoptOpenJDK/jitwatch/wiki
*/
package org.adoptopenjdk.jitwatch.model;
import static org.adoptopenjdk.jitwatch.core.JITWatchConstants.DEBUG_MEMBER_CREATIO... | <COMPILED_SUCCESSFULLY> |
AdoptOpenJDK_jitwatch | jitwatch/core/src/main/java/org/adoptopenjdk/jitwatch/model/NumberedLine.java | NumberedLine | getLine |
return line;
| class NumberedLine
{
private long lineNumber;
private String line;
public long getLineNumber()
{
return lineNumber;
}
public void setLineNumber(long lineNumber)
{
this.lineNumber = lineNumber;
}
public String getLine()
{<FILL_FUNCTION_BODY>}
public void setLine(String line)
{
this.line = line;
}
... | 143 | 8 | 151 |
return line;
| /*
* Copyright (c) 2013-2015 Chris Newland.
* Licensed under https://github.com/AdoptOpenJDK/jitwatch/blob/master/LICENSE-BSD
* Instructions: https://github.com/AdoptOpenJDK/jitwatch/wiki
*/
package org.adoptopenjdk.jitwatch.model;
public class NumberedLine
{
private long lineNumber;
private String line;
publi... | <COMPILED_SUCCESSFULLY> |
AdoptOpenJDK_jitwatch | jitwatch/core/src/main/java/org/adoptopenjdk/jitwatch/model/ParsedClasspath.java | ParsedClasspath | getClassLocations |
List<String> asList = new ArrayList<>(classLocationSet);
Collections.sort(asList);
return Collections.unmodifiableList(asList);
| class ParsedClasspath
{
private Set<String> classLocationSet = new HashSet<>();
public void clear()
{
classLocationSet.clear();
}
public void addClassLocation(String location)
{
classLocationSet.add(location);
}
public List<String> getClassLocations()
{<FILL_FUNCTION_BODY>}
} | 100 | 49 | 149 |
return new ArrayList<>(classLocationSet);
| /*
* Copyright (c) 2013-2015 Chris Newland.
* Licensed under https://github.com/AdoptOpenJDK/jitwatch/blob/master/LICENSE-BSD
* Instructions: https://github.com/AdoptOpenJDK/jitwatch/wiki
*/
package org.adoptopenjdk.jitwatch.model;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashSet;... | <COMPILED_SUCCESSFULLY> |
AdoptOpenJDK_jitwatch | jitwatch/core/src/main/java/org/adoptopenjdk/jitwatch/model/SplitLog.java | SplitLog | addAssemblyLine |
assemblyLines.add(line);
| class SplitLog
{
private List<NumberedLine> headerLines = new ArrayList<>();
private List<NumberedLine> classLoaderLines = new ArrayList<>();
private List<NumberedLine> compilationLines = new ArrayList<>();
private List<NumberedLine> assemblyLines = new ArrayList<>();
public void clear()
{
headerLines.clear()... | 382 | 14 | 396 |
assemblyLines.add(line);
| /*
* Copyright (c) 2013-2017 Chris Newland.
* Licensed under https://github.com/AdoptOpenJDK/jitwatch/blob/master/LICENSE-BSD
* Instructions: https://github.com/AdoptOpenJDK/jitwatch/wiki
*/
package org.adoptopenjdk.jitwatch.model;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
p... | <COMPILED_SUCCESSFULLY> |
AdoptOpenJDK_jitwatch | jitwatch/core/src/main/java/org/adoptopenjdk/jitwatch/model/Task.java | Task | addBCIOpcodeMapping |
if (DEBUG_LOGGING_PARSE_DICTIONARY)
{
logger.debug("Adding bci mapping: {} {} {}", methodID, bci, opcode);
}
parseDictionary.putBCIOpcode(methodID, bci, opcode);
| class Task extends Tag
{
private static final Logger logger = LoggerFactory.getLogger(Task.class);
private IParseDictionary parseDictionary;
public Task(String attributeString, boolean selfClosing)
{
super(TAG_TASK, attributeString, selfClosing);
parseDictionary = new ParseDictionary(getAttributes().get(ATT... | 844 | 74 | 918 |
if (DEBUG_LOGGING_PARSE_DICTIONARY)
{
logger.debug("Adding bci: {} opcode: {}", bci, opcode);
}
parseDictionary.putBCI(bci, opcode);
| /*
* Copyright (c) 2013-2021 Chris Newland.
* Licensed under https://github.com/AdoptOpenJDK/jitwatch/blob/master/LICENSE-BSD
* Instructions: https://github.com/AdoptOpenJDK/jitwatch/wiki
*/
package org.adoptopenjdk.jitwatch.model;
import static org.adoptopenjdk.jitwatch.core.JITWatchConstants.C_SPACE;
import stat... | <COMPILED_SUCCESSFULLY> |
AdoptOpenJDK_jitwatch | jitwatch/core/src/main/java/org/adoptopenjdk/jitwatch/model/assembly/AssemblyInstruction.java | AssemblyInstruction | toString |
StringBuilder builder = new StringBuilder();
builder.append(StringUtil.alignLeft(annotation, annoWidth));
if (useLocalLabels)
{
labels.formatAddress(address, builder);
}
else
{
builder.append(S_HEX_PREFIX).append(StringUtil.pad(Long.toHexString(address), 16, '0', true));
}
builder.append(C_C... | class AssemblyInstruction
{
private String annotation;
private long address;
private List<String> prefixes;
private String mnemonic;
private List<String> operands = new ArrayList<>();
private List<String> commentLines = new ArrayList<>();
private final AssemblyLabels labels;
private boolean isSafePoint = false;... | 1,349 | 572 | 1,921 |
StringBuilder builder = new StringBuilder();
builder.append(StringUtil.alignLeft(annotation, annoWidth));
if (useLocalLabels)
{
labels.formatAddress(address, builder);
}
else
{
builder.append(S_HEX_PREFIX).append(StringUtil.pad(Long.toHexString(address), 16, '0', true));
}
builder.append(C_C... | /*
* Copyright (c) 2013-2017 Chris Newland.
* Licensed under https://github.com/AdoptOpenJDK/jitwatch/blob/master/LICENSE-BSD
* Instructions: https://github.com/AdoptOpenJDK/jitwatch/wiki
*/
package org.adoptopenjdk.jitwatch.model.assembly;
import static org.adoptopenjdk.jitwatch.core.JITWatchConstants.C_COLON;
im... | Line: 290, Column: 2, Error: reached end of file while parsing)
|
AdoptOpenJDK_jitwatch | jitwatch/core/src/main/java/org/adoptopenjdk/jitwatch/model/assembly/AssemblyReference.java | AssemblyReference | lookupMnemonic |
String result = mnemonicMap.get(mnemonic);
if (result == null)
{
// check if it has a size suffix (b,w,l,q)
if (mnemonic.endsWith("b") || mnemonic.endsWith("w") || mnemonic.endsWith("l") || mnemonic.endsWith("q"))
{
result = mnemonicMap.get(mnemonic.substring(0, mnemonic.length() - 1));
}
}
... | class AssemblyReference
{
private static Map<String, String> mnemonicMap = new HashMap<>();
private static final String TAG_MNEM_OPEN = "<mnem>";
private static final String TAG_MNEM_CLOSE = "</mnem>";
private static final String TAG_BRIEF_OPEN = "<brief>";
private static final String TAG_BRIEF_CLOSE = "</brief>"... | 948 | 145 | 1,093 |
return mnemonicMap.get(mnemonic.toLowerCase());
| /*
* Copyright (c) 2013-2021 Chris Newland.
* Licensed under https://github.com/AdoptOpenJDK/jitwatch/blob/master/LICENSE-BSD
* Instructions: https://github.com/AdoptOpenJDK/jitwatch/wiki
*/
package org.adoptopenjdk.jitwatch.model.assembly;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.... | <COMPILED_SUCCESSFULLY> |
End of preview. Expand in Data Studio
No dataset card yet
- Downloads last month
- 3