# HG changeset patch # User Roland Schatz # Date 1398334211 -7200 # Node ID c17d593ccafb14cc12f9c7e8558e480af0f5f1da # Parent 89db561851d1aad5d1238d481bdb3ad7757d4de7 Add createSpeculationLog to CodeCacheProvider. diff -r 89db561851d1 -r c17d593ccafb graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CodeCacheProvider.java --- a/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CodeCacheProvider.java Thu Apr 24 11:52:49 2014 +0200 +++ b/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CodeCacheProvider.java Thu Apr 24 12:10:11 2014 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2014, 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 @@ -34,7 +34,7 @@ /** * Adds the given compilation result as an implementation of the given method without making it * the default implementation. - * + * * @param method a method to which the executable code is begin added * @param compResult the compilation result to be added * @param speculationLog the speculation log to be used @@ -45,7 +45,7 @@ /** * Sets the given compilation result as the default implementation of the given method. - * + * * @param method a method to which the executable code is begin added * @param compResult the compilation result to be added * @return a reference to the compiled and ready-to-run code or null if the code installation @@ -55,11 +55,11 @@ /** * Returns a disassembly of some compiled code. - * + * * @param compResult some compiled code * @param installedCode the result of installing the code in {@code compResult} or null if the * code has not yet been installed - * + * * @return a disassembly. This will be of length 0 if the runtime does not support * disassembling. */ @@ -73,7 +73,7 @@ /** * Minimum size of the stack area reserved for outgoing parameters. This area is reserved in all * cases, even when the compiled method has no regular call instructions. - * + * * @return the minimum size of the outgoing parameter area in bytes */ int getMinimumOutgoingSize(); @@ -93,4 +93,9 @@ * Gets a description of the target architecture. */ TargetDescription getTarget(); + + /** + * Create a new speculation log for the target runtime. + */ + SpeculationLog createSpeculationLog(); } diff -r 89db561851d1 -r c17d593ccafb graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotCodeCacheProvider.java --- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotCodeCacheProvider.java Thu Apr 24 11:52:49 2014 +0200 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotCodeCacheProvider.java Thu Apr 24 12:10:11 2014 +0200 @@ -280,4 +280,8 @@ public String disassemble(ResolvedJavaMethod method) { return new BytecodeDisassembler().disassemble(method); } + + public SpeculationLog createSpeculationLog() { + return new HotSpotSpeculationLog(); + } }