Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -350,4 +350,21 @@ public final class GraalOptions {

@Option(help = "Enables target-specific lowering and legalization of SIMD operations. Required for SIMD code generation.", type = OptionType.Debug)
public static final OptionKey<Boolean> TargetVectorLowering = new OptionKey<>(true);

@Option(help = "Enable Instrumentation to collect profile information", type = OptionType.Debug)
public static final OptionKey<Boolean> EnableProfiler = new OptionKey<>(false);

@Option(help = "Min graph size to start instrumenting", type = OptionType.Debug)
public static final OptionKey<Integer> MinGraphSize = new OptionKey<>(1);

@Option(help = "Enable Instrumentation to count the amount of Compiled Methods", type = OptionType.Debug)
public static final OptionKey<Boolean> CountCompiledMethods = new OptionKey<>(false);

@Option(help = "Enable Bubo DebugMode to collect profile information, such as gragh stats", type = OptionType.Debug)
public static final OptionKey<Boolean> BuboDebugMode = new OptionKey<>(false);

@Option(help = "Enable Bubo Dump, print results to the parse file location", type = OptionType.Debug)
public static final OptionKey<String> BuboDump = new OptionKey<>("");


}
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
/*
* Copyright (c) 2014, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package jdk.graal.compiler.core.common.type;

import jdk.graal.compiler.core.common.LIRKind;
import jdk.graal.compiler.core.common.spi.LIRKindTool;
import jdk.graal.compiler.debug.GraalError;

import jdk.vm.ci.meta.Constant;
import jdk.vm.ci.meta.JavaKind;
import jdk.vm.ci.meta.MemoryAccessProvider;
import jdk.vm.ci.meta.MetaAccessProvider;
import jdk.vm.ci.meta.ResolvedJavaType;

/**
* Singleton stamp representing the value of type {@code void}.
* This Custom Stamp is purerly for Idetending Bubo Instumentation
*/
public final class BuboActivationCountRead extends Stamp {

private BuboActivationCountRead() {
}

@Override
public void accept(Visitor v) {
}

@Override
public Stamp unrestricted() {
return this;
}

@Override
public boolean isUnrestricted() {
return true;
}

@Override
public JavaKind getStackKind() {
return JavaKind.Void;
}

@Override
public Stamp improveWith(Stamp other) {
assert other instanceof BuboActivationCountRead;
return this;
}

@Override
public LIRKind getLIRKind(LIRKindTool tool) {
throw GraalError.shouldNotReachHere("BuboVoid stamp has no value"); // ExcludeFromJacocoGeneratedReport
}

@Override
public ResolvedJavaType javaType(MetaAccessProvider metaAccess) {
return metaAccess.lookupJavaType(Void.TYPE);
}

@Override
public String toString() {
return "BuboVoid";
}

@Override
public boolean alwaysDistinct(Stamp other) {
return this != other;
}

@Override
public Stamp meet(Stamp other) {
assert other instanceof BuboActivationCountRead;
return this;
}

@Override
public Stamp join(Stamp other) {
assert other instanceof BuboActivationCountRead;
return this;
}

@Override
public boolean isCompatible(Stamp stamp) {
return stamp instanceof BuboActivationCountRead;
}

@Override
public boolean isCompatible(Constant constant) {
return false;
}

@Override
public Stamp empty() {
// the void stamp is always empty
return this;
}

@Override
public boolean hasValues() {
return false;
}

@Override
public Constant readConstant(MemoryAccessProvider provider, Constant base, long displacement) {
throw GraalError.shouldNotReachHere("can't read values of BuboVoid stamp"); // ExcludeFromJacocoGeneratedReport
}

@Override
public Stamp constant(Constant c, MetaAccessProvider meta) {
throw GraalError.shouldNotReachHere("BuboVoid stamp has no value"); // ExcludeFromJacocoGeneratedReport
}

private static final BuboActivationCountRead instance = new BuboActivationCountRead();

static BuboActivationCountRead getInstance() {
return instance;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
/*
* Copyright (c) 2014, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package jdk.graal.compiler.core.common.type;

import jdk.graal.compiler.core.common.LIRKind;
import jdk.graal.compiler.core.common.spi.LIRKindTool;
import jdk.graal.compiler.debug.GraalError;

import jdk.vm.ci.meta.Constant;
import jdk.vm.ci.meta.JavaKind;
import jdk.vm.ci.meta.MemoryAccessProvider;
import jdk.vm.ci.meta.MetaAccessProvider;
import jdk.vm.ci.meta.ResolvedJavaType;

/**
* Singleton stamp representing the value of type {@code void}.
* This Custom Stamp is purerly for Idetending Bubo Instumentation
*/
public final class BuboCallSiteRead extends Stamp {

private BuboCallSiteRead() {
}

@Override
public void accept(Visitor v) {
}

@Override
public Stamp unrestricted() {
return this;
}

@Override
public boolean isUnrestricted() {
return true;
}

@Override
public JavaKind getStackKind() {
return JavaKind.Void;
}

@Override
public Stamp improveWith(Stamp other) {
assert other instanceof BuboTimeRead;
return this;
}

@Override
public LIRKind getLIRKind(LIRKindTool tool) {
throw GraalError.shouldNotReachHere("BuboVoid stamp has no value"); // ExcludeFromJacocoGeneratedReport
}

@Override
public ResolvedJavaType javaType(MetaAccessProvider metaAccess) {
return metaAccess.lookupJavaType(Void.TYPE);
}

@Override
public String toString() {
return "BuboCallSiteRead";
}

@Override
public boolean alwaysDistinct(Stamp other) {
return this != other;
}

@Override
public Stamp meet(Stamp other) {
assert other instanceof BuboTimeRead;
return this;
}

@Override
public Stamp join(Stamp other) {
assert other instanceof BuboTimeRead;
return this;
}

@Override
public boolean isCompatible(Stamp stamp) {
return stamp instanceof BuboTimeRead;
}

@Override
public boolean isCompatible(Constant constant) {
return false;
}

@Override
public Stamp empty() {
// the void stamp is always empty
return this;
}

@Override
public boolean hasValues() {
return false;
}

@Override
public Constant readConstant(MemoryAccessProvider provider, Constant base, long displacement) {
throw GraalError.shouldNotReachHere("can't read values of BuboVoid stamp"); // ExcludeFromJacocoGeneratedReport
}

@Override
public Stamp constant(Constant c, MetaAccessProvider meta) {
throw GraalError.shouldNotReachHere("BuboVoid stamp has no value"); // ExcludeFromJacocoGeneratedReport
}

private static final BuboCallSiteRead instance = new BuboCallSiteRead();

static BuboCallSiteRead getInstance() {
return instance;
}
}
Loading