Mercurial > hg > truffle
comparison src/share/vm/runtime/safepoint.cpp @ 12355:cefad50507d8
Merge with hs25-b53
author | Gilles Duboscq <duboscq@ssw.jku.at> |
---|---|
date | Fri, 11 Oct 2013 10:38:03 +0200 |
parents | 89e4d67fdd2a 268e7a2178d7 |
children | 6b2d8d20ecbd |
comparison
equal
deleted
inserted
replaced
12058:ccb4f2af2319 | 12355:cefad50507d8 |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 1997, 2013, 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. |
517 TraceTime t3("compilation policy safepoint handler", TraceSafepointCleanupTime); | 517 TraceTime t3("compilation policy safepoint handler", TraceSafepointCleanupTime); |
518 CompilationPolicy::policy()->do_safepoint_work(); | 518 CompilationPolicy::policy()->do_safepoint_work(); |
519 } | 519 } |
520 | 520 |
521 { | 521 { |
522 TraceTime t4("sweeping nmethods", TraceSafepointCleanupTime); | 522 TraceTime t4("mark nmethods", TraceSafepointCleanupTime); |
523 NMethodSweeper::scan_stacks(); | 523 NMethodSweeper::mark_active_nmethods(); |
524 } | 524 } |
525 | 525 |
526 if (SymbolTable::needs_rehashing()) { | 526 if (SymbolTable::needs_rehashing()) { |
527 TraceTime t5("rehashing symbol table", TraceSafepointCleanupTime); | 527 TraceTime t5("rehashing symbol table", TraceSafepointCleanupTime); |
528 SymbolTable::rehash_table(); | 528 SymbolTable::rehash_table(); |
743 #else | 743 #else |
744 #define PTR_PAD " " | 744 #define PTR_PAD " " |
745 #endif | 745 #endif |
746 | 746 |
747 static void print_ptrs(intptr_t oldptr, intptr_t newptr, bool wasoop) { | 747 static void print_ptrs(intptr_t oldptr, intptr_t newptr, bool wasoop) { |
748 bool is_oop = newptr ? ((oop)newptr)->is_oop() : false; | 748 bool is_oop = newptr ? (cast_to_oop(newptr))->is_oop() : false; |
749 tty->print_cr(PTR_FORMAT PTR_PAD " %s %c " PTR_FORMAT PTR_PAD " %s %s", | 749 tty->print_cr(PTR_FORMAT PTR_PAD " %s %c " PTR_FORMAT PTR_PAD " %s %s", |
750 oldptr, wasoop?"oop":" ", oldptr == newptr ? ' ' : '!', | 750 oldptr, wasoop?"oop":" ", oldptr == newptr ? ' ' : '!', |
751 newptr, is_oop?"oop":" ", (wasoop && !is_oop) ? "STALE" : ((wasoop==false&&is_oop==false&&oldptr !=newptr)?"STOMP":" ")); | 751 newptr, is_oop?"oop":" ", (wasoop && !is_oop) ? "STALE" : ((wasoop==false&&is_oop==false&&oldptr !=newptr)?"STOMP":" ")); |
752 } | 752 } |
753 | 753 |
754 static void print_longs(jlong oldptr, jlong newptr, bool wasoop) { | 754 static void print_longs(jlong oldptr, jlong newptr, bool wasoop) { |
755 bool is_oop = newptr ? ((oop)(intptr_t)newptr)->is_oop() : false; | 755 bool is_oop = newptr ? (cast_to_oop(newptr))->is_oop() : false; |
756 tty->print_cr(PTR64_FORMAT " %s %c " PTR64_FORMAT " %s %s", | 756 tty->print_cr(PTR64_FORMAT " %s %c " PTR64_FORMAT " %s %s", |
757 oldptr, wasoop?"oop":" ", oldptr == newptr ? ' ' : '!', | 757 oldptr, wasoop?"oop":" ", oldptr == newptr ? ' ' : '!', |
758 newptr, is_oop?"oop":" ", (wasoop && !is_oop) ? "STALE" : ((wasoop==false&&is_oop==false&&oldptr !=newptr)?"STOMP":" ")); | 758 newptr, is_oop?"oop":" ", (wasoop && !is_oop) ? "STALE" : ((wasoop==false&&is_oop==false&&oldptr !=newptr)?"STOMP":" ")); |
759 } | 759 } |
760 | 760 |