Skip to content

Commit

Permalink
7338: Add parser support for frame types generated by async-profiler
Browse files Browse the repository at this point in the history
Reviewed-by: hirt
  • Loading branch information
Jaroslav Bachorik authored and thegreystone committed Sep 9, 2021
1 parent 2844db9 commit 341f3d5
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2018, 2021 Oracle and/or its affiliates. All rights reserved.
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
Expand Down Expand Up @@ -62,6 +62,18 @@ public enum Type {
* The frame was executed as code that was inlined by the Java JIT compiler.
*/
INLINED,
/**
* The frame was executed as native code, most probably a C function.
*/
NATIVE,
/**
* The frame was executed as native code compiled from C++.
*/
CPP,
/**
* The frame was executed as kernel native code.
*/
KERNEL,
/**
* The frame compilation type is unknown.
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2018, 2021 Oracle and/or its affiliates. All rights reserved.
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
Expand Down Expand Up @@ -80,6 +80,15 @@ public static IMCFrame.Type parseFrameType(String type) {
if ("Inlined".equals(type)) { //$NON-NLS-1$
return IMCFrame.Type.INLINED;
}
if ("Native".equals(type)) { //$NON-NLS-1$
return IMCFrame.Type.NATIVE;
}
if ("C++".equals(type)) { //$NON-NLS-1$
return IMCFrame.Type.CPP;
}
if ("Kernel".equals(type)) { //$NON-NLS-1$
return IMCFrame.Type.KERNEL;
}
return IMCFrame.Type.UNKNOWN;
}
}

0 comments on commit 341f3d5

Please sign in to comment.