hotspot/src/share/vm/runtime/compilationPolicy.cpp
changeset 8667 b32929355d27
parent 7397 5b173b4ca846
child 8880 77bf0208d131
equal deleted inserted replaced
8499:4f77360820d7 8667:b32929355d27
     1 /*
     1 /*
     2  * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
    30 #include "interpreter/interpreter.hpp"
    30 #include "interpreter/interpreter.hpp"
    31 #include "oops/methodDataOop.hpp"
    31 #include "oops/methodDataOop.hpp"
    32 #include "oops/methodOop.hpp"
    32 #include "oops/methodOop.hpp"
    33 #include "oops/oop.inline.hpp"
    33 #include "oops/oop.inline.hpp"
    34 #include "prims/nativeLookup.hpp"
    34 #include "prims/nativeLookup.hpp"
       
    35 #include "runtime/advancedThresholdPolicy.hpp"
    35 #include "runtime/compilationPolicy.hpp"
    36 #include "runtime/compilationPolicy.hpp"
    36 #include "runtime/frame.hpp"
    37 #include "runtime/frame.hpp"
    37 #include "runtime/handles.inline.hpp"
    38 #include "runtime/handles.inline.hpp"
    38 #include "runtime/rframe.hpp"
    39 #include "runtime/rframe.hpp"
    39 #include "runtime/simpleThresholdPolicy.hpp"
    40 #include "runtime/simpleThresholdPolicy.hpp"
    70     CompilationPolicy::set_policy(new SimpleThresholdPolicy());
    71     CompilationPolicy::set_policy(new SimpleThresholdPolicy());
    71 #else
    72 #else
    72     Unimplemented();
    73     Unimplemented();
    73 #endif
    74 #endif
    74     break;
    75     break;
       
    76   case 3:
       
    77 #ifdef TIERED
       
    78     CompilationPolicy::set_policy(new AdvancedThresholdPolicy());
       
    79 #else
       
    80     Unimplemented();
       
    81 #endif
       
    82     break;
    75   default:
    83   default:
    76     fatal("CompilationPolicyChoice must be in the range: [0-2]");
    84     fatal("CompilationPolicyChoice must be in the range: [0-3]");
    77   }
    85   }
    78   CompilationPolicy::policy()->initialize();
    86   CompilationPolicy::policy()->initialize();
    79 }
    87 }
    80 
    88 
    81 void CompilationPolicy::completed_vm_startup() {
    89 void CompilationPolicy::completed_vm_startup() {