< prev index next >

src/share/vm/ci/ciMethodData.cpp

Print this page


   1 /*
   2  * Copyright (c) 2001, 2014, 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  *


 593   Klass* holder = method->method_holder();
 594   out->print("ciMethodData %s %s %s %d %d",
 595              holder->name()->as_quoted_ascii(),
 596              method->name()->as_quoted_ascii(),
 597              method->signature()->as_quoted_ascii(),
 598              _state,
 599              current_mileage());
 600 
 601   // dump the contents of the MDO header as raw data
 602   unsigned char* orig = (unsigned char*)&_orig;
 603   int length = sizeof(_orig);
 604   out->print(" orig %d", length);
 605   for (int i = 0; i < length; i++) {
 606     out->print(" %d", orig[i]);
 607   }
 608 
 609   // dump the MDO data as raw data
 610   int elements = (data_size() + extra_data_size()) / sizeof(intptr_t);
 611   out->print(" data %d", elements);
 612   for (int i = 0; i < elements; i++) {
 613     // We could use INTPTR_FORMAT here but that's a zero justified
 614     // which makes comparing it with the SA version of this output
 615     // harder.
 616 #ifdef _LP64
 617     out->print(" 0x%" FORMAT64_MODIFIER "x", data()[i]);
 618 #else
 619     out->print(" 0x%x", data()[i]);
 620 #endif
 621   }
 622 
 623   // The MDO contained oop references as ciObjects, so scan for those
 624   // and emit pairs of offset and klass name so that they can be
 625   // reconstructed at runtime.  The first round counts the number of
 626   // oop references and the second actually emits them.
 627   ciParametersTypeData* parameters = parameters_type_data();
 628   for (int count = 0, round = 0; round < 2; round++) {
 629     if (round == 1) out->print(" oops %d", count);
 630     ProfileData* pdata = first_data();
 631     for ( ; is_valid(pdata); pdata = next_data(pdata)) {
 632       if (pdata->is_VirtualCallData()) {
 633         ciVirtualCallData* vdata = (ciVirtualCallData*)pdata;
 634         dump_replay_data_receiver_type_helper<ciVirtualCallData>(out, round, count, vdata);
 635         if (pdata->is_VirtualCallTypeData()) {
 636           ciVirtualCallTypeData* call_type_data = (ciVirtualCallTypeData*)pdata;
 637           dump_replay_data_call_type_helper<ciVirtualCallTypeData>(out, round, count, call_type_data);
 638         }
 639       } else if (pdata->is_ReceiverTypeData()) {
 640         ciReceiverTypeData* vdata = (ciReceiverTypeData*)pdata;


   1 /*
   2  * Copyright (c) 2001, 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  *


 593   Klass* holder = method->method_holder();
 594   out->print("ciMethodData %s %s %s %d %d",
 595              holder->name()->as_quoted_ascii(),
 596              method->name()->as_quoted_ascii(),
 597              method->signature()->as_quoted_ascii(),
 598              _state,
 599              current_mileage());
 600 
 601   // dump the contents of the MDO header as raw data
 602   unsigned char* orig = (unsigned char*)&_orig;
 603   int length = sizeof(_orig);
 604   out->print(" orig %d", length);
 605   for (int i = 0; i < length; i++) {
 606     out->print(" %d", orig[i]);
 607   }
 608 
 609   // dump the MDO data as raw data
 610   int elements = (data_size() + extra_data_size()) / sizeof(intptr_t);
 611   out->print(" data %d", elements);
 612   for (int i = 0; i < elements; i++) {
 613     // We could use INTPTR_FORMAT here but that's zero justified
 614     // which makes comparing it with the SA version of this output
 615     // harder. data()'s element type is intptr_t.
 616     out->print(" " INTPTRNZ_FORMAT, data()[i]);




 617   }
 618 
 619   // The MDO contained oop references as ciObjects, so scan for those
 620   // and emit pairs of offset and klass name so that they can be
 621   // reconstructed at runtime.  The first round counts the number of
 622   // oop references and the second actually emits them.
 623   ciParametersTypeData* parameters = parameters_type_data();
 624   for (int count = 0, round = 0; round < 2; round++) {
 625     if (round == 1) out->print(" oops %d", count);
 626     ProfileData* pdata = first_data();
 627     for ( ; is_valid(pdata); pdata = next_data(pdata)) {
 628       if (pdata->is_VirtualCallData()) {
 629         ciVirtualCallData* vdata = (ciVirtualCallData*)pdata;
 630         dump_replay_data_receiver_type_helper<ciVirtualCallData>(out, round, count, vdata);
 631         if (pdata->is_VirtualCallTypeData()) {
 632           ciVirtualCallTypeData* call_type_data = (ciVirtualCallTypeData*)pdata;
 633           dump_replay_data_call_type_helper<ciVirtualCallTypeData>(out, round, count, call_type_data);
 634         }
 635       } else if (pdata->is_ReceiverTypeData()) {
 636         ciReceiverTypeData* vdata = (ciReceiverTypeData*)pdata;


< prev index next >