src/share/vm/prims/jvmtiCodeBlobEvents.cpp

Print this page




   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
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 # include "incls/_precompiled.incl"
  26 # include "incls/_jvmtiCodeBlobEvents.cpp.incl"









  27 
  28 // Support class to collect a list of the non-nmethod CodeBlobs in
  29 // the CodeCache.
  30 //
  31 // This class actually creates a list of JvmtiCodeBlobDesc - each JvmtiCodeBlobDesc
  32 // describes a single CodeBlob in the CodeCache. Note that collection is
  33 // done to a static list - this is because CodeCache::blobs_do is defined
  34 // as void CodeCache::blobs_do(void f(CodeBlob* nm)) and hence requires
  35 // a C or static method.
  36 //
  37 // Usage :-
  38 //
  39 // CodeBlobCollector collector;
  40 //
  41 // collector.collect();
  42 // JvmtiCodeBlobDesc* blob = collector.first();
  43 // while (blob != NULL) {
  44 //   :
  45 //   blob = collector.next();
  46 // }




   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
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #include "precompiled.hpp"
  26 #include "code/codeBlob.hpp"
  27 #include "code/codeCache.hpp"
  28 #include "code/scopeDesc.hpp"
  29 #include "memory/resourceArea.hpp"
  30 #include "oops/oop.inline.hpp"
  31 #include "prims/jvmtiCodeBlobEvents.hpp"
  32 #include "prims/jvmtiExport.hpp"
  33 #include "runtime/handles.hpp"
  34 #include "runtime/handles.inline.hpp"
  35 #include "runtime/vmThread.hpp"
  36 
  37 // Support class to collect a list of the non-nmethod CodeBlobs in
  38 // the CodeCache.
  39 //
  40 // This class actually creates a list of JvmtiCodeBlobDesc - each JvmtiCodeBlobDesc
  41 // describes a single CodeBlob in the CodeCache. Note that collection is
  42 // done to a static list - this is because CodeCache::blobs_do is defined
  43 // as void CodeCache::blobs_do(void f(CodeBlob* nm)) and hence requires
  44 // a C or static method.
  45 //
  46 // Usage :-
  47 //
  48 // CodeBlobCollector collector;
  49 //
  50 // collector.collect();
  51 // JvmtiCodeBlobDesc* blob = collector.first();
  52 // while (blob != NULL) {
  53 //   :
  54 //   blob = collector.next();
  55 // }