src/java.desktop/share/classes/sun/java2d/marlin/RendererStats.java
changeset 49496 1ea202af7a97
parent 48284 fd7fbc929001
equal deleted inserted replaced
49495:f46bfa7a2956 49496:1ea202af7a97
     1 /*
     1 /*
     2  * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2015, 2018, 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.  Oracle designates this
     7  * published by the Free Software Foundation.  Oracle designates this
    34 import sun.java2d.marlin.ArrayCacheConst.CacheStats;
    34 import sun.java2d.marlin.ArrayCacheConst.CacheStats;
    35 import static sun.java2d.marlin.MarlinUtils.logInfo;
    35 import static sun.java2d.marlin.MarlinUtils.logInfo;
    36 import sun.java2d.marlin.stats.Histogram;
    36 import sun.java2d.marlin.stats.Histogram;
    37 import sun.java2d.marlin.stats.Monitor;
    37 import sun.java2d.marlin.stats.Monitor;
    38 import sun.java2d.marlin.stats.StatLong;
    38 import sun.java2d.marlin.stats.StatLong;
    39 import sun.awt.util.ThreadGroupUtils;
       
    40 
    39 
    41 /**
    40 /**
    42  * This class gathers global rendering statistics for debugging purposes only
    41  * This class gathers global rendering statistics for debugging purposes only
    43  */
    42  */
    44 public final class RendererStats implements MarlinConst {
    43 public final class RendererStats implements MarlinConst {
   357 
   356 
   358         private RendererStatsHolder() {
   357         private RendererStatsHolder() {
   359             AccessController.doPrivileged(
   358             AccessController.doPrivileged(
   360                 (PrivilegedAction<Void>) () -> {
   359                 (PrivilegedAction<Void>) () -> {
   361                     final Thread hook = new Thread(
   360                     final Thread hook = new Thread(
   362                         ThreadGroupUtils.getRootThreadGroup(),
   361                         MarlinUtils.getRootThreadGroup(),
   363                         new Runnable() {
   362                         new Runnable() {
   364                             @Override
   363                             @Override
   365                             public void run() {
   364                             public void run() {
   366                                 dump();
   365                                 dump();
   367                             }
   366                             }