diff --git a/dlight.perfan/src/org/netbeans/modules/dlight/perfan/spi/SunStudioDataCollector.java b/dlight.perfan/src/org/netbeans/modules/dlight/perfan/spi/SunStudioDataCollector.java --- a/dlight.perfan/src/org/netbeans/modules/dlight/perfan/spi/SunStudioDataCollector.java +++ b/dlight.perfan/src/org/netbeans/modules/dlight/perfan/spi/SunStudioDataCollector.java @@ -41,7 +41,6 @@ */ package org.netbeans.modules.dlight.perfan.spi; -import java.io.File; import java.io.IOException; import java.io.OutputStreamWriter; import java.util.ArrayList; @@ -76,6 +75,7 @@ import org.netbeans.modules.dlight.spi.SunStudioLocatorFactory; import org.netbeans.modules.dlight.spi.collector.DataCollector; import org.netbeans.modules.dlight.api.datafilter.DataFilter; +import org.netbeans.modules.dlight.libs.common.PathUtilities; import org.netbeans.modules.dlight.perfan.impl.SunStudioDCConfigurationAccessor; import org.netbeans.modules.dlight.perfan.spi.datafilter.SunStudioFiltersProvider; import org.netbeans.modules.dlight.perfan.spi.datafilter.THAFilter; @@ -636,8 +636,9 @@ // Try to remove _collector_directory_lock as well... // To make things simple - just do not look at the result of // this operation (it will fail if lock file doesn't exist) - File lockFile = new File(new File(experimentDirectory).getParentFile(), "_collector_directory_lock"); // NOI18N - rmFuture = CommonTasksSupport.rmFile(execEnv, lockFile.getPath(), null); + String dirName = PathUtilities.getDirName(experimentDirectory); + String lockFile = dirName + "/" + "_collector_directory_lock"; // NOI18N + rmFuture = CommonTasksSupport.rmFile(execEnv, lockFile, null); rmResult = rmFuture.get(); } } catch (Throwable th) { @@ -645,7 +646,7 @@ } if (!result) { - log.severe("Unable to prepare an experiment directory!"); // NOI18N + log.log(Level.SEVERE, "Unable to prepare an experiment directory!{0} at {1}", new Object[]{experimentDirectory, execEnv.toString()}); // NOI18N } return result; diff --git a/dlight.perfan/src/org/netbeans/modules/dlight/perfan/stack/impl/FunctionCallImpl.java b/dlight.perfan/src/org/netbeans/modules/dlight/perfan/stack/impl/FunctionCallImpl.java --- a/dlight.perfan/src/org/netbeans/modules/dlight/perfan/stack/impl/FunctionCallImpl.java +++ b/dlight.perfan/src/org/netbeans/modules/dlight/perfan/stack/impl/FunctionCallImpl.java @@ -41,7 +41,6 @@ */ package org.netbeans.modules.dlight.perfan.stack.impl; -import java.io.File; import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; @@ -53,6 +52,7 @@ import org.netbeans.modules.dlight.core.stack.api.FunctionCall; import org.netbeans.modules.dlight.core.stack.api.FunctionCallWithMetric; import org.netbeans.modules.dlight.core.stack.api.FunctionMetric; +import org.netbeans.modules.dlight.libs.common.PathUtilities; import org.netbeans.modules.dlight.spi.SourceFileInfoProvider.SourceFileInfo; /** @@ -181,7 +181,7 @@ int line = sourceInfo.getLine(); sb.append("; "); // NOI18N - sb.append(new File(file).getName()); + sb.append(PathUtilities.getBaseName(file)); if (line > 0) { sb.append(':').append(line);