< prev index next >

src/hotspot/share/jfr/utilities/jfrJavaLog.cpp

Print this page
*** 1,7 ***
  /*
!  * Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved.
   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   *
   * This code is free software; you can redistribute it and/or modify it
   * under the terms of the GNU General Public License version 2 only, as
   * published by the Free Software Foundation.
--- 1,7 ---
  /*
!  * Copyright (c) 2016, 2026, Oracle and/or its affiliates. All rights reserved.
   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   *
   * This code is free software; you can redistribute it and/or modify it
   * under the terms of the GNU General Public License version 2 only, as
   * published by the Free Software Foundation.

*** 28,10 ***
--- 28,11 ---
  #include "logging/log.hpp"
  #include "logging/logConfiguration.hpp"
  #include "logging/logMessage.hpp"
  #include "memory/resourceArea.hpp"
  #include "oops/objArrayOop.inline.hpp"
+ #include "oops/oopCast.inline.hpp"
  #include "runtime/javaThread.hpp"
  
  #define JFR_LOG_TAGS_CONCATED(T0, T1, T2, T3, T4, T5, ...)  \
    T0 ## _ ## T1 ## _ ## T2 ## _ ## T3 ## _ ## T4 ## _ ## T5
  

*** 128,13 ***
    if (level < (jint)LogLevel::First || level > (jint)LogLevel::Last) {
      JfrJavaSupport::throw_illegal_argument_exception("LogLevel passed is outside valid range", THREAD);
      return;
    }
  
!   objArrayOop the_lines = objArrayOop(JfrJavaSupport::resolve_non_null(lines));
-   assert(the_lines != nullptr, "invariant");
-   assert(the_lines->is_array(), "must be array");
    const int length = the_lines->length();
  
    ResourceMark rm(THREAD);
    LogMessage(jfr, event) jfr_event;
    LogMessage(jfr, system, event) jfr_event_system;
--- 129,11 ---
    if (level < (jint)LogLevel::First || level > (jint)LogLevel::Last) {
      JfrJavaSupport::throw_illegal_argument_exception("LogLevel passed is outside valid range", THREAD);
      return;
    }
  
!   refArrayOop the_lines = oop_cast<refArrayOop>(JfrJavaSupport::resolve_non_null(lines));
    const int length = the_lines->length();
  
    ResourceMark rm(THREAD);
    LogMessage(jfr, event) jfr_event;
    LogMessage(jfr, system, event) jfr_event_system;
< prev index next >