File tree Expand file tree Collapse file tree 2 files changed +18
-1
lines changed
src/main/java/org/truffleruby/extra Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change 41
41
import com .oracle .truffle .api .frame .MaterializedFrame ;
42
42
import com .oracle .truffle .api .nodes .NodeUtil ;
43
43
44
+ import java .lang .management .CompilationMXBean ;
45
+ import java .lang .management .ManagementFactory ;
46
+
44
47
@ CoreModule ("Truffle::Graal" )
45
48
public abstract class TruffleGraalNodes {
46
49
@@ -222,4 +225,18 @@ protected Object blackhole(Object value) {
222
225
223
226
}
224
227
228
+ @ CoreMethod (names = "total_compilation_time" , onSingleton = true )
229
+ public abstract static class TotalCompilationTimeNode extends CoreMethodArrayArgumentsNode {
230
+ private static CompilationMXBean bean ;
231
+
232
+ @ TruffleBoundary
233
+ @ Specialization
234
+ protected final long totalCompilationTime () {
235
+ if (bean == null ) {
236
+ bean = ManagementFactory .getCompilationMXBean ();
237
+ }
238
+
239
+ return bean .getTotalCompilationTime ();
240
+ }
241
+ }
225
242
}
Original file line number Diff line number Diff line change @@ -2854,7 +2854,7 @@ def format_specializations_arguments
2854
2854
end
2855
2855
2856
2856
def format_specializations_check
2857
- abort 'Some Specializations were not protected.' if format_specializations_visibility
2857
+ abort 'Some Specializations did not use the protected visibility .' if format_specializations_visibility
2858
2858
abort 'Some Specializations were not properly formatted.' if format_specializations_arguments
2859
2859
abort 'There were extra blank lines around imports.' if Formatting . format_imports
2860
2860
end
You can’t perform that action at this time.
0 commit comments