src/share/vm/ci/ciExceptionHandler.hpp

Tue, 18 Jun 2013 12:31:07 -0700

author
johnc
date
Tue, 18 Jun 2013 12:31:07 -0700
changeset 5277
01522ca68fc7
parent 2314
f95d63e2154a
child 6876
710a3c8b516e
permissions
-rw-r--r--

8015237: Parallelize string table scanning during strong root processing
Summary: Parallelize the scanning of the intern string table by having each GC worker claim a given number of buckets. Changes were also reviewed by Per Liden <per.liden@oracle.com>.
Reviewed-by: tschatzl, stefank, twisti

duke@435 1 /*
stefank@2314 2 * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
duke@435 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
duke@435 4 *
duke@435 5 * This code is free software; you can redistribute it and/or modify it
duke@435 6 * under the terms of the GNU General Public License version 2 only, as
duke@435 7 * published by the Free Software Foundation.
duke@435 8 *
duke@435 9 * This code is distributed in the hope that it will be useful, but WITHOUT
duke@435 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
duke@435 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
duke@435 12 * version 2 for more details (a copy is included in the LICENSE file that
duke@435 13 * accompanied this code).
duke@435 14 *
duke@435 15 * You should have received a copy of the GNU General Public License version
duke@435 16 * 2 along with this work; if not, write to the Free Software Foundation,
duke@435 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
duke@435 18 *
trims@1907 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
trims@1907 20 * or visit www.oracle.com if you need additional information or have any
trims@1907 21 * questions.
duke@435 22 *
duke@435 23 */
duke@435 24
stefank@2314 25 #ifndef SHARE_VM_CI_CIEXCEPTIONHANDLER_HPP
stefank@2314 26 #define SHARE_VM_CI_CIEXCEPTIONHANDLER_HPP
stefank@2314 27
stefank@2314 28 #include "ci/ciClassList.hpp"
stefank@2314 29 #include "ci/ciInstanceKlass.hpp"
stefank@2314 30
duke@435 31 // ciExceptionHandler
duke@435 32 //
duke@435 33 // This class represents an exception handler for a method.
duke@435 34 class ciExceptionHandler : public ResourceObj {
duke@435 35 private:
duke@435 36 friend class ciMethod;
duke@435 37
duke@435 38 // The loader to be used for resolving the exception
duke@435 39 // klass.
duke@435 40 ciInstanceKlass* _loading_klass;
duke@435 41
duke@435 42 // Handler data.
duke@435 43 int _start;
duke@435 44 int _limit;
duke@435 45 int _handler_bci;
duke@435 46 int _catch_klass_index;
duke@435 47
duke@435 48 // The exception klass that this handler catches.
duke@435 49 ciInstanceKlass* _catch_klass;
duke@435 50
duke@435 51 public:
duke@435 52 ciExceptionHandler(ciInstanceKlass* loading_klass,
duke@435 53 int start, int limit,
duke@435 54 int handler_bci, int klass_index) {
duke@435 55 _loading_klass = loading_klass;
duke@435 56 _start = start;
duke@435 57 _limit = limit;
duke@435 58 _handler_bci = handler_bci;
duke@435 59 _catch_klass_index = klass_index;
duke@435 60 _catch_klass = NULL;
duke@435 61 }
duke@435 62
duke@435 63 int start() { return _start; }
duke@435 64 int limit() { return _limit; }
duke@435 65 int handler_bci() { return _handler_bci; }
duke@435 66 int catch_klass_index() { return _catch_klass_index; }
duke@435 67
duke@435 68 // Get the exception klass that this handler catches.
duke@435 69 ciInstanceKlass* catch_klass();
duke@435 70
duke@435 71 bool is_catch_all() { return catch_klass_index() == 0; }
duke@435 72 bool is_in_range(int bci) {
duke@435 73 return start() <= bci && bci < limit();
duke@435 74 }
duke@435 75 bool catches(ciInstanceKlass *exc) {
duke@435 76 return is_catch_all() || exc->is_subtype_of(catch_klass());
duke@435 77 }
duke@435 78 bool is_rethrow() { return handler_bci() == -1; }
duke@435 79
duke@435 80 void print();
duke@435 81 };
stefank@2314 82
stefank@2314 83 #endif // SHARE_VM_CI_CIEXCEPTIONHANDLER_HPP

mercurial