src/hotspot/share/runtime/statSampler.cpp
changeset 53547 9d1a788dea3d
parent 48115 d8ec0640616c
equal deleted inserted replaced
53546:63eb7e38ce84 53547:9d1a788dea3d
     1 /*
     1 /*
     2  * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2001, 2019, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     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
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
   354   // for each logged entry or as a liveness indicator for the VM.
   354   // for each logged entry or as a liveness indicator for the VM.
   355   PerfSampleHelper* psh = new HighResTimeSampler();
   355   PerfSampleHelper* psh = new HighResTimeSampler();
   356   PerfDataManager::create_counter(SUN_OS, "hrt.ticks",
   356   PerfDataManager::create_counter(SUN_OS, "hrt.ticks",
   357                                   PerfData::U_Ticks, psh, CHECK);
   357                                   PerfData::U_Ticks, psh, CHECK);
   358 }
   358 }
   359 
       
   360 /*
       
   361  * the statSampler_exit() function is called from os_init.cpp on
       
   362  * exit of the vm.
       
   363  */
       
   364 void statSampler_exit() {
       
   365 
       
   366   if (!UsePerfData) return;
       
   367 
       
   368   StatSampler::destroy();
       
   369 }