src/hotspot/share/gc/g1/g1PageBasedVirtualSpace.cpp
changeset 49030 1817d118ff66
parent 47634 6a0c42c40cd1
child 51332 c25572739e7c
equal deleted inserted replaced
49029:010df2533db2 49030:1817d118ff66
     1 /*
     1 /*
     2  * Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
   233   char* const _start_addr;
   233   char* const _start_addr;
   234   char* const _end_addr;
   234   char* const _end_addr;
   235   size_t const _page_size;
   235   size_t const _page_size;
   236 public:
   236 public:
   237   G1PretouchTask(char* start_address, char* end_address, size_t page_size) :
   237   G1PretouchTask(char* start_address, char* end_address, size_t page_size) :
   238     AbstractGangTask("G1 PreTouch",
   238     AbstractGangTask("G1 PreTouch"),
   239                      Universe::is_fully_initialized() &&
       
   240                      Thread::current()->is_Named_thread() ? GCId::current_raw() :
       
   241                                                             // During VM initialization there is
       
   242                                                             // no GC cycle that this task can be
       
   243                                                             // associated with.
       
   244                                                             GCId::undefined()),
       
   245     _cur_addr(start_address),
   239     _cur_addr(start_address),
   246     _start_addr(start_address),
   240     _start_addr(start_address),
   247     _end_addr(end_address),
   241     _end_addr(end_address),
   248     _page_size(page_size) {
   242     _page_size(page_size) {
   249   }
   243   }