Mercurial > hg > graal-jvmci-8
diff src/share/vm/gc_implementation/g1/ptrQueue.cpp @ 20731:42c091d63c72
8048949: Requeue queue implementation
Summary: devirtualize flush and move calls
Reviewed-by: brutisso, tschatzl, mschoene
Contributed-by: kim.barrett@oracle.com
author | tschatzl |
---|---|
date | Mon, 04 Aug 2014 10:49:40 -0400 |
parents | 55fb97c4c58d |
children | 7848fc12602b |
line wrap: on
line diff
--- a/src/share/vm/gc_implementation/g1/ptrQueue.cpp Tue Aug 12 17:46:16 2014 -0400 +++ b/src/share/vm/gc_implementation/g1/ptrQueue.cpp Mon Aug 04 10:49:40 2014 -0400 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2014, 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 @@ -31,11 +31,15 @@ #include "runtime/thread.inline.hpp" PtrQueue::PtrQueue(PtrQueueSet* qset, bool perm, bool active) : - _qset(qset), _buf(NULL), _index(0), _active(active), + _qset(qset), _buf(NULL), _index(0), _sz(0), _active(active), _perm(perm), _lock(NULL) {} -void PtrQueue::flush() { +PtrQueue::~PtrQueue() { + assert(_perm || (_buf == NULL), "queue must be flushed before delete"); +} + +void PtrQueue::flush_impl() { if (!_perm && _buf != NULL) { if (_index == _sz) { // No work to do.