< prev index next >

src/hotspot/share/runtime/perfData.cpp

Print this page
*** 1,7 ***
  /*
!  * Copyright (c) 2001, 2018, 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) 2001, 2019, 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.

*** 83,11 ***
                    : _name(NULL), _v(v), _u(u), _on_c_heap(false), _valuep(NULL) {
  
    const char* prefix = PerfDataManager::ns_to_string(ns);
  
    _name = NEW_C_HEAP_ARRAY(char, strlen(name) + strlen(prefix) + 2, mtInternal);
!   assert(_name != NULL && strlen(name) != 0, "invalid name");
  
    if (ns == NULL_NS) {
       // No prefix is added to counters with the NULL_NS namespace.
       strcpy(_name, name);
       // set the F_Supported flag based on the counter name prefix.
--- 83,11 ---
                    : _name(NULL), _v(v), _u(u), _on_c_heap(false), _valuep(NULL) {
  
    const char* prefix = PerfDataManager::ns_to_string(ns);
  
    _name = NEW_C_HEAP_ARRAY(char, strlen(name) + strlen(prefix) + 2, mtInternal);
!   assert(strlen(name) != 0, "invalid name");
  
    if (ns == NULL_NS) {
       // No prefix is added to counters with the NULL_NS namespace.
       strcpy(_name, name);
       // set the F_Supported flag based on the counter name prefix.
< prev index next >