comparison src/share/vm/runtime/deoptimization.hpp @ 6948:e522a00b91aa

Merge with http://hg.openjdk.java.net/hsx/hsx25/hotspot/ after NPG - C++ build works
author Doug Simon <doug.simon@oracle.com>
date Mon, 12 Nov 2012 23:14:12 +0100
parents 957c266d8bc5 da91efe96a93
children 5d0bb7d52783
comparison
equal deleted inserted replaced
6711:ae13cc658b80 6948:e522a00b91aa
1 /* 1 /*
2 * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 1997, 2012, 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.
86 Reason_age, // nmethod too old; tier threshold reached 86 Reason_age, // nmethod too old; tier threshold reached
87 Reason_predicate, // compiler generated predicate failed 87 Reason_predicate, // compiler generated predicate failed
88 Reason_loop_limit_check, // compiler generated loop limits check failed 88 Reason_loop_limit_check, // compiler generated loop limits check failed
89 Reason_LIMIT, 89 Reason_LIMIT,
90 Reason_RECORDED_LIMIT = Reason_bimorphic // some are not recorded per bc 90 Reason_RECORDED_LIMIT = Reason_bimorphic // some are not recorded per bc
91 #endif 91 #endif // GRAAL
92 // Note: Keep this enum in sync. with _trap_reason_name. 92 // Note: Keep this enum in sync. with _trap_reason_name.
93 // Note: Reason_RECORDED_LIMIT should be < 8 to fit into 3 bits of 93 // Note: Reason_RECORDED_LIMIT should be < 8 to fit into 3 bits of
94 // DataLayout::trap_bits. This dependency is enforced indirectly 94 // DataLayout::trap_bits. This dependency is enforced indirectly
95 // via asserts, to avoid excessive direct header-to-header dependencies. 95 // via asserts, to avoid excessive direct header-to-header dependencies.
96 // See Deoptimization::trap_state_reason and class DataLayout 96 // See Deoptimization::trap_state_reason and class DataLayout
381 // Preserves incoming arguments to the popped frame when it is 381 // Preserves incoming arguments to the popped frame when it is
382 // returning to a deoptimized caller 382 // returning to a deoptimized caller
383 static void popframe_preserve_args(JavaThread* thread, int bytes_to_save, void* start_address); 383 static void popframe_preserve_args(JavaThread* thread, int bytes_to_save, void* start_address);
384 384
385 private: 385 private:
386 static methodDataOop get_method_data(JavaThread* thread, methodHandle m, bool create_if_missing); 386 static MethodData* get_method_data(JavaThread* thread, methodHandle m, bool create_if_missing);
387 // Update the mdo's count and per-BCI reason bits, returning previous state: 387 // Update the mdo's count and per-BCI reason bits, returning previous state:
388 static ProfileData* query_update_method_data(methodDataHandle trap_mdo, 388 static ProfileData* query_update_method_data(MethodData* trap_mdo,
389 int trap_bci, 389 int trap_bci,
390 DeoptReason reason, 390 DeoptReason reason,
391 bool update_total_trap_count, 391 bool update_total_trap_count,
392 //outputs: 392 //outputs:
393 uint& ret_this_trap_count, 393 uint& ret_this_trap_count,
405 405
406 static juint _deoptimization_hist[Reason_LIMIT][1+Action_LIMIT][BC_CASE_LIMIT]; 406 static juint _deoptimization_hist[Reason_LIMIT][1+Action_LIMIT][BC_CASE_LIMIT];
407 // Note: Histogram array size is 1-2 Kb. 407 // Note: Histogram array size is 1-2 Kb.
408 408
409 public: 409 public:
410 static void update_method_data_from_interpreter(methodDataHandle trap_mdo, int trap_bci, int reason); 410 static void update_method_data_from_interpreter(MethodData* trap_mdo, int trap_bci, int reason);
411 }; 411 };
412 412
413 class DeoptimizationMarker : StackObj { // for profiling 413 class DeoptimizationMarker : StackObj { // for profiling
414 static bool _is_active; 414 static bool _is_active;
415 public: 415 public: