< prev index next >
src/share/vm/classfile/verifier.cpp
Print this page
rev 13180 : imported patch 8181917-refactor-ul-logstream
@@ -32,10 +32,11 @@
#include "classfile/verifier.hpp"
#include "classfile/vmSymbols.hpp"
#include "interpreter/bytecodes.hpp"
#include "interpreter/bytecodeStream.hpp"
#include "logging/log.hpp"
+#include "logging/logStream.hpp"
#include "memory/oopFactory.hpp"
#include "memory/resourceArea.hpp"
#include "oops/instanceKlass.hpp"
#include "oops/oop.inline.hpp"
#include "oops/typeArrayOop.hpp"
@@ -47,11 +48,10 @@
#include "runtime/orderAccess.inline.hpp"
#include "runtime/os.hpp"
#include "runtime/thread.hpp"
#include "services/threadService.hpp"
#include "utilities/bytes.hpp"
-#include "logging/log.hpp"
#define NOFAILOVER_MAJOR_VERSION 51
#define NONZERO_PADDING_BYTES_IN_SWITCH_MAJOR_VERSION 51
#define STATIC_METHOD_IN_INTERFACE_MAJOR_VERSION 52
#define MAX_ARRAY_DIMENSIONS 255
@@ -189,15 +189,19 @@
} else {
exception_name = inference_verify(
klass, message_buffer, message_buffer_len, THREAD);
}
- if (log_is_enabled(Info, class, init)){
- log_end_verification(Log(class, init)::info_stream(), klassName, exception_name, THREAD);
- }
- if (log_is_enabled(Info, verification)){
- log_end_verification(Log(verification)::info_stream(), klassName, exception_name, THREAD);
+ LogTarget(Info, class, init) lt1;
+ if (lt1.is_enabled()) {
+ LogStream ls(lt1);
+ log_end_verification(&ls, klassName, exception_name, THREAD);
+ }
+ LogTarget(Info, verification) lt2;
+ if (lt2.is_enabled()) {
+ LogStream ls(lt2);
+ log_end_verification(&ls, klassName, exception_name, THREAD);
}
if (HAS_PENDING_EXCEPTION) {
return false; // use the existing exception
} else if (exception_name == NULL) {
@@ -660,13 +664,15 @@
StackMapStream stream(stackmap_data);
StackMapReader reader(this, &stream, code_data, code_length, THREAD);
StackMapTable stackmap_table(&reader, ¤t_frame, max_locals, max_stack,
code_data, code_length, CHECK_VERIFY(this));
- if (log_is_enabled(Info, verification)) {
+ LogTarget(Info, verification) lt;
+ if (lt.is_enabled()) {
ResourceMark rm(THREAD);
- stackmap_table.print_on(Log(verification)::info_stream());
+ LogStream ls(lt);
+ stackmap_table.print_on(&ls);
}
RawBytecodeStream bcs(m);
// Scan the byte code linearly from the start to the end
@@ -702,14 +708,16 @@
u2 index;
int target;
VerificationType type, type2;
VerificationType atype;
- if (log_is_enabled(Info, verification)) {
+ LogTarget(Info, verification) lt;
+ if (lt.is_enabled()) {
ResourceMark rm(THREAD);
- current_frame.print_on(Log(verification)::info_stream());
- log_info(verification)("offset = %d, opcode = %s", bci, Bytecodes::name(opcode));
+ LogStream ls(lt);
+ current_frame.print_on(&ls);
+ lt.print("offset = %d, opcode = %s", bci, Bytecodes::name(opcode));
}
// Make sure wide instruction is in correct format
if (bcs.is_wide()) {
if (opcode != Bytecodes::_iinc && opcode != Bytecodes::_iload &&
< prev index next >