diff --git a/skeleton/scripts/update_version.sh b/skeleton/scripts/update_version.sh index d2d69269d..37d9f8497 100755 --- a/skeleton/scripts/update_version.sh +++ b/skeleton/scripts/update_version.sh @@ -1,5 +1,5 @@ ############################################################################### -# Copyright (c) 2016, 2022 Ericsson +# Copyright (c) 2016, 2024 Ericsson # # All rights reserved. This program and the accompanying materials # are made available under the terms of the Eclipse Public License 2.0 @@ -56,3 +56,6 @@ find ../../rcp/org.eclipse.tracecompass.incubator.rcp.product/ -name "*.product" #Update .product trace-server/org.eclipse.tracecompass.incubator.trace.server.product/(*/)traceserver.product find ../../trace-server/org.eclipse.tracecompass.incubator.trace.server.product/ -name "*.product" -type f -exec sed -i -e s/$oldVersion/$newVersion/g {} \; +#Update rest.core plugin trace-server/org.eclipse.tracecompass.incubator.trace.server.jersey.rest.core/META-INF/MANIFEST.MF. +#This version is retrieved to show the server version and hence has to match the trace server product version +sed -i -e s/$oldVersion.qualifier/$newVersion.qualifier/g ../../trace-server/org.eclipse.tracecompass.incubator.trace.server.jersey.rest.core/META-INF/MANIFEST.MF diff --git a/trace-server/org.eclipse.tracecompass.incubator.trace.server.jersey.rest.core/META-INF/MANIFEST.MF b/trace-server/org.eclipse.tracecompass.incubator.trace.server.jersey.rest.core/META-INF/MANIFEST.MF index 21e1a0e2a..4bec7d305 100644 --- a/trace-server/org.eclipse.tracecompass.incubator.trace.server.jersey.rest.core/META-INF/MANIFEST.MF +++ b/trace-server/org.eclipse.tracecompass.incubator.trace.server.jersey.rest.core/META-INF/MANIFEST.MF @@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2 Bundle-Name: %Bundle-Name Bundle-Vendor: %Bundle-Vendor Bundle-SymbolicName: org.eclipse.tracecompass.incubator.trace.server.jersey.rest.core;singleton:=true -Bundle-Version: 0.1.11.qualifier +Bundle-Version: 0.12.0.qualifier Bundle-Localization: plugin Bundle-Activator: org.eclipse.tracecompass.incubator.internal.trace.server.jersey.rest.core.Activator Bundle-ActivationPolicy: lazy diff --git a/trace-server/org.eclipse.tracecompass.incubator.trace.server.jersey.rest.core/src/org/eclipse/tracecompass/incubator/internal/trace/server/jersey/rest/core/services/IdentifierService.java b/trace-server/org.eclipse.tracecompass.incubator.trace.server.jersey.rest.core/src/org/eclipse/tracecompass/incubator/internal/trace/server/jersey/rest/core/services/IdentifierService.java index c0166457e..ed01667a3 100644 --- a/trace-server/org.eclipse.tracecompass.incubator.trace.server.jersey.rest.core/src/org/eclipse/tracecompass/incubator/internal/trace/server/jersey/rest/core/services/IdentifierService.java +++ b/trace-server/org.eclipse.tracecompass.incubator.trace.server.jersey.rest.core/src/org/eclipse/tracecompass/incubator/internal/trace/server/jersey/rest/core/services/IdentifierService.java @@ -41,6 +41,7 @@ public class IdentifierService { private static final String OS_NAME = "os.name"; //$NON-NLS-1$ private static final String OS_ARCH = "os.arch"; //$NON-NLS-1$ private static final String OS_VERSION = "os.version"; //$NON-NLS-1$ + private static final String JVM_VERSION = "java.version"; //$NON-NLS-1$ private static final String PRODUCT_ID = "eclipse.product"; //$NON-NLS-1$ private static final String LAUNCHER_NAME = "eclipse.launcher.name"; //$NON-NLS-1$ private static final String QUALIFIER = "qualifier"; //$NON-NLS-1$ @@ -69,10 +70,11 @@ public Response getSystemInfo() { response.setMaxMemory(Runtime.getRuntime().maxMemory()); response.setProductId(System.getProperty(PRODUCT_ID)); response.setLauncherName(System.getProperty(LAUNCHER_NAME)); + response.setJvmVersion(System.getProperty(JVM_VERSION)); if (product != null) { Version version = product.getDefiningBundle().getVersion(); - response.setVersion(version.getMajor() + SEPARATOR + version.getMicro() + SEPARATOR + version.getMinor()); + response.setVersion(version.getMajor() + SEPARATOR + version.getMinor() + SEPARATOR + version.getMicro()); String qualifier = version.getQualifier(); if (!QUALIFIER.equalsIgnoreCase(qualifier) && qualifier != null) { response.setBuildTime(qualifier); diff --git a/trace-server/org.eclipse.tracecompass.incubator.trace.server.jersey.rest.core/src/org/eclipse/tracecompass/incubator/internal/trace/server/jersey/rest/core/services/ServerInfoResponseImpl.java b/trace-server/org.eclipse.tracecompass.incubator.trace.server.jersey.rest.core/src/org/eclipse/tracecompass/incubator/internal/trace/server/jersey/rest/core/services/ServerInfoResponseImpl.java index 52e6e36e1..e3129f689 100644 --- a/trace-server/org.eclipse.tracecompass.incubator.trace.server.jersey.rest.core/src/org/eclipse/tracecompass/incubator/internal/trace/server/jersey/rest/core/services/ServerInfoResponseImpl.java +++ b/trace-server/org.eclipse.tracecompass.incubator.trace.server.jersey.rest.core/src/org/eclipse/tracecompass/incubator/internal/trace/server/jersey/rest/core/services/ServerInfoResponseImpl.java @@ -31,6 +31,7 @@ public class ServerInfoResponseImpl { private String launcherName; private String productId; private String tspVersion; + private String jvmVersion; /** * @return Version in the format Major.Minor.Micro @@ -201,4 +202,21 @@ public void setProductId(String productId) { public void setTspVersion(String version) { tspVersion = version; } + + /** + * Set JVM Version + * + * @param jvmVersion jvm version + */ + public void setJvmVersion(String jvmVersion) { + this.jvmVersion = jvmVersion; + } + + /** + * @return the jvm Version + */ + public String getJvmVersion() { + return jvmVersion; + } + } diff --git a/tracetypes/org.eclipse.tracecompass.incubator.uftrace.core/META-INF/MANIFEST.MF b/tracetypes/org.eclipse.tracecompass.incubator.uftrace.core/META-INF/MANIFEST.MF index 993c3de78..6c28aec5f 100644 --- a/tracetypes/org.eclipse.tracecompass.incubator.uftrace.core/META-INF/MANIFEST.MF +++ b/tracetypes/org.eclipse.tracecompass.incubator.uftrace.core/META-INF/MANIFEST.MF @@ -23,5 +23,6 @@ Export-Package: org.eclipse.tracecompass.incubator.internal.uftrace.core;x-frien org.eclipse.tracecompass.incubator.internal.uftrace.core.trace;x-friends:="org.eclipse.tracecompass.incubator.uftrace.core.tests" Import-Package: com.google.common.collect, org.apache.commons.io, - org.apache.commons.lang3.math + org.apache.commons.lang3.math, + org.eclipse.cdt.utils Automatic-Module-Name: org.eclipse.tracecompass.incubator.uftrace.core diff --git a/tracetypes/org.eclipse.tracecompass.incubator.uftrace.core/src/org/eclipse/tracecompass/incubator/internal/uftrace/core/trace/Uftrace.java b/tracetypes/org.eclipse.tracecompass.incubator.uftrace.core/src/org/eclipse/tracecompass/incubator/internal/uftrace/core/trace/Uftrace.java index 83b594e12..cd1cff6fe 100644 --- a/tracetypes/org.eclipse.tracecompass.incubator.uftrace.core/src/org/eclipse/tracecompass/incubator/internal/uftrace/core/trace/Uftrace.java +++ b/tracetypes/org.eclipse.tracecompass.incubator.uftrace.core/src/org/eclipse/tracecompass/incubator/internal/uftrace/core/trace/Uftrace.java @@ -27,6 +27,7 @@ import java.util.Set; import org.apache.commons.io.FilenameUtils; +import org.eclipse.cdt.utils.CPPFilt; import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.IResource; import org.eclipse.core.runtime.IProgressMonitor; @@ -39,6 +40,7 @@ import org.eclipse.tracecompass.incubator.analysis.core.aspects.ProcessNameAspect; import org.eclipse.tracecompass.incubator.internal.uftrace.core.Activator; import org.eclipse.tracecompass.incubator.internal.uftrace.core.trace.SymParser.Symbol; +import org.eclipse.tracecompass.internal.tmf.core.callstack.FunctionNameMapper; import org.eclipse.tracecompass.tmf.core.event.ITmfEvent; import org.eclipse.tracecompass.tmf.core.event.ITmfEventType; import org.eclipse.tracecompass.tmf.core.event.aspect.ITmfEventAspect; @@ -491,9 +493,15 @@ private Map getMap() { private static class UfTraceSymbolProvider implements ISymbolProvider { private Uftrace fTrace; + private CPPFilt fCppFilt; public UfTraceSymbolProvider(Uftrace trace) { fTrace = trace; + try { + fCppFilt = new CPPFilt(); + } catch (IOException e) { + Activator.getInstance().logError("Could not load CPP Filt, C++ functions will be mangled." , e); //$NON-NLS-1$ + } } @Override @@ -526,6 +534,9 @@ public TmfResolvedSymbol getSymbol(int tid, long timestamp, long address) { Symbol value = floorEntry.getValue(); if (value != null) { String name = String.valueOf(value.getName()); + if(fCppFilt != null) { + name = FunctionNameMapper.nameFromCppFilt(fCppFilt, name); + } return new TmfResolvedSymbol(address, name); } }