--- old/src/hotspot/share/jfr/recorder/repository/jfrRepository.cpp 2020-02-11 22:39:51.288835900 +0900 +++ new/src/hotspot/share/jfr/recorder/repository/jfrRepository.cpp 2020-02-11 22:39:50.473334800 +0900 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2020, 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 @@ -156,10 +156,15 @@ } } +const char* JfrRepository::path() { + return instance()._path; +} + bool JfrRepository::open_chunk(bool vm_error /* false */) { if (vm_error) { - ResourceMark rm; - _chunkwriter->set_path(JfrEmergencyDump::build_dump_path(_path)); + char chunk_path[JVM_MAXPATHLEN]; + JfrEmergencyDump::build_dump_path(_path, chunk_path, JVM_MAXPATHLEN); + _chunkwriter->set_path(chunk_path); } return _chunkwriter->open(); }