Mercurial > hg > graal-jvmci-8
comparison src/share/vm/utilities/array.hpp @ 10376:a1ebd310d5c1
8014912: Restore PrintSharedSpaces functionality after NPG
Summary: Added dumping of object sizes in CDS archive, sorted by MetaspaceObj::Type
Reviewed-by: coleenp, acorn
author | iklam |
---|---|
date | Tue, 28 May 2013 16:36:19 -0700 |
parents | bd7a7ce2e264 |
children | 9758d9f36299 |
comparison
equal
deleted
inserted
replaced
10353:9ea643afcaaf | 10376:a1ebd310d5c1 |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 2000, 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. |
318 void operator=(const Array<T>&); | 318 void operator=(const Array<T>&); |
319 | 319 |
320 void* operator new(size_t size, ClassLoaderData* loader_data, int length, bool read_only, TRAPS) { | 320 void* operator new(size_t size, ClassLoaderData* loader_data, int length, bool read_only, TRAPS) { |
321 size_t word_size = Array::size(length); | 321 size_t word_size = Array::size(length); |
322 return (void*) Metaspace::allocate(loader_data, word_size, read_only, | 322 return (void*) Metaspace::allocate(loader_data, word_size, read_only, |
323 Metaspace::NonClassType, CHECK_NULL); | 323 MetaspaceObj::array_type(sizeof(T)), CHECK_NULL); |
324 } | 324 } |
325 | 325 |
326 static size_t byte_sizeof(int length) { return sizeof(Array<T>) + MAX2(length - 1, 0) * sizeof(T); } | 326 static size_t byte_sizeof(int length) { return sizeof(Array<T>) + MAX2(length - 1, 0) * sizeof(T); } |
327 | 327 |
328 explicit Array(int length) : _length(length) { | 328 explicit Array(int length) : _length(length) { |