hotspot/src/share/vm/gc/parallel/gcTaskThread.hpp
changeset 38216 250794c6f95f
parent 30764 fec48bf5a827
child 39704 157f39705057
equal deleted inserted replaced
38215:fe1677e95252 38216:250794c6f95f
     1 /*
     1 /*
     2  * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2002, 2016, 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.
    46 
    46 
    47   GCTaskTimeStamp* time_stamp_at(uint index);
    47   GCTaskTimeStamp* time_stamp_at(uint index);
    48 
    48 
    49   bool _is_working;                     // True if participating in GC tasks
    49   bool _is_working;                     // True if participating in GC tasks
    50 
    50 
    51  public:
       
    52   // Factory create and destroy methods.
    51   // Factory create and destroy methods.
    53   static GCTaskThread* create(GCTaskManager* manager,
    52   static GCTaskThread* create(GCTaskManager* manager,
    54                               uint           which,
    53                               uint           which,
    55                               uint           processor_id) {
    54                               uint           processor_id) {
    56     return new GCTaskThread(manager, which, processor_id);
    55     return new GCTaskThread(manager, which, processor_id);
    57   }
    56   }
       
    57  public:
    58   static void destroy(GCTaskThread* manager) {
    58   static void destroy(GCTaskThread* manager) {
    59     if (manager != NULL) {
    59     if (manager != NULL) {
    60       delete manager;
    60       delete manager;
    61     }
    61     }
    62   }
    62   }
    63   // Methods from Thread.
    63   // Methods from Thread.
    64   bool is_GC_task_thread() const {
    64   bool is_GC_task_thread() const {
    65     return true;
    65     return true;
    66   }
    66   }
    67   virtual void run();
    67   virtual void run();
    68   // Methods.
       
    69   void start();
       
    70 
    68 
    71   void print_task_time_stamps();
    69   void print_task_time_stamps();
    72 
    70 
    73 protected:
    71 protected:
    74   // Constructor.  Clients use factory, but there could be subclasses.
    72   // Constructor.  Clients use factory, but there could be subclasses.