hotspot/src/share/vm/runtime/thread.hpp
changeset 29326 ebaa169c6dc3
parent 28039 bf5a8340bf8a
child 29332 c2364e06aa8d
equal deleted inserted replaced
29325:0e86e64c66e5 29326:ebaa169c6dc3
     1 /*
     1 /*
     2  * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 1997, 2015, 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.
   665  public:
   665  public:
   666   NamedThread();
   666   NamedThread();
   667   ~NamedThread();
   667   ~NamedThread();
   668   // May only be called once per thread.
   668   // May only be called once per thread.
   669   void set_name(const char* format, ...)  ATTRIBUTE_PRINTF(2, 3);
   669   void set_name(const char* format, ...)  ATTRIBUTE_PRINTF(2, 3);
       
   670   void initialize_named_thread();
   670   virtual bool is_Named_thread() const { return true; }
   671   virtual bool is_Named_thread() const { return true; }
   671   virtual char* name() const { return _name == NULL ? (char*)"Unknown Thread" : _name; }
   672   virtual char* name() const { return _name == NULL ? (char*)"Unknown Thread" : _name; }
   672   JavaThread *processed_thread() { return _processed_thread; }
   673   JavaThread *processed_thread() { return _processed_thread; }
   673   void set_processed_thread(JavaThread *thread) { _processed_thread = thread; }
   674   void set_processed_thread(JavaThread *thread) { _processed_thread = thread; }
   674   virtual void print_on(outputStream* st) const;
   675   virtual void print_on(outputStream* st) const;