src/share/vm/classfile/symbolTable.hpp

changeset 8766
ce9a710b0f63
parent 7207
152cf4afc11f
child 8856
ac27a9c85bea
     1.1 --- a/src/share/vm/classfile/symbolTable.hpp	Fri May 05 06:07:11 2017 -0700
     1.2 +++ b/src/share/vm/classfile/symbolTable.hpp	Mon May 15 12:20:15 2017 +0200
     1.3 @@ -1,5 +1,5 @@
     1.4  /*
     1.5 - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
     1.6 + * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
     1.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     1.8   *
     1.9   * This code is free software; you can redistribute it and/or modify it
    1.10 @@ -124,8 +124,11 @@
    1.11  
    1.12    static volatile int _parallel_claimed_idx;
    1.13  
    1.14 -  // Release any dead symbols
    1.15 -  static void buckets_unlink(int start_idx, int end_idx, int* processed, int* removed, size_t* memory_total);
    1.16 +  typedef SymbolTable::BucketUnlinkContext BucketUnlinkContext;
    1.17 +  // Release any dead symbols. Unlinked bucket entries are collected in the given
    1.18 +  // context to be freed later.
    1.19 +  // This allows multiple threads to work on the table at once.
    1.20 +  static void buckets_unlink(int start_idx, int end_idx, BucketUnlinkContext* context, size_t* memory_total);
    1.21  public:
    1.22    enum {
    1.23      symbol_alloc_batch_size = 8,
    1.24 @@ -274,9 +277,13 @@
    1.25    // Apply the give oop closure to the entries to the buckets
    1.26    // in the range [start_idx, end_idx).
    1.27    static void buckets_oops_do(OopClosure* f, int start_idx, int end_idx);
    1.28 +
    1.29 +  typedef StringTable::BucketUnlinkContext BucketUnlinkContext;
    1.30    // Unlink or apply the give oop closure to the entries to the buckets
    1.31 -  // in the range [start_idx, end_idx).
    1.32 -  static void buckets_unlink_or_oops_do(BoolObjectClosure* is_alive, OopClosure* f, int start_idx, int end_idx, int* processed, int* removed);
    1.33 +  // in the range [start_idx, end_idx). Unlinked bucket entries are collected in the given
    1.34 +  // context to be freed later.
    1.35 +  // This allows multiple threads to work on the table at once.
    1.36 +  static void buckets_unlink_or_oops_do(BoolObjectClosure* is_alive, OopClosure* f, int start_idx, int end_idx, BucketUnlinkContext* context);
    1.37  
    1.38    StringTable() : RehashableHashtable<oop, mtSymbol>((int)StringTableSize,
    1.39                                sizeof (HashtableEntry<oop, mtSymbol>)) {}

mercurial