--- old/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/PerfDataEntry.java 2018-06-07 21:36:02.421699552 +0900 +++ new/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/PerfDataEntry.java 2018-06-07 21:36:02.243700020 +0900 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2004, 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 @@ -362,11 +362,7 @@ str = new String(charArrayValue()); } else if (dataType == BasicType.getTByte()) { // byte[] is returned as a String - try { - str = new String(byteArrayValue(), "US-ASCII"); - } catch (java.io.UnsupportedEncodingException e) { - str = "can't decode string : " + e.getMessage(); - } + str = CStringUtilities.getString(addr.addOffsetTo(dataOffset())); } else if (dataType == BasicType.getTShort()) { short[] res = shortArrayValue(); StringBuffer buf = new StringBuffer();