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. |
330 // Preserves incoming arguments to the popped frame when it is |
330 // Preserves incoming arguments to the popped frame when it is |
331 // returning to a deoptimized caller |
331 // returning to a deoptimized caller |
332 static void popframe_preserve_args(JavaThread* thread, int bytes_to_save, void* start_address); |
332 static void popframe_preserve_args(JavaThread* thread, int bytes_to_save, void* start_address); |
333 |
333 |
334 private: |
334 private: |
335 static methodDataOop get_method_data(JavaThread* thread, methodHandle m, bool create_if_missing); |
335 static MethodData* get_method_data(JavaThread* thread, methodHandle m, bool create_if_missing); |
336 // Update the mdo's count and per-BCI reason bits, returning previous state: |
336 // Update the mdo's count and per-BCI reason bits, returning previous state: |
337 static ProfileData* query_update_method_data(methodDataHandle trap_mdo, |
337 static ProfileData* query_update_method_data(MethodData* trap_mdo, |
338 int trap_bci, |
338 int trap_bci, |
339 DeoptReason reason, |
339 DeoptReason reason, |
340 //outputs: |
340 //outputs: |
341 uint& ret_this_trap_count, |
341 uint& ret_this_trap_count, |
342 bool& ret_maybe_prior_trap, |
342 bool& ret_maybe_prior_trap, |
353 |
353 |
354 static juint _deoptimization_hist[Reason_LIMIT][1+Action_LIMIT][BC_CASE_LIMIT]; |
354 static juint _deoptimization_hist[Reason_LIMIT][1+Action_LIMIT][BC_CASE_LIMIT]; |
355 // Note: Histogram array size is 1-2 Kb. |
355 // Note: Histogram array size is 1-2 Kb. |
356 |
356 |
357 public: |
357 public: |
358 static void update_method_data_from_interpreter(methodDataHandle trap_mdo, int trap_bci, int reason); |
358 static void update_method_data_from_interpreter(MethodData* trap_mdo, int trap_bci, int reason); |
359 }; |
359 }; |
360 |
360 |
361 class DeoptimizationMarker : StackObj { // for profiling |
361 class DeoptimizationMarker : StackObj { // for profiling |
362 static bool _is_active; |
362 static bool _is_active; |
363 public: |
363 public: |