equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1997, 2014, 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. |
520 return sum; |
520 return sum; |
521 } |
521 } |
522 |
522 |
523 void BitMap::print_on_error(outputStream* st, const char* prefix) const { |
523 void BitMap::print_on_error(outputStream* st, const char* prefix) const { |
524 st->print_cr("%s[" PTR_FORMAT ", " PTR_FORMAT ")", |
524 st->print_cr("%s[" PTR_FORMAT ", " PTR_FORMAT ")", |
525 prefix, map(), (char*)map() + (size() >> LogBitsPerByte)); |
525 prefix, p2i(map()), p2i((char*)map() + (size() >> LogBitsPerByte))); |
526 } |
526 } |
527 |
527 |
528 #ifndef PRODUCT |
528 #ifndef PRODUCT |
529 |
529 |
530 void BitMap::print_on(outputStream* st) const { |
530 void BitMap::print_on(outputStream* st) const { |
531 tty->print("Bitmap(%d):", size()); |
531 tty->print("Bitmap(" SIZE_FORMAT "):", size()); |
532 for (idx_t index = 0; index < size(); index++) { |
532 for (idx_t index = 0; index < size(); index++) { |
533 tty->print("%c", at(index) ? '1' : '0'); |
533 tty->print("%c", at(index) ? '1' : '0'); |
534 } |
534 } |
535 tty->cr(); |
535 tty->cr(); |
536 } |
536 } |