1 /*
2 * Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
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
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
1416
1417 // Perform any cleanup actions necessary before allowing a verification.
1418 virtual void prepare_for_verify();
1419
1420 // Perform verification.
1421
1422 // vo == UsePrevMarking -> use "prev" marking information,
1423 // vo == UseNextMarking -> use "next" marking information
1424 // vo == UseMarkWord -> use the mark word in the object header
1425 //
1426 // NOTE: Only the "prev" marking information is guaranteed to be
1427 // consistent most of the time, so most calls to this should use
1428 // vo == UsePrevMarking.
1429 // Currently, there is only one case where this is called with
1430 // vo == UseNextMarking, which is to verify the "next" marking
1431 // information at the end of remark.
1432 // Currently there is only one place where this is called with
1433 // vo == UseMarkWord, which is to verify the marking during a
1434 // full GC.
1435 void verify(VerifyOption vo);
1436
1437 // The methods below are here for convenience and dispatch the
1438 // appropriate method depending on value of the given VerifyOption
1439 // parameter. The values for that parameter, and their meanings,
1440 // are the same as those above.
1441
1442 bool is_obj_dead_cond(const oop obj,
1443 const HeapRegion* hr,
1444 const VerifyOption vo) const;
1445
1446 bool is_obj_dead_cond(const oop obj,
1447 const VerifyOption vo) const;
1448
1449 G1HeapSummary create_g1_heap_summary();
1450 G1EvacSummary create_g1_evac_summary(G1EvacStats* stats);
1451
1452 // Printing
1453 private:
1454 void print_heap_regions() const;
1455 void print_regions_on(outputStream* st) const;
|
1 /*
2 * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
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
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
1416
1417 // Perform any cleanup actions necessary before allowing a verification.
1418 virtual void prepare_for_verify();
1419
1420 // Perform verification.
1421
1422 // vo == UsePrevMarking -> use "prev" marking information,
1423 // vo == UseNextMarking -> use "next" marking information
1424 // vo == UseMarkWord -> use the mark word in the object header
1425 //
1426 // NOTE: Only the "prev" marking information is guaranteed to be
1427 // consistent most of the time, so most calls to this should use
1428 // vo == UsePrevMarking.
1429 // Currently, there is only one case where this is called with
1430 // vo == UseNextMarking, which is to verify the "next" marking
1431 // information at the end of remark.
1432 // Currently there is only one place where this is called with
1433 // vo == UseMarkWord, which is to verify the marking during a
1434 // full GC.
1435 void verify(VerifyOption vo);
1436
1437 // WhiteBox testing support.
1438 virtual bool supports_concurrent_phase_control() const;
1439 virtual const char* const* concurrent_phases() const;
1440 virtual bool request_concurrent_phase(const char* phase);
1441
1442 // The methods below are here for convenience and dispatch the
1443 // appropriate method depending on value of the given VerifyOption
1444 // parameter. The values for that parameter, and their meanings,
1445 // are the same as those above.
1446
1447 bool is_obj_dead_cond(const oop obj,
1448 const HeapRegion* hr,
1449 const VerifyOption vo) const;
1450
1451 bool is_obj_dead_cond(const oop obj,
1452 const VerifyOption vo) const;
1453
1454 G1HeapSummary create_g1_heap_summary();
1455 G1EvacSummary create_g1_evac_summary(G1EvacStats* stats);
1456
1457 // Printing
1458 private:
1459 void print_heap_regions() const;
1460 void print_regions_on(outputStream* st) const;
|