< prev index next >

src/share/vm/compiler/compileLog.cpp

Print this page
rev 13107 : imported patch jvm_h
   1 /*
   2  * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   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 "ci/ciMethod.hpp"
  27 #include "code/codeCache.hpp"
  28 #include "compiler/compileLog.hpp"
  29 #include "memory/allocation.inline.hpp"
  30 #include "oops/method.hpp"

  31 #include "runtime/mutexLocker.hpp"
  32 #include "runtime/os.hpp"
  33 
  34 CompileLog* CompileLog::_first = NULL;
  35 
  36 // ------------------------------------------------------------------
  37 // CompileLog::CompileLog
  38 CompileLog::CompileLog(const char* file_name, FILE* fp, intx thread_id)
  39   : _context(_context_buffer, sizeof(_context_buffer))
  40 {
  41   initialize(new(ResourceObj::C_HEAP, mtCompiler) fileStream(fp, true));
  42   _file_end = 0;
  43   _thread_id = thread_id;
  44 
  45   _identities_limit = 0;
  46   _identities_capacity = 400;
  47   _identities = NEW_C_HEAP_ARRAY(char, _identities_capacity, mtCompiler);
  48   _file = NEW_C_HEAP_ARRAY(char, strlen(file_name)+1, mtCompiler);
  49    strcpy((char*)_file, file_name);
  50 


   1 /*
   2  * Copyright (c) 2002, 2017, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   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 "ci/ciMethod.hpp"
  27 #include "code/codeCache.hpp"
  28 #include "compiler/compileLog.hpp"
  29 #include "memory/allocation.inline.hpp"
  30 #include "oops/method.hpp"
  31 #include "prims/jvm.h"
  32 #include "runtime/mutexLocker.hpp"
  33 #include "runtime/os.hpp"
  34 
  35 CompileLog* CompileLog::_first = NULL;
  36 
  37 // ------------------------------------------------------------------
  38 // CompileLog::CompileLog
  39 CompileLog::CompileLog(const char* file_name, FILE* fp, intx thread_id)
  40   : _context(_context_buffer, sizeof(_context_buffer))
  41 {
  42   initialize(new(ResourceObj::C_HEAP, mtCompiler) fileStream(fp, true));
  43   _file_end = 0;
  44   _thread_id = thread_id;
  45 
  46   _identities_limit = 0;
  47   _identities_capacity = 400;
  48   _identities = NEW_C_HEAP_ARRAY(char, _identities_capacity, mtCompiler);
  49   _file = NEW_C_HEAP_ARRAY(char, strlen(file_name)+1, mtCompiler);
  50    strcpy((char*)_file, file_name);
  51 


< prev index next >