mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
6977804: G1: remove the zero-filling thread
This changeset removes the zero-filling thread from G1 and collapses the two free region lists we had before (the "free" and "unclean" lists) into one. The new free list uses the new heap region sets / lists abstractions that we'll ultimately use it to keep track of all regions in the heap. A heap region set was also introduced for the humongous regions. Finally, this change increases the concurrency between the thread that completes freeing regions (after a cleanup pause) and the rest of the system (before we'd have to wait for said thread to complete before allocating a new region). The changest also includes a lot of refactoring and code simplification. Reviewed-by: jcoomes, johnc
This commit is contained in:
parent
9c7b5257f8
commit
8bce4a6620
24 changed files with 2187 additions and 1919 deletions
|
@ -34,6 +34,7 @@ template <size_t bufsz = 256>
|
|||
class FormatBuffer {
|
||||
public:
|
||||
inline FormatBuffer(const char * format, ...);
|
||||
inline void append(const char* format, ...);
|
||||
operator const char *() const { return _buf; }
|
||||
|
||||
private:
|
||||
|
@ -51,6 +52,19 @@ FormatBuffer<bufsz>::FormatBuffer(const char * format, ...) {
|
|||
va_end(argp);
|
||||
}
|
||||
|
||||
template <size_t bufsz>
|
||||
void FormatBuffer<bufsz>::append(const char* format, ...) {
|
||||
// Given that the constructor does a vsnprintf we can assume that
|
||||
// _buf is already initialized.
|
||||
size_t len = strlen(_buf);
|
||||
char* buf_end = _buf + len;
|
||||
|
||||
va_list argp;
|
||||
va_start(argp, format);
|
||||
vsnprintf(buf_end, bufsz - len, format, argp);
|
||||
va_end(argp);
|
||||
}
|
||||
|
||||
// Used to format messages for assert(), guarantee(), fatal(), etc.
|
||||
typedef FormatBuffer<> err_msg;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue