src/share/vm/gc/g1/ptrQueue.hpp
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File
hotspot Cdiff src/share/vm/gc/g1/ptrQueue.hpp
src/share/vm/gc/g1/ptrQueue.hpp
Print this page
*** 1,7 ****
/*
! * Copyright (c) 2001, 2015, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
--- 1,7 ----
/*
! * Copyright (c) 2001, 2016, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*** 214,225 ****
class PtrQueueSet VALUE_OBJ_CLASS_SPEC {
protected:
Monitor* _cbl_mon; // Protects the fields below.
BufferNode* _completed_buffers_head;
BufferNode* _completed_buffers_tail;
! int _n_completed_buffers;
! int _process_completed_threshold;
volatile bool _process_completed;
// This (and the interpretation of the first element as a "next"
// pointer) are protected by the TLOQ_FL_lock.
Mutex* _fl_lock;
--- 214,225 ----
class PtrQueueSet VALUE_OBJ_CLASS_SPEC {
protected:
Monitor* _cbl_mon; // Protects the fields below.
BufferNode* _completed_buffers_head;
BufferNode* _completed_buffers_tail;
! size_t _n_completed_buffers;
! size_t _process_completed_threshold;
volatile bool _process_completed;
// This (and the interpretation of the first element as a "next"
// pointer) are protected by the TLOQ_FL_lock.
Mutex* _fl_lock;
*** 237,250 ****
// If true, notify_all on _cbl_mon when the threshold is reached.
bool _notify_when_complete;
// Maximum number of elements allowed on completed queue: after that,
// enqueuer does the work itself. Zero indicates no maximum.
! int _max_completed_queue;
! int _completed_queue_padding;
! int completed_buffers_list_length();
void assert_completed_buffer_list_len_correct_locked();
void assert_completed_buffer_list_len_correct();
protected:
// A mutator thread does the the work of processing a buffer.
--- 237,250 ----
// If true, notify_all on _cbl_mon when the threshold is reached.
bool _notify_when_complete;
// Maximum number of elements allowed on completed queue: after that,
// enqueuer does the work itself. Zero indicates no maximum.
! size_t _max_completed_queue;
! size_t _completed_queue_padding;
! size_t completed_buffers_list_length();
void assert_completed_buffer_list_len_correct_locked();
void assert_completed_buffer_list_len_correct();
protected:
// A mutator thread does the the work of processing a buffer.
*** 261,272 ****
// Because of init-order concerns, we can't pass these as constructor
// arguments.
void initialize(Monitor* cbl_mon,
Mutex* fl_lock,
! int process_completed_threshold,
! int max_completed_queue,
PtrQueueSet *fl_owner = NULL);
public:
// Return an empty array of size _sz (required to be non-zero).
--- 261,272 ----
// Because of init-order concerns, we can't pass these as constructor
// arguments.
void initialize(Monitor* cbl_mon,
Mutex* fl_lock,
! size_t process_completed_threshold,
! size_t max_completed_queue,
PtrQueueSet *fl_owner = NULL);
public:
// Return an empty array of size _sz (required to be non-zero).
*** 297,322 ****
// Get the buffer size.
size_t buffer_size() { return _sz; }
// Get/Set the number of completed buffers that triggers log processing.
! void set_process_completed_threshold(int sz) { _process_completed_threshold = sz; }
! int process_completed_threshold() const { return _process_completed_threshold; }
// Must only be called at a safe point. Indicates that the buffer free
// list size may be reduced, if that is deemed desirable.
void reduce_free_list();
! int completed_buffers_num() { return _n_completed_buffers; }
void merge_bufferlists(PtrQueueSet* src);
! void set_max_completed_queue(int m) { _max_completed_queue = m; }
! int max_completed_queue() { return _max_completed_queue; }
! void set_completed_queue_padding(int padding) { _completed_queue_padding = padding; }
! int completed_queue_padding() { return _completed_queue_padding; }
// Notify the consumer if the number of buffers crossed the threshold
void notify_if_necessary();
};
--- 297,322 ----
// Get the buffer size.
size_t buffer_size() { return _sz; }
// Get/Set the number of completed buffers that triggers log processing.
! void set_process_completed_threshold(size_t sz) { _process_completed_threshold = sz; }
! size_t process_completed_threshold() const { return _process_completed_threshold; }
// Must only be called at a safe point. Indicates that the buffer free
// list size may be reduced, if that is deemed desirable.
void reduce_free_list();
! size_t completed_buffers_num() { return _n_completed_buffers; }
void merge_bufferlists(PtrQueueSet* src);
! void set_max_completed_queue(size_t m) { _max_completed_queue = m; }
! size_t max_completed_queue() { return _max_completed_queue; }
! void set_completed_queue_padding(size_t padding) { _completed_queue_padding = padding; }
! size_t completed_queue_padding() { return _completed_queue_padding; }
// Notify the consumer if the number of buffers crossed the threshold
void notify_if_necessary();
};
src/share/vm/gc/g1/ptrQueue.hpp
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File