mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
8014912: Restore PrintSharedSpaces functionality after NPG
Added dumping of object sizes in CDS archive, sorted by MetaspaceObj::Type Reviewed-by: coleenp, acorn
This commit is contained in:
parent
f52e6781ee
commit
9dc36eb923
15 changed files with 301 additions and 36 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -320,7 +320,7 @@ protected:
|
|||
void* operator new(size_t size, ClassLoaderData* loader_data, int length, bool read_only, TRAPS) {
|
||||
size_t word_size = Array::size(length);
|
||||
return (void*) Metaspace::allocate(loader_data, word_size, read_only,
|
||||
Metaspace::NonClassType, CHECK_NULL);
|
||||
MetaspaceObj::array_type(sizeof(T)), CHECK_NULL);
|
||||
}
|
||||
|
||||
static size_t byte_sizeof(int length) { return sizeof(Array<T>) + MAX2(length - 1, 0) * sizeof(T); }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue