aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kurtakov2018-05-14 11:30:00 -0400
committerAlexander Kurtakov2018-05-14 11:49:55 -0400
commitf626ce6952a9178a7e27835fc34f5d67ee13931c (patch)
treec0bbbaebd9b2b69495552755ffd20e0f4168c5b4
parent2d5e9c6c10f0d179ce8b092823e14b6bc9bbac03 (diff)
downloadorg.eclipse.linuxtools-f626ce6952a9178a7e27835fc34f5d67ee13931c.tar.gz
org.eclipse.linuxtools-f626ce6952a9178a7e27835fc34f5d67ee13931c.tar.xz
org.eclipse.linuxtools-f626ce6952a9178a7e27835fc34f5d67ee13931c.zip
Update oprofile plugin license header to EPL 2.0.
Change-Id: I2533fb783246097a4f9f2aa3aa8cb3cef91e658a Signed-off-by: Alexander Kurtakov <akurtako@redhat.com> Reviewed-on: https://git.eclipse.org/r/122595
-rw-r--r--oprofile/eclipse-oprofile.metainfo.xml13
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile-feature/feature.properties10
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile-feature/pom.xml11
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.core.tests/plugin.properties12
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.core.tests/pom.xml11
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.core.tests/src/org/eclipse/linuxtools/oprofile/core/tests/AllCoreTests.java12
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.core.tests/src/org/eclipse/linuxtools/oprofile/core/tests/TestCheckEventsParse.java12
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.core.tests/src/org/eclipse/linuxtools/oprofile/core/tests/TestCheckEventsPreParse.java12
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.core.tests/src/org/eclipse/linuxtools/oprofile/core/tests/TestDataModel.java12
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.core.tests/src/org/eclipse/linuxtools/oprofile/core/tests/TestInfoParse.java12
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.core.tests/src/org/eclipse/linuxtools/oprofile/core/tests/TestModelDataParse.java12
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.core.tests/src/org/eclipse/linuxtools/oprofile/core/tests/TestModelDataPreParse.java12
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.core.tests/src/org/eclipse/linuxtools/oprofile/core/tests/TestSessionsParse.java12
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.core/plugin.properties12
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.core/pom.xml11
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/IOpxmlProvider.java88
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/Oprofile.java30
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/OprofileCorePlugin.java30
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/OprofileProperties.java34
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/daemon/OpEvent.java168
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/daemon/OpInfo.java57
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/daemon/OpUnitMask.java12
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/daemon/OprofileDaemonEvent.java231
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/daemon/OprofileDaemonOptions.java204
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/linux/LinuxOpxmlProvider.java16
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/linux/OpxmlRunner.java30
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/model/OpModelEvent.java105
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/model/OpModelImage.java262
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/model/OpModelRoot.java115
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/model/OpModelSample.java85
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/model/OpModelSession.java126
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/model/OpModelSymbol.java137
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/oprofile.properties12
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/opxml/AbstractDataAdapter.java106
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/opxml/EventIdCache.java425
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/opxml/OprofileSAXHandler.java22
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/opxml/OpxmlConstants.java56
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/opxml/XMLProcessor.java133
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/opxml/checkevent/CheckEventAdapter.java12
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/opxml/checkevent/CheckEventsProcessor.java71
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/opxml/info/DefaultsProcessor.java53
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/opxml/info/EventListProcessor.java12
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/opxml/info/InfoAdapter.java12
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/opxml/info/OpInfoProcessor.java108
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/opxml/modeldata/DependentProcessor.java113
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/opxml/modeldata/ModelDataAdapter.java694
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/opxml/modeldata/ModelDataProcessor.java138
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/opxml/modeldata/SamplesProcessor.java92
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/opxml/modeldata/SymbolsProcessor.java123
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/opxml/sessions/SessionManager.java39
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/opxml/sessions/SessionsProcessor.java134
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.doc/pom.xml11
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.launch.tests/plugin.properties12
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.launch.tests/pom.xml11
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.launch.tests/src/org/eclipse/linuxtools/oprofile/launch/tests/AllLaunchTests.java12
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.launch.tests/src/org/eclipse/linuxtools/oprofile/launch/tests/TestLaunching.java12
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.launch.tests/src/org/eclipse/linuxtools/oprofile/launch/tests/TestLaunchingExternalProject.java12
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.launch.tests/src/org/eclipse/linuxtools/oprofile/launch/tests/TestSetup.java12
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.launch.tests/src/org/eclipse/linuxtools/oprofile/launch/tests/utils/LaunchTestingOptions.java12
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.launch.tests/src/org/eclipse/linuxtools/oprofile/launch/tests/utils/OprofileTestingEventConfigTab.java12
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.launch.tests/src/org/eclipse/linuxtools/oprofile/launch/tests/utils/TestingOprofileLaunchConfigurationDelegate.java15
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.launch/plugin.properties12
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.launch/pom.xml11
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/internal/oprofile/launch/OprofileLaunchMessages.java12
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/internal/oprofile/launch/OprofileLaunchPlugin.java12
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/internal/oprofile/launch/configuration/AbstractEventConfigTab.java12
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/internal/oprofile/launch/configuration/EventConfigCache.java12
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/internal/oprofile/launch/configuration/LaunchOptions.java12
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/internal/oprofile/launch/configuration/OprofileCounter.java12
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/internal/oprofile/launch/configuration/OprofileEventConfigTab.java21
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/internal/oprofile/launch/configuration/OprofileLaunchConfigurationTabGroup.java12
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/internal/oprofile/launch/configuration/OprofileSetupTab.java12
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/internal/oprofile/launch/launching/AbstractOprofileLaunchConfigurationDelegate.java12
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/internal/oprofile/launch/launching/OprofileLaunchConfigurationDelegate.java12
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/internal/oprofile/launch/launching/OprofileLaunchShortcut.java12
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/internal/oprofile/launch/oprofilelaunch.properties12
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.remote-feature/feature.properties12
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.remote-feature/pom.xml11
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.remote.launch/plugin.properties12
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.remote.launch/src/org/eclipse/linuxtools/internal/oprofile/remote/launch/configuration/OprofileRemoteLaunchConfigurationTabGroup.java12
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.remote.launch/src/org/eclipse/linuxtools/internal/oprofile/remote/launch/launching/OprofileRemoteLaunchConfigurationDelegate.java12
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.tests/plugin.properties12
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.tests/pom.xml11
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.tests/src/org/eclipse/linuxtools/oprofile/tests/TestPlugin.java12
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.tests/src/org/eclipse/linuxtools/oprofile/tests/TestingOpModelEvent.java12
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.tests/src/org/eclipse/linuxtools/oprofile/tests/TestingOpModelEvent2.java12
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.tests/src/org/eclipse/linuxtools/oprofile/tests/TestingOpModelEvent3.java12
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.tests/src/org/eclipse/linuxtools/oprofile/tests/TestingOpModelEvent4.java12
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.tests/src/org/eclipse/linuxtools/oprofile/tests/TestingOpModelRoot.java16
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.ui.tests/plugin.properties12
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.ui.tests/pom.xml11
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.ui.tests/src/org/eclipse/linuxtools/oprofile/ui/tests/TestUiDataModel.java12
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.ui/plugin.properties12
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.ui/pom.xml11
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/internal/oprofile/ui/OprofileUiMessages.java12
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/internal/oprofile/ui/OprofileUiPlugin.java12
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/internal/oprofile/ui/oprofileui.properties12
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/internal/oprofile/ui/view/OcountView.java12
-rwxr-xr-xoprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/internal/oprofile/ui/view/OprofileView.java12
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/internal/oprofile/ui/view/OprofileViewContentProvider.java12
-rwxr-xr-xoprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/internal/oprofile/ui/view/OprofileViewDeleteSessionAction.java12
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/internal/oprofile/ui/view/OprofileViewDoubleClickListener.java12
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/internal/oprofile/ui/view/OprofileViewLabelProvider.java12
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/internal/oprofile/ui/view/OprofileViewLogReaderAction.java12
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/internal/oprofile/ui/view/OprofileViewRefreshAction.java12
-rwxr-xr-xoprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/internal/oprofile/ui/view/OprofileViewSaveDefaultSessionAction.java12
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/internal/oprofile/ui/view/OprofileViewSortAction.java12
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/model/IUiModelElement.java12
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/model/UiModelDependent.java12
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/model/UiModelError.java12
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/model/UiModelEvent.java12
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/model/UiModelImage.java12
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/model/UiModelRoot.java12
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/model/UiModelSample.java12
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/model/UiModelSession.java12
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/model/UiModelSorting.java12
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/model/UiModelSymbol.java12
-rw-r--r--oprofile/pom.xml25
118 files changed, 2642 insertions, 2445 deletions
diff --git a/oprofile/eclipse-oprofile.metainfo.xml b/oprofile/eclipse-oprofile.metainfo.xml
index 8f44fa2257..240d8ffabc 100644
--- a/oprofile/eclipse-oprofile.metainfo.xml
+++ b/oprofile/eclipse-oprofile.metainfo.xml
@@ -1,16 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (C) 2015, Red Hat, Inc.
+ Copyright (C) 2015, 2018 Red Hat, Inc.
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
+ This program and the accompanying materials are made
+ available under the terms of the Eclipse Public License 2.0
+ which is available at https://www.eclipse.org/legal/epl-2.0/
+
+ SPDX-License-Identifier: EPL-2.0
-->
<component type="addon">
<id>eclipse-oprofile</id>
<metadata_license>CC-BY-SA-3.0</metadata_license>
- <project_license>EPL-1.0</project_license>
+ <project_license>EPL-2.0</project_license>
<extends>eclipse.desktop</extends>
<name>Oprofile</name>
<summary>Linux Tools Eclipse plug-ins for Oprofile profiling tool</summary>
diff --git a/oprofile/org.eclipse.linuxtools.oprofile-feature/feature.properties b/oprofile/org.eclipse.linuxtools.oprofile-feature/feature.properties
index a93ee2494d..ffb7ca0feb 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile-feature/feature.properties
+++ b/oprofile/org.eclipse.linuxtools.oprofile-feature/feature.properties
@@ -1,9 +1,11 @@
#*******************************************************************************
# Copyright (c) 2008 Red Hat, Inc.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
+#
+# This program and the accompanying materials are made
+# available under the terms of the Eclipse Public License 2.0
+# which is available at https://www.eclipse.org/legal/epl-2.0/
+#
+# SPDX-License-Identifier: EPL-2.0
#
# Contributors:
# Red Hat, Inc. - initial API and implementation
diff --git a/oprofile/org.eclipse.linuxtools.oprofile-feature/pom.xml b/oprofile/org.eclipse.linuxtools.oprofile-feature/pom.xml
index 16fb7aedc1..e8f5f94a28 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile-feature/pom.xml
+++ b/oprofile/org.eclipse.linuxtools.oprofile-feature/pom.xml
@@ -1,11 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (C) 2011, Red Hat, Inc.
+ Copyright (C) 2011, 2018 Red Hat, Inc.
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
+ This program and the accompanying materials are made
+ available under the terms of the Eclipse Public License 2.0
+ which is available at https://www.eclipse.org/legal/epl-2.0/
+
+ SPDX-License-Identifier: EPL-2.0
-->
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.core.tests/plugin.properties b/oprofile/org.eclipse.linuxtools.oprofile.core.tests/plugin.properties
index d9c5531988..dcf5f4f21f 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.core.tests/plugin.properties
+++ b/oprofile/org.eclipse.linuxtools.oprofile.core.tests/plugin.properties
@@ -1,9 +1,11 @@
#*******************************************************************************
-# Copyright (c) 2009 Red Hat, Inc.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
+# Copyright (c) 2009, 2018 Red Hat, Inc.
+#
+# This program and the accompanying materials are made
+# available under the terms of the Eclipse Public License 2.0
+# which is available at https://www.eclipse.org/legal/epl-2.0/
+#
+# SPDX-License-Identifier: EPL-2.0
#
# Contributors:
# Kent Sebastian <ksebasti@redhat.com> - initial API and implementation
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.core.tests/pom.xml b/oprofile/org.eclipse.linuxtools.oprofile.core.tests/pom.xml
index 2f2e4e750f..3909389c9d 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.core.tests/pom.xml
+++ b/oprofile/org.eclipse.linuxtools.oprofile.core.tests/pom.xml
@@ -1,11 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (C) 2011, Red Hat, Inc.
+ Copyright (C) 2011, 2018 Red Hat, Inc.
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
+ This program and the accompanying materials are made
+ available under the terms of the Eclipse Public License 2.0
+ which is available at https://www.eclipse.org/legal/epl-2.0/
+
+ SPDX-License-Identifier: EPL-2.0
-->
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.core.tests/src/org/eclipse/linuxtools/oprofile/core/tests/AllCoreTests.java b/oprofile/org.eclipse.linuxtools.oprofile.core.tests/src/org/eclipse/linuxtools/oprofile/core/tests/AllCoreTests.java
index cf7d9687e6..81cb51cf3f 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.core.tests/src/org/eclipse/linuxtools/oprofile/core/tests/AllCoreTests.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.core.tests/src/org/eclipse/linuxtools/oprofile/core/tests/AllCoreTests.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2009, 2017 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Kent Sebastian <ksebasti@redhat.com> - initial API and implementation
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.core.tests/src/org/eclipse/linuxtools/oprofile/core/tests/TestCheckEventsParse.java b/oprofile/org.eclipse.linuxtools.oprofile.core.tests/src/org/eclipse/linuxtools/oprofile/core/tests/TestCheckEventsParse.java
index 3a5c5837c5..6323630314 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.core.tests/src/org/eclipse/linuxtools/oprofile/core/tests/TestCheckEventsParse.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.core.tests/src/org/eclipse/linuxtools/oprofile/core/tests/TestCheckEventsParse.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Kent Sebastian <ksebasti@redhat.com> - initial API and implementation
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.core.tests/src/org/eclipse/linuxtools/oprofile/core/tests/TestCheckEventsPreParse.java b/oprofile/org.eclipse.linuxtools.oprofile.core.tests/src/org/eclipse/linuxtools/oprofile/core/tests/TestCheckEventsPreParse.java
index 1537b4f384..77b93788f8 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.core.tests/src/org/eclipse/linuxtools/oprofile/core/tests/TestCheckEventsPreParse.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.core.tests/src/org/eclipse/linuxtools/oprofile/core/tests/TestCheckEventsPreParse.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2010, 2017 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2010, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Red Hat - initial API and implementation
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.core.tests/src/org/eclipse/linuxtools/oprofile/core/tests/TestDataModel.java b/oprofile/org.eclipse.linuxtools.oprofile.core.tests/src/org/eclipse/linuxtools/oprofile/core/tests/TestDataModel.java
index 9f32321310..f5f906cca9 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.core.tests/src/org/eclipse/linuxtools/oprofile/core/tests/TestDataModel.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.core.tests/src/org/eclipse/linuxtools/oprofile/core/tests/TestDataModel.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Kent Sebastian <ksebasti@redhat.com> - initial API and implementation
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.core.tests/src/org/eclipse/linuxtools/oprofile/core/tests/TestInfoParse.java b/oprofile/org.eclipse.linuxtools.oprofile.core.tests/src/org/eclipse/linuxtools/oprofile/core/tests/TestInfoParse.java
index 952e103560..4910a36596 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.core.tests/src/org/eclipse/linuxtools/oprofile/core/tests/TestInfoParse.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.core.tests/src/org/eclipse/linuxtools/oprofile/core/tests/TestInfoParse.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Kent Sebastian <ksebasti@redhat.com> - initial API and implementation
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.core.tests/src/org/eclipse/linuxtools/oprofile/core/tests/TestModelDataParse.java b/oprofile/org.eclipse.linuxtools.oprofile.core.tests/src/org/eclipse/linuxtools/oprofile/core/tests/TestModelDataParse.java
index 8a7ff99c7f..8352d81997 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.core.tests/src/org/eclipse/linuxtools/oprofile/core/tests/TestModelDataParse.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.core.tests/src/org/eclipse/linuxtools/oprofile/core/tests/TestModelDataParse.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Kent Sebastian <ksebasti@redhat.com> - initial API and implementation
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.core.tests/src/org/eclipse/linuxtools/oprofile/core/tests/TestModelDataPreParse.java b/oprofile/org.eclipse.linuxtools.oprofile.core.tests/src/org/eclipse/linuxtools/oprofile/core/tests/TestModelDataPreParse.java
index fa662c410d..ddcac7034f 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.core.tests/src/org/eclipse/linuxtools/oprofile/core/tests/TestModelDataPreParse.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.core.tests/src/org/eclipse/linuxtools/oprofile/core/tests/TestModelDataPreParse.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2010-2013 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2010, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Red Hat - initial API and implementation
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.core.tests/src/org/eclipse/linuxtools/oprofile/core/tests/TestSessionsParse.java b/oprofile/org.eclipse.linuxtools.oprofile.core.tests/src/org/eclipse/linuxtools/oprofile/core/tests/TestSessionsParse.java
index 979f84dc45..134b761aae 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.core.tests/src/org/eclipse/linuxtools/oprofile/core/tests/TestSessionsParse.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.core.tests/src/org/eclipse/linuxtools/oprofile/core/tests/TestSessionsParse.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Kent Sebastian <ksebasti@redhat.com> - initial API and implementation
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.core/plugin.properties b/oprofile/org.eclipse.linuxtools.oprofile.core/plugin.properties
index 36eb9920ad..960861cbcf 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.core/plugin.properties
+++ b/oprofile/org.eclipse.linuxtools.oprofile.core/plugin.properties
@@ -1,9 +1,11 @@
#*******************************************************************************
-# Copyright (c) 2008, 2017 Red Hat, Inc.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
+# Copyright (c) 2008, 2018 Red Hat, Inc.
+#
+# This program and the accompanying materials are made
+# available under the terms of the Eclipse Public License 2.0
+# which is available at https://www.eclipse.org/legal/epl-2.0/
+#
+# SPDX-License-Identifier: EPL-2.0
#
# Contributors:
# Kent Sebastian <ksebasti@redhat.com> - initial API and implementation
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.core/pom.xml b/oprofile/org.eclipse.linuxtools.oprofile.core/pom.xml
index 5e59e44290..961aebc89e 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.core/pom.xml
+++ b/oprofile/org.eclipse.linuxtools.oprofile.core/pom.xml
@@ -1,11 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (C) 2011, Red Hat, Inc.
+ Copyright (C) 2011, 2018 Red Hat, Inc.
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
+ This program and the accompanying materials are made
+ available under the terms of the Eclipse Public License 2.0
+ which is available at https://www.eclipse.org/legal/epl-2.0/
+
+ SPDX-License-Identifier: EPL-2.0
-->
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/IOpxmlProvider.java b/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/IOpxmlProvider.java
index d0a00983f6..014bbfaec5 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/IOpxmlProvider.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/IOpxmlProvider.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2004,2008 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2004, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Keith Seitz <keiths@redhat.com> - initial API and implementation
@@ -19,44 +21,52 @@ import org.eclipse.linuxtools.internal.oprofile.core.model.OpModelImage;
import org.eclipse.linuxtools.internal.oprofile.core.model.OpModelSession;
/**
- * Interface for the core to utilize opxml. Platform plugins should define/register an
- * OpxmlProvider for the core to use.
+ * Interface for the core to utilize opxml. Platform plugins should
+ * define/register an OpxmlProvider for the core to use.
*/
public interface IOpxmlProvider {
- /**
- * Returns an <code>IRunnableWithProgress</code> that fetches generic information from opxml
- * @param info <code>OpInfo</code> object for results
- * @return <code>IRunnableWithProgress</code> that may be run by the caller
- */
- IRunnableWithProgress info(OpInfo info);
+ /**
+ * Returns an <code>IRunnableWithProgress</code> that fetches generic
+ * information from opxml
+ *
+ * @param info <code>OpInfo</code> object for results
+ * @return <code>IRunnableWithProgress</code> that may be run by the caller
+ */
+ IRunnableWithProgress info(OpInfo info);
- /**
- * Returns an <code>IRunnableWithProgress</code> that fetches samples for the
- * given <code>OpModelSession</code>
- * @param eventName the event for which to fetch samples
- * @param sessionName the session for which to fetch samples
- * @param image the image being profiled to be returned to the caller
- * @return <code>IRunnableWithProgress</code> that may be run by the caller
- */
- IRunnableWithProgress modelData(String eventName, String sessionName, OpModelImage image);
+ /**
+ * Returns an <code>IRunnableWithProgress</code> that fetches samples for the
+ * given <code>OpModelSession</code>
+ *
+ * @param eventName the event for which to fetch samples
+ * @param sessionName the session for which to fetch samples
+ * @param image the image being profiled to be returned to the caller
+ * @return <code>IRunnableWithProgress</code> that may be run by the caller
+ */
+ IRunnableWithProgress modelData(String eventName, String sessionName, OpModelImage image);
- /**
- * Returns an <code>IRunnableWithProgress</code> that checks the validity of the given
- * event, unit mask, and counter combination
- * @param ctr the counter
- * @param event the String event name
- * @param um the integer unit mask
- * @param eventValid a size one array to hold the return result (see <code>CheckEventsProcessor</code>)
- * @return <code>IRunnableWithProgress</code> that may be run by the caller
- */
- IRunnableWithProgress checkEvents(int ctr, String event, int um, int[] eventValid);
+ /**
+ * Returns an <code>IRunnableWithProgress</code> that checks the validity of the
+ * given event, unit mask, and counter combination
+ *
+ * @param ctr the counter
+ * @param event the String event name
+ * @param um the integer unit mask
+ * @param eventValid a size one array to hold the return result (see
+ * <code>CheckEventsProcessor</code>)
+ * @return <code>IRunnableWithProgress</code> that may be run by the caller
+ */
+ IRunnableWithProgress checkEvents(int ctr, String event, int um, int[] eventValid);
- /**
- * Returns an <code>IRunnableWithProgress</code> that fetches the list of sessions
- * @param info the <code>OpInfo</code> for oprofile
- * @param sessionList an <code>ArrayList</code> in which to return the list of sessions
- * @return <code>IRunnableWithProgress</code> that may be run by the caller
- */
- IRunnableWithProgress sessions(ArrayList<OpModelSession> sessionList);
+ /**
+ * Returns an <code>IRunnableWithProgress</code> that fetches the list of
+ * sessions
+ *
+ * @param info the <code>OpInfo</code> for oprofile
+ * @param sessionList an <code>ArrayList</code> in which to return the list of
+ * sessions
+ * @return <code>IRunnableWithProgress</code> that may be run by the caller
+ */
+ IRunnableWithProgress sessions(ArrayList<OpModelSession> sessionList);
}
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/Oprofile.java b/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/Oprofile.java
index 2e12758185..8d64f28127 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/Oprofile.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/Oprofile.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2004, 2008, 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2004, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Keith Seitz <keiths@redhat.com> - initial API and implementation
@@ -134,8 +136,7 @@ public class Oprofile {
/**
* Get all the events that may be collected on the given counter.
*
- * @param num
- * the counter number
+ * @param num the counter number
* @return an array of all valid events -- NEVER RETURNS NULL!
*/
public static OpEvent[] getEvents(int num) {
@@ -173,12 +174,9 @@ public class Oprofile {
/**
* Checks the requested counter, event, and unit mask for validity.
*
- * @param ctr
- * the counter
- * @param event
- * the event name
- * @param um
- * the unit mask
+ * @param ctr the counter
+ * @param event the event name
+ * @param um the unit mask
* @return whether the requested event is valid
*/
public static Boolean checkEvent(int ctr, String event, int um) {
@@ -217,10 +215,8 @@ public class Oprofile {
/**
* Return a list of all the Samples in the given session.
*
- * @param session
- * the session for which to get samples
- * @param shell
- * the composite shell to use for the progress dialog
+ * @param session the session for which to get samples
+ * @param shell the composite shell to use for the progress dialog
*/
public static OpModelImage getModelData(String eventName, String sessionName) {
OpModelImage image = new OpModelImage();
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/OprofileCorePlugin.java b/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/OprofileCorePlugin.java
index 19f2c43e59..bdea2d6f91 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/OprofileCorePlugin.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/OprofileCorePlugin.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2004, 2008, 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2004, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Keith Seitz <keiths@redhat.com> - initial API and implementation
@@ -81,10 +83,8 @@ public class OprofileCorePlugin extends Plugin {
/**
* Creates an error status object
*
- * @param errorClassString
- * A string of the error class
- * @param e
- * The type of exception
+ * @param errorClassString A string of the error class
+ * @param e The type of exception
* @return the status object of the error
*/
public static IStatus createErrorStatus(String errorClassString, Exception e) {
@@ -100,10 +100,8 @@ public class OprofileCorePlugin extends Plugin {
/**
* Shows an error Dialog
*
- * @param errorClassString
- * A string of the error class
- * @param ex
- * The type of exception
+ * @param errorClassString A string of the error class
+ * @param ex The type of exception
*/
public static void showErrorDialog(String errorClassString, CoreException ex) {
final IStatus status;
@@ -135,10 +133,8 @@ public class OprofileCorePlugin extends Plugin {
/**
* Log a string message with the given severity in the error log.
*
- * @param severity
- * the severity of this exception
- * @param msg
- * the string message to be logged
+ * @param severity the severity of this exception
+ * @param msg the string message to be logged
*/
public static void log(int severity, String msg) {
plugin.getLog().log(new Status(severity, PLUGIN_ID, IStatus.OK, msg, null));
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/OprofileProperties.java b/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/OprofileProperties.java
index 593d85d44e..0dc7800dcb 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/OprofileProperties.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/OprofileProperties.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2004 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2004, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Keith Seitz <keiths@redhat.com> - initial API and implementation
@@ -15,17 +17,17 @@ import java.util.MissingResourceException;
import java.util.ResourceBundle;
public class OprofileProperties {
- private static final String BUNDLE_NAME = "org.eclipse.linuxtools.internal.oprofile.core.oprofile"; //$NON-NLS-1$
- private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle(BUNDLE_NAME);
+ private static final String BUNDLE_NAME = "org.eclipse.linuxtools.internal.oprofile.core.oprofile"; //$NON-NLS-1$
+ private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle(BUNDLE_NAME);
- private OprofileProperties() {
- }
+ private OprofileProperties() {
+ }
- public static String getString(String key) {
- try {
- return RESOURCE_BUNDLE.getString(key);
- } catch (MissingResourceException e) {
- return '!' + key + '!';
- }
- }
+ public static String getString(String key) {
+ try {
+ return RESOURCE_BUNDLE.getString(key);
+ } catch (MissingResourceException e) {
+ return '!' + key + '!';
+ }
+ }
}
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/daemon/OpEvent.java b/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/daemon/OpEvent.java
index 588e52d744..b0b5c31da9 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/daemon/OpEvent.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/daemon/OpEvent.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2004, 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2004, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Keith Seitz <keiths@redhat.com> - initial API and implementation
@@ -16,91 +18,95 @@ package org.eclipse.linuxtools.internal.oprofile.core.daemon;
* A class which represents an Oprofile event
*/
public class OpEvent {
- /**
- * The Oprofile event name, i.e., "CPU_CLK_UNHALTED"
- */
- private String name;
+ /**
+ * The Oprofile event name, i.e., "CPU_CLK_UNHALTED"
+ */
+ private String name;
- /**
- * A description of the event
- */
- private String description;
+ /**
+ * A description of the event
+ */
+ private String description;
- /**
- * Unit masks for this event type
- */
- private OpUnitMask unitMask;
+ /**
+ * Unit masks for this event type
+ */
+ private OpUnitMask unitMask;
- /**
- * Minimum count
- */
- private int minCount;
+ /**
+ * Minimum count
+ */
+ private int minCount;
- /**
- * Sets the unit mask for this event.
- * Only called from XML parsers.
- * @param mask the new unit mask
- */
- public void setUnitMask(OpUnitMask mask) {
- unitMask = mask;
- }
+ /**
+ * Sets the unit mask for this event. Only called from XML parsers.
+ *
+ * @param mask the new unit mask
+ */
+ public void setUnitMask(OpUnitMask mask) {
+ unitMask = mask;
+ }
- /**
- * Sets the name of this event.
- * Only called from XML parsers.
- * @param text the name
- */
- public void setText(String text) {
- name = text;
- }
+ /**
+ * Sets the name of this event. Only called from XML parsers.
+ *
+ * @param text the name
+ */
+ public void setText(String text) {
+ name = text;
+ }
- /**
- * Sets the description of this oprofile event.
- * Only called from XML parsers.
- * @param text the description
- */
- public void setTextDescription(String text) {
- description = text;
- }
+ /**
+ * Sets the description of this oprofile event. Only called from XML parsers.
+ *
+ * @param text the description
+ */
+ public void setTextDescription(String text) {
+ description = text;
+ }
- /**
- * Sets the minimum count for this event.
- * Only called from XML parsers.
- * @param min the minimum count
- */
- public void setMinCount(int min) {
- minCount = min;
- }
+ /**
+ * Sets the minimum count for this event. Only called from XML parsers.
+ *
+ * @param min the minimum count
+ */
+ public void setMinCount(int min) {
+ minCount = min;
+ }
- /**
- * Returns the unit mask corresponding to this event.
- * @return the unit mask
- */
- public OpUnitMask getUnitMask() {
- return unitMask;
- }
+ /**
+ * Returns the unit mask corresponding to this event.
+ *
+ * @return the unit mask
+ */
+ public OpUnitMask getUnitMask() {
+ return unitMask;
+ }
- /**
- * Returns the name of this oprofile event.
- * @return the name
- */
- public String getText() {
- return name;
- }
+ /**
+ * Returns the name of this oprofile event.
+ *
+ * @return the name
+ */
+ public String getText() {
+ return name;
+ }
- /**
- * Returns the description of this oprofile event.
- * @return the description
- */
- public String getTextDescription() {
- return description;
- }
+ /**
+ * Returns the description of this oprofile event.
+ *
+ * @return the description
+ */
+ public String getTextDescription() {
+ return description;
+ }
- /**
- * Returns the minimum count allowed for this event.
- * @return the minimum count
- */
- public int getMinCount() {
- return minCount;
- }
+ /**
+ * Returns the minimum count allowed for this event.
+ *
+ * @return the minimum count
+ */
+ public int getMinCount() {
+ return minCount;
+ }
}
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/daemon/OpInfo.java b/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/daemon/OpInfo.java
index dd4adbf8fc..de1e7a86ad 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/daemon/OpInfo.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/daemon/OpInfo.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2004, 2016 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2004, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Keith Seitz <keiths@redhat.com> - initial API and implementation
@@ -102,12 +104,11 @@ public class OpInfo {
}
/**
- * Sets the number of counters allowed by Oprofile. This method is called
- * after this object is contstructed, while opxml is run (the first tag
- * output is num-counters). Only called from XML parsers.
+ * Sets the number of counters allowed by Oprofile. This method is called after
+ * this object is contstructed, while opxml is run (the first tag output is
+ * num-counters). Only called from XML parsers.
*
- * @param ctrs
- * the number of counters
+ * @param ctrs the number of counters
*/
public void setNrCounters(int ctrs) {
nrCounters = ctrs;
@@ -119,32 +120,28 @@ public class OpInfo {
/**
* Set the CPU frequency (in MHz). Only called from the XML parsers.
*
- * @param freq
- * the frequency
+ * @param freq the frequency
*/
public void setCPUSpeed(double freq) {
cpuSpeed = freq;
}
/**
- * Sets the defaults associated with this configuration of Oprofile. Only
- * called from XML parsers.
+ * Sets the defaults associated with this configuration of Oprofile. Only called
+ * from XML parsers.
*
- * @param map
- * the <code>HashMap</code> containing the defaults
+ * @param map the <code>HashMap</code> containing the defaults
*/
public void setDefaults(HashMap<String, String> map) {
defaults = map;
}
/**
- * Adds the events of the counter counterNum into the list of all events.
- * Note they are sorted here. Only called from XML parsers.
+ * Adds the events of the counter counterNum into the list of all events. Note
+ * they are sorted here. Only called from XML parsers.
*
- * @param counterNum
- * the counter with the events
- * @param events
- * an array of OpEvent events belonging to this counter
+ * @param counterNum the counter with the events
+ * @param events an array of OpEvent events belonging to this counter
*/
public void setEvents(int counterNum, OpEvent[] events) {
if (counterNum < eventList.length) {
@@ -154,11 +151,10 @@ public class OpInfo {
}
/**
- * Sets whether or not oprofile is operating in timer mode. Only called from
- * XML parsers.
+ * Sets whether or not oprofile is operating in timer mode. Only called from XML
+ * parsers.
*
- * @param timerMode
- * true if oprofile is in timer mode, false if not
+ * @param timerMode true if oprofile is in timer mode, false if not
*/
public void setTimerMode(boolean timerMode) {
this.timerMode = timerMode;
@@ -187,8 +183,7 @@ public class OpInfo {
* <code>DEFAULT_DUMP_STATUS</code>, <code>DEFAULT_LOCK_FILE</code>,
* <code>DEFAULT_LOG_FILE</code>, and <code>DEFAULT_SAMPLE_DIR</code>.
*
- * @param what
- * which default to return
+ * @param what which default to return
* @return the requested default or <code>null</code> if not known
*/
public String getDefault(String what) {
@@ -198,8 +193,7 @@ public class OpInfo {
/**
* Returns an array of events valid for the given counter number.
*
- * @param num
- * the counter number
+ * @param num the counter number
* @return an array of valid events
*/
public OpEvent[] getEvents(int num) {
@@ -222,8 +216,7 @@ public class OpInfo {
/**
* Searches the for the event with the given name
*
- * @param name
- * the name of the event (e.g., CPU_CLK_UNHALTED)
+ * @param name the name of the event (e.g., CPU_CLK_UNHALTED)
* @return the event or <code>null</code> if not found
*/
public OpEvent findEvent(String name) {
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/daemon/OpUnitMask.java b/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/daemon/OpUnitMask.java
index 65de6e58be..e205137e61 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/daemon/OpUnitMask.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/daemon/OpUnitMask.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2004,2008 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2004, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Keith Seitz <keiths@redhat.com> - initial API and implementation
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/daemon/OprofileDaemonEvent.java b/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/daemon/OprofileDaemonEvent.java
index bf06fbe512..316ad0646b 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/daemon/OprofileDaemonEvent.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/daemon/OprofileDaemonEvent.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2004,2008 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2004, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Keith Seitz <keiths@redhat.com> - initial API and implementation
@@ -15,112 +17,119 @@ package org.eclipse.linuxtools.internal.oprofile.core.daemon;
import org.eclipse.linuxtools.internal.oprofile.core.Oprofile;
/**
- * This class represents an event used to configure the OProfile
- * daemon.
+ * This class represents an event used to configure the OProfile daemon.
*/
public class OprofileDaemonEvent {
- public static final int COUNT_UNINITIALIZED = 0;
- public static final int COUNT_INVALID = -1;
-
- /**
- * The event to collect on this counter
- */
- private OpEvent event;
-
- /**
- * Boolean variable to enable/disable Profile kernel
- */
- private boolean profileKernel;
-
- /**
- * Boolean variable to enable/disable Profile userspace
- */
- private boolean profileUser;
-
- /**
- * Reset counter value
- */
- private int count;
-
- public OprofileDaemonEvent() {
- profileKernel = true;
- profileUser = true;
- count = COUNT_UNINITIALIZED;
- event = null;
- }
-
- /**
- * Set the event to collect
- * @param event the OProfile event
- */
- public void setEvent(OpEvent event) {
- this.event = event;
- }
-
- /**
- * Get the event to collect
- * @returns the OProfile event
- */
- public OpEvent getEvent() {
- return event;
- }
-
- /**
- * Set whether to profile the kernel
- * @param profileKernel whether to enable kernel profiling
- */
- public void setProfileKernel(boolean profileKernel) {
- this.profileKernel = profileKernel;
- }
-
- /**
- * Get whether to profile the kernel
- * @return whether to profile the kernel
- */
- public boolean getProfileKernel() {
- return profileKernel;
- }
-
- /**
- * Set whether to profile userspace
- * @param profileUser whether to profile userspace
- */
- public void setProfileUser(boolean profileUser) {
- this.profileUser = profileUser;
- }
-
- /**
- * Get whether to profile userspace
- * @return whether to profile userspace
- */
- public boolean getProfileUser() {
- return profileUser;
- }
-
- /**
- * Set the reset count
- * @param count the new count
- */
- public void setResetCount(int count) {
- this.count = count;
- }
-
- /**
- * Get the reset count
- * @return the reset count
- */
- public int getResetCount() {
- // FIXME: This isn't quite in the right place...
- if (count == COUNT_UNINITIALIZED) {
- // This is what Oprofile does in oprof_start.cpp:
- double speed = Oprofile.getCpuFrequency();
- if (speed == 0.0) {
- count = event.getMinCount() * 30;
- } else {
- count = (int) speed * 20;
- }
- }
-
- return count;
- }
+ public static final int COUNT_UNINITIALIZED = 0;
+ public static final int COUNT_INVALID = -1;
+
+ /**
+ * The event to collect on this counter
+ */
+ private OpEvent event;
+
+ /**
+ * Boolean variable to enable/disable Profile kernel
+ */
+ private boolean profileKernel;
+
+ /**
+ * Boolean variable to enable/disable Profile userspace
+ */
+ private boolean profileUser;
+
+ /**
+ * Reset counter value
+ */
+ private int count;
+
+ public OprofileDaemonEvent() {
+ profileKernel = true;
+ profileUser = true;
+ count = COUNT_UNINITIALIZED;
+ event = null;
+ }
+
+ /**
+ * Set the event to collect
+ *
+ * @param event the OProfile event
+ */
+ public void setEvent(OpEvent event) {
+ this.event = event;
+ }
+
+ /**
+ * Get the event to collect
+ *
+ * @returns the OProfile event
+ */
+ public OpEvent getEvent() {
+ return event;
+ }
+
+ /**
+ * Set whether to profile the kernel
+ *
+ * @param profileKernel whether to enable kernel profiling
+ */
+ public void setProfileKernel(boolean profileKernel) {
+ this.profileKernel = profileKernel;
+ }
+
+ /**
+ * Get whether to profile the kernel
+ *
+ * @return whether to profile the kernel
+ */
+ public boolean getProfileKernel() {
+ return profileKernel;
+ }
+
+ /**
+ * Set whether to profile userspace
+ *
+ * @param profileUser whether to profile userspace
+ */
+ public void setProfileUser(boolean profileUser) {
+ this.profileUser = profileUser;
+ }
+
+ /**
+ * Get whether to profile userspace
+ *
+ * @return whether to profile userspace
+ */
+ public boolean getProfileUser() {
+ return profileUser;
+ }
+
+ /**
+ * Set the reset count
+ *
+ * @param count the new count
+ */
+ public void setResetCount(int count) {
+ this.count = count;
+ }
+
+ /**
+ * Get the reset count
+ *
+ * @return the reset count
+ */
+ public int getResetCount() {
+ // FIXME: This isn't quite in the right place...
+ if (count == COUNT_UNINITIALIZED) {
+ // This is what Oprofile does in oprof_start.cpp:
+ double speed = Oprofile.getCpuFrequency();
+ if (speed == 0.0) {
+ count = event.getMinCount() * 30;
+ } else {
+ count = (int) speed * 20;
+ }
+ }
+
+ return count;
+ }
}
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/daemon/OprofileDaemonOptions.java b/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/daemon/OprofileDaemonOptions.java
index d94849fe1e..ca624e41b9 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/daemon/OprofileDaemonOptions.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/daemon/OprofileDaemonOptions.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2004, 2008, 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2004, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Keith Seitz <keiths@redhat.com> - initial API and implementation
@@ -11,113 +13,117 @@
*******************************************************************************/
package org.eclipse.linuxtools.internal.oprofile.core.daemon;
-
/**
- * This class represents the global launch options for the
- * OProfile daemon.
+ * This class represents the global launch options for the OProfile daemon.
*/
public class OprofileDaemonOptions {
- /**
- * Kernel image file
- */
- private String kernelImageFile;
+ /**
+ * Kernel image file
+ */
+ private String kernelImageFile;
- /**
- * How to separate profiles (mask)
- */
- private int separateProfiles;
+ /**
+ * How to separate profiles (mask)
+ */
+ private int separateProfiles;
- /**
- * The image to profile
- */
- private String binaryImage;
+ /**
+ * The image to profile
+ */
+ private String binaryImage;
- /**
- * How many calls down to profile
- */
- private int callgraphDepth;
+ /**
+ * How many calls down to profile
+ */
+ private int callgraphDepth;
- /**
- * Sample separation options. Determines how oprofiled will group
- * samples for binaries which isn't the main binary being profiled.
- *
- * Currently only properly support:
- * -none: ignore all other binaries
- * -library: include shared library samples
- * -kernel: include kernel module samples (which implicitly includes library)
- *
- * the others probably wouldn't show nicely in the view
- */
- public static final int SEPARATE_NONE = 0;
- public static final int SEPARATE_LIBRARY = 1;
- public static final int SEPARATE_KERNEL = 2;
- public static final int SEPARATE_THREAD = 4;
- public static final int SEPARATE_CPU = 8;
+ /**
+ * Sample separation options. Determines how oprofiled will group samples for
+ * binaries which isn't the main binary being profiled.
+ *
+ * Currently only properly support: -none: ignore all other binaries -library:
+ * include shared library samples -kernel: include kernel module samples (which
+ * implicitly includes library)
+ *
+ * the others probably wouldn't show nicely in the view
+ */
+ public static final int SEPARATE_NONE = 0;
+ public static final int SEPARATE_LIBRARY = 1;
+ public static final int SEPARATE_KERNEL = 2;
+ public static final int SEPARATE_THREAD = 4;
+ public static final int SEPARATE_CPU = 8;
- /**
- * Constructor
- */
- public OprofileDaemonOptions() {
- //defaults
- kernelImageFile = ""; //$NON-NLS-1$
- separateProfiles = SEPARATE_NONE;
- binaryImage = ""; //$NON-NLS-1$
- callgraphDepth = 0;
- }
+ /**
+ * Constructor
+ */
+ public OprofileDaemonOptions() {
+ // defaults
+ kernelImageFile = ""; //$NON-NLS-1$
+ separateProfiles = SEPARATE_NONE;
+ binaryImage = ""; //$NON-NLS-1$
+ callgraphDepth = 0;
+ }
- /**
- * Get the kernel image file
- * @return the kernel image file
- */
- public String getKernelImageFile() {
- return kernelImageFile;
- }
+ /**
+ * Get the kernel image file
+ *
+ * @return the kernel image file
+ */
+ public String getKernelImageFile() {
+ return kernelImageFile;
+ }
- /**
- * Set the kernel image file
- * @param image the kernel image
- */
- public void setKernelImageFile(String image) {
- kernelImageFile = image;
- }
+ /**
+ * Set the kernel image file
+ *
+ * @param image the kernel image
+ */
+ public void setKernelImageFile(String image) {
+ kernelImageFile = image;
+ }
- /**
- * Get daemon profile separation mask
- * @return mask of options
- */
- public int getSeparateProfilesMask() {
- return separateProfiles;
- }
+ /**
+ * Get daemon profile separation mask
+ *
+ * @return mask of options
+ */
+ public int getSeparateProfilesMask() {
+ return separateProfiles;
+ }
- /**
- * Set daemon profile separation mask
- * @param mask the new separation mask
- */
- public void setSeparateProfilesMask(int mask) {
- separateProfiles = mask;
- }
+ /**
+ * Set daemon profile separation mask
+ *
+ * @param mask the new separation mask
+ */
+ public void setSeparateProfilesMask(int mask) {
+ separateProfiles = mask;
+ }
- /**
- * Get the path to the binary image being profiled.
- * @return full path to the binary
- */
- public String getBinaryImage() {
- return binaryImage;
- }
+ /**
+ * Get the path to the binary image being profiled.
+ *
+ * @return full path to the binary
+ */
+ public String getBinaryImage() {
+ return binaryImage;
+ }
- /**
- * Sets the path of the binary image to profile.
- * @param image full path to the binary
- */
- public void setBinaryImage(String image) {
- this.binaryImage = image;
- }
+ /**
+ * Sets the path of the binary image to profile.
+ *
+ * @param image full path to the binary
+ */
+ public void setBinaryImage(String image) {
+ this.binaryImage = image;
+ }
- /**
- * Get the call depth value.
- * @return integer amount of calls down to profile
- */
- public int getCallgraphDepth() {
- return callgraphDepth;
- }
+ /**
+ * Get the call depth value.
+ *
+ * @return integer amount of calls down to profile
+ */
+ public int getCallgraphDepth() {
+ return callgraphDepth;
+ }
}
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/linux/LinuxOpxmlProvider.java b/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/linux/LinuxOpxmlProvider.java
index c242019d5d..ca0daa3f63 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/linux/LinuxOpxmlProvider.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/linux/LinuxOpxmlProvider.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2004, 2016 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2004, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Keith Seitz <keiths@redhat.com> - initial API and implementation
@@ -79,8 +81,8 @@ public class LinuxOpxmlProvider implements IOpxmlProvider {
}
/**
- * return list of session collected on this system as well as events under
- * each of them.
+ * return list of session collected on this system as well as events under each
+ * of them.
*
* @since 3.0
*/
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/linux/OpxmlRunner.java b/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/linux/OpxmlRunner.java
index c98c1b6a09..c6ee112333 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/linux/OpxmlRunner.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/linux/OpxmlRunner.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2004, 2016 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2004, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Keith Seitz <keiths@redhat.com> - initial API and implementation
@@ -64,10 +66,8 @@ public class OpxmlRunner {
/**
* Runs opxml with the given arguments.
*
- * @param args
- * the arguments to pass to opxml
- * @param callData
- * any callData to pass to the processor
+ * @param args the arguments to pass to opxml
+ * @param callData any callData to pass to the processor
* @return boolean indicating the success/failure of opxml
*/
public boolean run(String[] args, Object callData) {
@@ -204,8 +204,7 @@ public class OpxmlRunner {
* Add the current session to the session manager for each event that it was
* profiled under.
*
- * @param session
- * the session manager to populate
+ * @param session the session manager to populate
*/
private void populateWithCurrentSession(SessionManager session) {
session.removeAllCurrentSessions();
@@ -268,8 +267,7 @@ public class OpxmlRunner {
* Run opreport with specified arguments <code>args</code> and return
* InputStream to output of report for parsing.
*
- * @param args
- * arguments to run with opreport
+ * @param args arguments to run with opreport
* @return InputStream to output of report
*/
private InputStream runOpReport(String[] args) {
@@ -278,9 +276,9 @@ public class OpxmlRunner {
cmd.add("opreport"); //$NON-NLS-1$
if (OprofileProject.getProfilingBinary().equals(OprofileProject.OPERF_BINARY)) {
/*
- * The session-dir parameter is relative to project's working dir,
- * which might be local or remote. So it should use the proxy
- * manager to determine working dir.
+ * The session-dir parameter is relative to project's working dir, which might
+ * be local or remote. So it should use the proxy manager to determine working
+ * dir.
*/
String workingDir = ""; //$NON-NLS-1$
RemoteProxyManager proxy = RemoteProxyManager.getInstance();
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/model/OpModelEvent.java b/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/model/OpModelEvent.java
index 3b64473b81..cf5bb275b9 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/model/OpModelEvent.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/model/OpModelEvent.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2004, 2008, 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2004, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Keith Seitz <keiths@redhat.com> - initial API and implementation
@@ -18,60 +20,59 @@ import org.eclipse.linuxtools.internal.oprofile.core.Oprofile;
* A class which represents the event collected in a given session.
*/
public class OpModelEvent {
- private String eventName;
- private String printTabs = ""; //for nice output //$NON-NLS-1$
- private OpModelImage image;
- private OpModelSession parentSession;
-
+ private String eventName;
+ private String printTabs = ""; // for nice output //$NON-NLS-1$
+ private OpModelImage image;
+ private OpModelSession parentSession;
- public OpModelEvent(OpModelSession parentSession ,String name) {
- this.parentSession = parentSession;
- this.eventName = name;
- }
+ public OpModelEvent(OpModelSession parentSession, String name) {
+ this.parentSession = parentSession;
+ this.eventName = name;
+ }
- public String getName() {
- return eventName;
- }
+ public String getName() {
+ return eventName;
+ }
- public OpModelSession getSession() {
- return parentSession;
- }
+ public OpModelSession getSession() {
+ return parentSession;
+ }
- //populate all images & dependent images
- public void refreshModel() {
- image = getNewImage();
- }
+ // populate all images & dependent images
+ public void refreshModel() {
+ image = getNewImage();
+ }
- public OpModelImage getImage() {
- return image;
- }
+ public OpModelImage getImage() {
+ return image;
+ }
- protected OpModelImage getNewImage() {
- return Oprofile.getModelData(this.eventName, parentSession.getName());
- }
+ protected OpModelImage getNewImage() {
+ return Oprofile.getModelData(this.eventName, parentSession.getName());
+ }
- public int getCount() {
- if (image == null) {
- return 0;
- } else {
- return image.getCount();
- }
- }
+ public int getCount() {
+ if (image == null) {
+ return 0;
+ } else {
+ return image.getCount();
+ }
+ }
- public String toString(String tabs) {
- printTabs = tabs;
- String s = toString();
- printTabs = ""; //$NON-NLS-1$
- return s;
- }
+ public String toString(String tabs) {
+ printTabs = tabs;
+ String s = toString();
+ printTabs = ""; //$NON-NLS-1$
+ return s;
+ }
- @Override
- public String toString() {
- String s = eventName + "\n"; //$NON-NLS-1$
- if (image != null) {
- s += printTabs + "Image: "; //$NON-NLS-1$
- s += image.toString(printTabs + "\t"); //$NON-NLS-1$
- }
- return s;
- }
+ @Override
+ public String toString() {
+ String s = eventName + "\n"; //$NON-NLS-1$
+ if (image != null) {
+ s += printTabs + "Image: "; //$NON-NLS-1$
+ s += image.toString(printTabs + "\t"); //$NON-NLS-1$
+ }
+ return s;
+ }
}
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/model/OpModelImage.java b/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/model/OpModelImage.java
index 893b3c52aa..8dc53a8071 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/model/OpModelImage.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/model/OpModelImage.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2004, 2008, 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2004, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Keith Seitz <keiths@redhat.com> - initial API and implementation
@@ -11,130 +13,134 @@
*******************************************************************************/
package org.eclipse.linuxtools.internal.oprofile.core.model;
-
/**
- * A class which represents an image (executables,
- * libraries, modules) profile by OProfile.
+ * A class which represents an image (executables, libraries, modules) profile
+ * by OProfile.
*/
public class OpModelImage {
- public static final int IMAGE_PARSE_ERROR = -1;
-
- //The count of all samples from this image
- private int count;
-
- //the count for all dependent images -- needed?
- private int depcount;
-
- //The name of this image (the full path, where applicable)
- private String name;
-
- //The symbols profiled in this image
- private OpModelSymbol[] symbols;
-
- //Any dependent images on this image (usually shared libs, kernel modules)
- private OpModelImage[] dependents;
-
- private String printTabs = ""; //for nice output //$NON-NLS-1$
-
- public OpModelImage() {
- name = ""; //$NON-NLS-1$
- count = 0;
- depcount = 0;
- symbols = null;
- dependents = null;
- }
-
- public int getCount() {
- return count;
- }
-
- public int getDepCount() {
- return depcount;
- }
-
- public String getName() {
- return name;
- }
-
- public OpModelSymbol[] getSymbols() {
- return symbols;
- }
-
- public OpModelImage[] getDependents() {
- return dependents;
- }
-
- public boolean hasDependents() {
- return (dependents == null || dependents.length == 0 ? false : true);
- }
-
- /**
- * This method is not meant to be called publicly, used only
- * from the XML processors
- * @param count
- */
- public void setCount(int count) {
- this.count = count;
- }
-
- /**
- * This method is not meant to be called publicly, used only
- * from the XML processors
- * @param depcount
- */
- public void setDepCount(int depcount) {
- this.depcount = depcount;
- }
-
- /**
- * This method is not meant to be called publicly, used only
- * from the XML processors
- * @param name
- */
- public void setName(String name) {
- this.name = name;
- }
-
- /**
- * This method is not meant to be called publicly, used only
- * from the XML processors
- * @param symbols
- */
- public void setSymbols(OpModelSymbol[] symbols) {
- this.symbols = symbols;
- }
-
- /**
- * This method is not meant to be called publicly, used only
- * from the XML processors
- * @param dependents
- */
- public void setDependents(OpModelImage[] dependents) {
- this.dependents = dependents;
- }
-
- public String toString(String tabs) {
- printTabs = tabs;
- String s = toString();
- printTabs = ""; //$NON-NLS-1$
- return s;
- }
-
- @Override
- public String toString() {
- String s = name + ", Count: " + count + (depcount !=0 ? ", Dependent Count: " + depcount + "\n" : "\n"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- if (symbols != null) {
- for (int i = 0; i < symbols.length; i++) {
- s += printTabs + "Symbols: "; //$NON-NLS-1$
- s += symbols[i].toString(printTabs + "\t"); //$NON-NLS-1$
- }
- }
- if (dependents != null) {
- for (int i = 0; i < dependents.length; i++) {
- s += printTabs + "Dependent Image: "; //$NON-NLS-1$
- s += dependents[i].toString(printTabs + "\t"); //$NON-NLS-1$
- }
- }
- return s;
- }
+ public static final int IMAGE_PARSE_ERROR = -1;
+
+ // The count of all samples from this image
+ private int count;
+
+ // the count for all dependent images -- needed?
+ private int depcount;
+
+ // The name of this image (the full path, where applicable)
+ private String name;
+
+ // The symbols profiled in this image
+ private OpModelSymbol[] symbols;
+
+ // Any dependent images on this image (usually shared libs, kernel modules)
+ private OpModelImage[] dependents;
+
+ private String printTabs = ""; // for nice output //$NON-NLS-1$
+
+ public OpModelImage() {
+ name = ""; //$NON-NLS-1$
+ count = 0;
+ depcount = 0;
+ symbols = null;
+ dependents = null;
+ }
+
+ public int getCount() {
+ return count;
+ }
+
+ public int getDepCount() {
+ return depcount;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public OpModelSymbol[] getSymbols() {
+ return symbols;
+ }
+
+ public OpModelImage[] getDependents() {
+ return dependents;
+ }
+
+ public boolean hasDependents() {
+ return (dependents == null || dependents.length == 0 ? false : true);
+ }
+
+ /**
+ * This method is not meant to be called publicly, used only from the XML
+ * processors
+ *
+ * @param count
+ */
+ public void setCount(int count) {
+ this.count = count;
+ }
+
+ /**
+ * This method is not meant to be called publicly, used only from the XML
+ * processors
+ *
+ * @param depcount
+ */
+ public void setDepCount(int depcount) {
+ this.depcount = depcount;
+ }
+
+ /**
+ * This method is not meant to be called publicly, used only from the XML
+ * processors
+ *
+ * @param name
+ */
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ /**
+ * This method is not meant to be called publicly, used only from the XML
+ * processors
+ *
+ * @param symbols
+ */
+ public void setSymbols(OpModelSymbol[] symbols) {
+ this.symbols = symbols;
+ }
+
+ /**
+ * This method is not meant to be called publicly, used only from the XML
+ * processors
+ *
+ * @param dependents
+ */
+ public void setDependents(OpModelImage[] dependents) {
+ this.dependents = dependents;
+ }
+
+ public String toString(String tabs) {
+ printTabs = tabs;
+ String s = toString();
+ printTabs = ""; //$NON-NLS-1$
+ return s;
+ }
+
+ @Override
+ public String toString() {
+ String s = name + ", Count: " + count + (depcount != 0 ? ", Dependent Count: " + depcount + "\n" : "\n"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ if (symbols != null) {
+ for (int i = 0; i < symbols.length; i++) {
+ s += printTabs + "Symbols: "; //$NON-NLS-1$
+ s += symbols[i].toString(printTabs + "\t"); //$NON-NLS-1$
+ }
+ }
+ if (dependents != null) {
+ for (int i = 0; i < dependents.length; i++) {
+ s += printTabs + "Dependent Image: "; //$NON-NLS-1$
+ s += dependents[i].toString(printTabs + "\t"); //$NON-NLS-1$
+ }
+ }
+ return s;
+ }
}
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/model/OpModelRoot.java b/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/model/OpModelRoot.java
index 5a919b1eb3..9332112ce3 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/model/OpModelRoot.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/model/OpModelRoot.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2008, 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2008, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Kent Sebastian <ksebasti@redhat.com> - initial API and implementation
@@ -15,67 +17,68 @@ import org.eclipse.linuxtools.internal.oprofile.core.Oprofile;
/**
* A root node for the data model. Only one instance exists at any time,
- * although the contents will change. On instantiation the events and
- * sessions are gathered.
+ * although the contents will change. On instantiation the events and sessions
+ * are gathered.
*
- * Note that this data model does not map 1:1 to the oprofile data model.
- * This model is for use in profiling one application compiled with debug
- * info, from within eclipse.
+ * Note that this data model does not map 1:1 to the oprofile data model. This
+ * model is for use in profiling one application compiled with debug info, from
+ * within eclipse.
*/
public class OpModelRoot {
- //single instance
- private static OpModelRoot modelRoot = new OpModelRoot();
-
- private OpModelSession[] session;
+ // single instance
+ private static OpModelRoot modelRoot = new OpModelRoot();
- protected OpModelRoot() {
- session = null;
- }
+ private OpModelSession[] session;
- public static OpModelRoot getDefault() {
- return modelRoot;
- }
+ protected OpModelRoot() {
+ session = null;
+ }
- public void refreshModel() {
- //TODO-performance/interactivity: some persistence for events/sessions
- // that dont change from run to run (non default sessions)
+ public static OpModelRoot getDefault() {
+ return modelRoot;
+ }
- session = getNewSessions();
- if (session != null) {
- for (int i = 0; i < session.length; i++) {
- if (session[i] != null)
- session[i].refreshModel();
- }
- }
- }
+ public void refreshModel() {
+ // TODO-performance/interactivity: some persistence for events/sessions
+ // that dont change from run to run (non default sessions)
- /**
- * return list of session collected on this system as well as events under each of them.
- * @return collected sessions list
- * @since 3.0
- */
- protected OpModelSession[] getNewSessions() {
- //launch `opxml sessions`, gather up events & the sessions under them
- return Oprofile.getSessions();
- }
+ session = getNewSessions();
+ if (session != null) {
+ for (int i = 0; i < session.length; i++) {
+ if (session[i] != null)
+ session[i].refreshModel();
+ }
+ }
+ }
+ /**
+ * return list of session collected on this system as well as events under each
+ * of them.
+ *
+ * @return collected sessions list
+ * @since 3.0
+ */
+ protected OpModelSession[] getNewSessions() {
+ // launch `opxml sessions`, gather up events & the sessions under them
+ return Oprofile.getSessions();
+ }
- public OpModelSession[] getSessions() {
- return session;
- }
+ public OpModelSession[] getSessions() {
+ return session;
+ }
- @Override
- public String toString() {
- String s = ""; //$NON-NLS-1$
- if (session != null) {
- for (int i = 0; i < session.length; i++) {
- if (session[i] != null) {
- s += "Session: "; //$NON-NLS-1$
- s += session[i].toString("\t"); //$NON-NLS-1$
- }
- }
- }
- return s;
- }
+ @Override
+ public String toString() {
+ String s = ""; //$NON-NLS-1$
+ if (session != null) {
+ for (int i = 0; i < session.length; i++) {
+ if (session[i] != null) {
+ s += "Session: "; //$NON-NLS-1$
+ s += session[i].toString("\t"); //$NON-NLS-1$
+ }
+ }
+ }
+ return s;
+ }
}
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/model/OpModelSample.java b/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/model/OpModelSample.java
index dbf1b12e00..993672bdd6 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/model/OpModelSample.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/model/OpModelSample.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2004,2008 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2004, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Keith Seitz <keiths@redhat.com> - initial API and implementation
@@ -16,40 +18,41 @@ package org.eclipse.linuxtools.internal.oprofile.core.model;
* Represents an OProfile sample.
*/
public class OpModelSample {
- private int count;
- private int line;
- private String file;
-
- public OpModelSample() {
- count = 0;
- line = 0;
- }
-
- public void setCount(int count) {
- this.count = count;
- }
-
- public void setLine(int line) {
- this.line = line;
- }
-
- public void setFilePath(String file) {
- this.file = file;
- }
-
- public int getCount() {
- return count;
- }
-
- public int getLine() {
- return line;
- }
- public String getFilePath() {
- return file;
- }
-
- @Override
- public String toString() {
- return "Line #: " + line + ", Count: " + count + "\n"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
+ private int count;
+ private int line;
+ private String file;
+
+ public OpModelSample() {
+ count = 0;
+ line = 0;
+ }
+
+ public void setCount(int count) {
+ this.count = count;
+ }
+
+ public void setLine(int line) {
+ this.line = line;
+ }
+
+ public void setFilePath(String file) {
+ this.file = file;
+ }
+
+ public int getCount() {
+ return count;
+ }
+
+ public int getLine() {
+ return line;
+ }
+
+ public String getFilePath() {
+ return file;
+ }
+
+ @Override
+ public String toString() {
+ return "Line #: " + line + ", Count: " + count + "\n"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ }
}
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/model/OpModelSession.java b/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/model/OpModelSession.java
index cc37d08839..f968db1996 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/model/OpModelSession.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/model/OpModelSession.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2008, 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2008, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Kent Sebastian <ksebasti@redhat.com> - initial API and implementation
@@ -11,66 +13,62 @@
package org.eclipse.linuxtools.internal.oprofile.core.model;
-
-
/**
- * This class represents oprofile sessions. Sessions contain an image
- * of the profiled binary.
+ * This class represents oprofile sessions. Sessions contain an image of the
+ * profiled binary.
*/
public class OpModelSession {
- private static final String DEFAULT_SESSION_STRING = "current"; //$NON-NLS-1$
-
- private String name;
- private String printTabs = ""; //for nice output //$NON-NLS-1$
- private OpModelEvent[] events;
-
- public OpModelSession(String name) {
- this.name = name;
- }
-
-
- public String getName() {
- return name;
- }
-
- public OpModelEvent[] getEvents() {
- return events;
- }
-
-
- public void setEvents(OpModelEvent[] events) {
- this.events = events;
- }
-
- public boolean isDefaultSession() {
- return name.equals(DEFAULT_SESSION_STRING);
- }
-
- public void refreshModel() {
- if (events != null) {
- for (int i = 0; i < events.length; i++) {
- events[i].refreshModel();
- }
- }
- }
-
- public String toString(String tabs) {
- printTabs = tabs;
- String s = toString();
- printTabs = ""; //$NON-NLS-1$
- return s;
- }
-
- @Override
- public String toString() {
- String s = name + "\n"; //$NON-NLS-1$
- if (events != null) {
- for (int i = 0; i < events.length; i++) {
- s += printTabs + "Event: "; //$NON-NLS-1$
- s += events[i].toString(printTabs + "\t"); //$NON-NLS-1$
- }
- }
- return s;
-
- }
+ private static final String DEFAULT_SESSION_STRING = "current"; //$NON-NLS-1$
+
+ private String name;
+ private String printTabs = ""; // for nice output //$NON-NLS-1$
+ private OpModelEvent[] events;
+
+ public OpModelSession(String name) {
+ this.name = name;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public OpModelEvent[] getEvents() {
+ return events;
+ }
+
+ public void setEvents(OpModelEvent[] events) {
+ this.events = events;
+ }
+
+ public boolean isDefaultSession() {
+ return name.equals(DEFAULT_SESSION_STRING);
+ }
+
+ public void refreshModel() {
+ if (events != null) {
+ for (int i = 0; i < events.length; i++) {
+ events[i].refreshModel();
+ }
+ }
+ }
+
+ public String toString(String tabs) {
+ printTabs = tabs;
+ String s = toString();
+ printTabs = ""; //$NON-NLS-1$
+ return s;
+ }
+
+ @Override
+ public String toString() {
+ String s = name + "\n"; //$NON-NLS-1$
+ if (events != null) {
+ for (int i = 0; i < events.length; i++) {
+ s += printTabs + "Event: "; //$NON-NLS-1$
+ s += events[i].toString(printTabs + "\t"); //$NON-NLS-1$
+ }
+ }
+ return s;
+
+ }
}
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/model/OpModelSymbol.java b/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/model/OpModelSymbol.java
index 91d2ea97dc..b7b35c2fd8 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/model/OpModelSymbol.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/model/OpModelSymbol.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2008, 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2008, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Kent Sebastian <ksebasti@redhat.com> - initial API and implementation
@@ -12,82 +14,81 @@
package org.eclipse.linuxtools.internal.oprofile.core.model;
/**
- * This class represents a debugging symbol, the symbol output
- * from opxml. If a symbol exists, it must have samples (which are
- * OpModelSamples), although those samples may or may not have
- * complete debug info.
+ * This class represents a debugging symbol, the symbol output from opxml. If a
+ * symbol exists, it must have samples (which are OpModelSamples), although
+ * those samples may or may not have complete debug info.
*/
public class OpModelSymbol {
- private String name;
- private String file;
- private int line;
- private int count;
- private OpModelSample[] samples;
- private String printTabs = ""; //for nice output //$NON-NLS-1$
+ private String name;
+ private String file;
+ private int line;
+ private int count;
+ private OpModelSample[] samples;
+ private String printTabs = ""; // for nice output //$NON-NLS-1$
- public OpModelSymbol() {
- name = ""; //$NON-NLS-1$
- file = ""; //$NON-NLS-1$
- count = 0;
- samples = null;
- }
+ public OpModelSymbol() {
+ name = ""; //$NON-NLS-1$
+ file = ""; //$NON-NLS-1$
+ count = 0;
+ samples = null;
+ }
- public void setName(String name) {
- this.name = name;
- }
+ public void setName(String name) {
+ this.name = name;
+ }
- public void setFilePath(String file) {
- this.file = file;
- }
+ public void setFilePath(String file) {
+ this.file = file;
+ }
- public void setLine(int line){
- this.line = line;
- }
+ public void setLine(int line) {
+ this.line = line;
+ }
- public void setCount(int count) {
- this.count = count;
- }
+ public void setCount(int count) {
+ this.count = count;
+ }
- public void setSamples(OpModelSample[] samples) {
- this.samples = samples;
- }
+ public void setSamples(OpModelSample[] samples) {
+ this.samples = samples;
+ }
- public String getName() {
- return name;
- }
+ public String getName() {
+ return name;
+ }
- public String getFilePath() {
- return file;
- }
+ public String getFilePath() {
+ return file;
+ }
- public int getLine(){
- return line;
- }
+ public int getLine() {
+ return line;
+ }
- public int getCount() {
- return count;
- }
+ public int getCount() {
+ return count;
+ }
- public OpModelSample[] getSamples() {
- return samples;
- }
+ public OpModelSample[] getSamples() {
+ return samples;
+ }
- public String toString(String tabs) {
- printTabs = tabs;
- String s = toString();
- printTabs = ""; //$NON-NLS-1$
- return s;
- }
+ public String toString(String tabs) {
+ printTabs = tabs;
+ String s = toString();
+ printTabs = ""; //$NON-NLS-1$
+ return s;
+ }
- @Override
- public String toString() {
- String s = name + ", File: " + file + ", Count: " + count + "\n"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- if (samples != null) {
- for (int i = 0; i < samples.length; i++) {
- s += printTabs + "Sample: "; //$NON-NLS-1$
- s += samples[i].toString();
- }
- }
- return s;
- }
+ @Override
+ public String toString() {
+ String s = name + ", File: " + file + ", Count: " + count + "\n"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ if (samples != null) {
+ for (int i = 0; i < samples.length; i++) {
+ s += printTabs + "Sample: "; //$NON-NLS-1$
+ s += samples[i].toString();
+ }
+ }
+ return s;
+ }
}
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/oprofile.properties b/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/oprofile.properties
index 0281880ae8..e389e223ae 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/oprofile.properties
+++ b/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/oprofile.properties
@@ -1,9 +1,11 @@
######################################################################
-# Copyright (c) 2004, 2017 Red Hat, Inc.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
+# Copyright (c) 2004, 2018 Red Hat, Inc.
+#
+# This program and the accompanying materials are made
+# available under the terms of the Eclipse Public License 2.0
+# which is available at https://www.eclipse.org/legal/epl-2.0/
+#
+# SPDX-License-Identifier: EPL-2.0
#
# Contributors:
# Keith Seitz <keiths@redhat.com> - Initial implementation
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/opxml/AbstractDataAdapter.java b/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/opxml/AbstractDataAdapter.java
index e77171fe0e..e7c4d3be0d 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/opxml/AbstractDataAdapter.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/opxml/AbstractDataAdapter.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2010 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2010, 2018 Red Hat, Inc. and others.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Red Hat - initial API and implementation
@@ -27,55 +29,55 @@ import org.w3c.dom.Document;
public abstract class AbstractDataAdapter {
- /**
- * @return a Document representing the newly created XML data.
- */
- public abstract Document getDocument ();
+ /**
+ * @return a Document representing the newly created XML data.
+ */
+ public abstract Document getDocument();
- /**
- * parse the XML data modifying it as necessary to produce the necessary
- * XML output.
- */
- public abstract void process ();
+ /**
+ * parse the XML data modifying it as necessary to produce the necessary XML
+ * output.
+ */
+ public abstract void process();
- /**
- * @return an InputStream to the newly created XML data.
- */
- public InputStream getInputStream() {
- InputStream inp = null;
- Source source = new DOMSource(getDocument());
- StringWriter stw = new StringWriter();
- Result result = new StreamResult(stw);
- TransformerFactory factory = TransformerFactory.newInstance();
- Transformer xformer;
- try {
- xformer = factory.newTransformer();
- xformer.setOutputProperty("indent", "yes"); //$NON-NLS-1$ //$NON-NLS-2$
- xformer.transform(source, result);
- inp = new ByteArrayInputStream(stw.toString().getBytes(StandardCharsets.UTF_8));
- } catch (TransformerException e) {
- e.printStackTrace();
- }
- return inp;
- }
+ /**
+ * @return an InputStream to the newly created XML data.
+ */
+ public InputStream getInputStream() {
+ InputStream inp = null;
+ Source source = new DOMSource(getDocument());
+ StringWriter stw = new StringWriter();
+ Result result = new StreamResult(stw);
+ TransformerFactory factory = TransformerFactory.newInstance();
+ Transformer xformer;
+ try {
+ xformer = factory.newTransformer();
+ xformer.setOutputProperty("indent", "yes"); //$NON-NLS-1$ //$NON-NLS-2$
+ xformer.transform(source, result);
+ inp = new ByteArrayInputStream(stw.toString().getBytes(StandardCharsets.UTF_8));
+ } catch (TransformerException e) {
+ e.printStackTrace();
+ }
+ return inp;
+ }
- @Override
- public String toString (){
- String ret = null;
- Source source = new DOMSource(getDocument());
- StringWriter stw = new StringWriter();
- Result result = new StreamResult(stw);
- TransformerFactory factory = TransformerFactory.newInstance();
- Transformer xformer;
- try {
- xformer = factory.newTransformer();
- xformer.setOutputProperty("indent", "yes"); //$NON-NLS-1$ //$NON-NLS-2$
- xformer.transform(source, result);
- ret = stw.toString();
- } catch (TransformerException e) {
- e.printStackTrace();
- }
- return ret;
- }
+ @Override
+ public String toString() {
+ String ret = null;
+ Source source = new DOMSource(getDocument());
+ StringWriter stw = new StringWriter();
+ Result result = new StreamResult(stw);
+ TransformerFactory factory = TransformerFactory.newInstance();
+ Transformer xformer;
+ try {
+ xformer = factory.newTransformer();
+ xformer.setOutputProperty("indent", "yes"); //$NON-NLS-1$ //$NON-NLS-2$
+ xformer.transform(source, result);
+ ret = stw.toString();
+ } catch (TransformerException e) {
+ e.printStackTrace();
+ }
+ return ret;
+ }
}
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/opxml/EventIdCache.java b/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/opxml/EventIdCache.java
index c9c36f5752..924548262f 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/opxml/EventIdCache.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/opxml/EventIdCache.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2010 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2010, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Red Hat - initial API and implementation
@@ -45,211 +47,210 @@ import org.xml.sax.SAXException;
*/
public class EventIdCache {
- private static final String HELP_EVENTS = "help_events"; //$NON-NLS-1$
- private static final String HEADER = "header"; //$NON-NLS-1$
- private static final String SCHEMA = "schemaversion"; //$NON-NLS-1$
- private static final String CATEGORY = "category"; //$NON-NLS-1$
- private static final String OPHELP = "ophelp"; //$NON-NLS-1$
- private static final String EVENT = "event"; //$NON-NLS-1$
- private static final String EVENT_NAME = "event_name"; //$NON-NLS-1$
-
- private static final String LOCAL = "local"; //$NON-NLS-1$
-
- private Document eventDoc; // the document to hold the xml from ophelp
- private Element eventRoot; // the root corresponding to the xml from ophelp
- // name - the name of the event
- // Element - the DOM node
- private HashMap<String, Element> nameMap;
-
- // Map containing the caches for remote machines
- private static HashMap<String, EventIdCache> cacheMap;
-
- public static EventIdCache getInstance(){
-
- if (cacheMap == null) {
- cacheMap = new HashMap<>();
- }
-
- IProject project = Oprofile.OprofileProject.getProject();
- EventIdCache newCache = new EventIdCache();
- if (project != null) {
- EventIdCache eventIdCache = cacheMap.get(project.getLocationURI().getHost());
- if (eventIdCache == null) {
- cacheMap.put(project.getLocationURI().getHost(), newCache);
- } else {
- return eventIdCache;
- }
- } else {
- // If no project associated we should launch locally
- EventIdCache eventIdCache = cacheMap.get(LOCAL);
- if (eventIdCache == null) {
- cacheMap.put(LOCAL, newCache);
- } else {
- return eventIdCache;
- }
- }
-
- return newCache;
- }
-
- /**
- * @param id the id corresponding to an event
- * @return the DOM Element corresponding to the event tag
- */
- public Element getElementWithName (String name) {
- IProject project = Oprofile.OprofileProject.getProject();
- EventIdCache eventIdCache;
- if (project != null) {
- eventIdCache = cacheMap.get(project.getLocationURI().getHost());
- } else {
- eventIdCache = cacheMap.get(LOCAL);
- }
-
- if (eventIdCache.nameMap == null){
- readXML(eventIdCache);
- buildCache(eventIdCache);
- }
- return eventIdCache.nameMap.get(name) != null ? (Element)eventIdCache.nameMap.get(name) : null;
-
- }
-
- /**
- * Build the cache
- */
- private void buildCache(EventIdCache eventId) {
- eventId.nameMap = new HashMap<> ();
- NodeList eventList = eventId.eventRoot.getElementsByTagName(EVENT);
- for (int i = 0; i < eventList.getLength(); i++){
- Element elem = (Element) eventList.item(i);
- String eventName = elem.getAttribute(EVENT_NAME);
- eventId.nameMap.put(eventName, elem);
- }
- }
-
- /**
- * Read the XML from ophelp
- */
- private void readXML(EventIdCache eventId) {
- if (eventId.eventRoot != null) {
- return;
- }
-
- try {
- Process p = RuntimeProcessFactory.getFactory().exec(OPHELP + ' ' + "-X", Oprofile.OprofileProject.getProject()); //$NON-NLS-1$
-
- DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
- DocumentBuilder builder;
- try {
- builder = factory.newDocumentBuilder();
- try {
- eventId.eventDoc = builder.parse(p.getInputStream());
- Element elem = (Element) eventId.eventDoc.getElementsByTagName(HELP_EVENTS).item(0);
- eventId.eventRoot = elem;
- } catch (IOException|SAXException e) {
- }
- } catch (ParserConfigurationException e1) {
- e1.printStackTrace();
- }
-
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
-
- /**
- * Get the unit mask type. Schema Version 1.1 and newer of ophelp XML
- * will list the unit mask type as an attribute. Older version will not
- * so we default to file lookups.
- *
- * @param name the name of the event
- * @return the type of unit mask. This can be either mandatory, exclusive,
- * bitmask, or null if none could be found.
- */
- public String getUnitMaskType(String name) {
- IProject project = Oprofile.OprofileProject.getProject();
- EventIdCache eventIdCache;
- if (project != null) {
- eventIdCache = cacheMap.get(project.getLocationURI().getHost());
- } else {
- eventIdCache = cacheMap.get(LOCAL);
- }
-
- if (eventIdCache.eventRoot == null){
- readXML(eventIdCache);
- buildCache(eventIdCache);
- }
-
- Element header = (Element)eventIdCache.eventRoot.getElementsByTagName(HEADER).item(0);
-
- double schemaVersion = 0;
-
- if (!eventIdCache.eventRoot.getAttribute(SCHEMA).isEmpty()){
- schemaVersion = Double.parseDouble(eventIdCache.eventRoot.getAttribute(SCHEMA));
- } else {
- schemaVersion = Double.parseDouble(header.getAttribute(SCHEMA));
- }
-
- String unitMaskType = null;
- IRemoteFileProxy proxy = null;
- try {
- proxy = RemoteProxyManager.getInstance().getFileProxy(Oprofile.OprofileProject.getProject());
- } catch (CoreException e) {
- e.printStackTrace();
- }
-
- // Schema Version > 1.0 has the unit mask type within the XML
- if (schemaVersion > 1.0){
- Element event = getElementWithName(name);
- Element unitMaskTag = (Element) event.getElementsByTagName(InfoAdapter.UNIT_MASKS).item(0);
- return unitMaskTag.getAttribute(CATEGORY);
- } else {
- IFileStore fileStore = proxy.getResource(InfoAdapter.CPUTYPE);
- try (InputStream fileInputStream = fileStore.openInputStream(
- EFS.NONE, new NullProgressMonitor());
- BufferedReader bi = new BufferedReader(
- new InputStreamReader(fileInputStream))) {
-
- String cpuType = bi.readLine();
- IFileStore opArchEvents = proxy.getResource(InfoAdapter.OP_SHARE + cpuType + "/" + InfoAdapter.EVENTS); //$NON-NLS-1$
- IFileStore opArchUnitMasks = proxy.getResource(InfoAdapter.OP_SHARE + cpuType + "/" + InfoAdapter.UNIT_MASKS); //$NON-NLS-1$
-
- try (InputStream inputStreamEvents = opArchEvents.openInputStream(EFS.NONE, new NullProgressMonitor());
- BufferedReader eventReader = new BufferedReader(new InputStreamReader(inputStreamEvents))) {
- String line;
- while ((line = eventReader.readLine()) != null){
- // find the line with the event name
- if (line.contains("name:"+name+' ')){ //$NON-NLS-1$
- int start = line.indexOf("um:") + 3; //$NON-NLS-1$
- int end = line.indexOf(' ', start);
- // grab the string that references the unit mask type
- String um = line.substring(start, end);
- try (InputStream inputStreamMasks = opArchUnitMasks
- .openInputStream(EFS.NONE,
- new NullProgressMonitor());
- BufferedReader unitMaskReader = new BufferedReader(
- new InputStreamReader(inputStreamMasks))) {
- while ((line = unitMaskReader.readLine()) != null) {
- if (line.contains("name:" + um + ' ')) { //$NON-NLS-1$
- start = line.indexOf("type:") + 5; //$NON-NLS-1$
- end = line.indexOf(' ', start);
- unitMaskType = line.substring(start, end);
- return unitMaskType;
- }
- }
- }
- }
- }
- }
- } catch (IOException|CoreException e) {
- }
- }
- return unitMaskType;
- }
-
- /**
- * @since 3.0
- */
- public void setCacheDoc(Element oldRoot) {
- eventRoot = oldRoot;
- }
+ private static final String HELP_EVENTS = "help_events"; //$NON-NLS-1$
+ private static final String HEADER = "header"; //$NON-NLS-1$
+ private static final String SCHEMA = "schemaversion"; //$NON-NLS-1$
+ private static final String CATEGORY = "category"; //$NON-NLS-1$
+ private static final String OPHELP = "ophelp"; //$NON-NLS-1$
+ private static final String EVENT = "event"; //$NON-NLS-1$
+ private static final String EVENT_NAME = "event_name"; //$NON-NLS-1$
+
+ private static final String LOCAL = "local"; //$NON-NLS-1$
+
+ private Document eventDoc; // the document to hold the xml from ophelp
+ private Element eventRoot; // the root corresponding to the xml from ophelp
+ // name - the name of the event
+ // Element - the DOM node
+ private HashMap<String, Element> nameMap;
+
+ // Map containing the caches for remote machines
+ private static HashMap<String, EventIdCache> cacheMap;
+
+ public static EventIdCache getInstance() {
+
+ if (cacheMap == null) {
+ cacheMap = new HashMap<>();
+ }
+
+ IProject project = Oprofile.OprofileProject.getProject();
+ EventIdCache newCache = new EventIdCache();
+ if (project != null) {
+ EventIdCache eventIdCache = cacheMap.get(project.getLocationURI().getHost());
+ if (eventIdCache == null) {
+ cacheMap.put(project.getLocationURI().getHost(), newCache);
+ } else {
+ return eventIdCache;
+ }
+ } else {
+ // If no project associated we should launch locally
+ EventIdCache eventIdCache = cacheMap.get(LOCAL);
+ if (eventIdCache == null) {
+ cacheMap.put(LOCAL, newCache);
+ } else {
+ return eventIdCache;
+ }
+ }
+
+ return newCache;
+ }
+
+ /**
+ * @param id the id corresponding to an event
+ * @return the DOM Element corresponding to the event tag
+ */
+ public Element getElementWithName(String name) {
+ IProject project = Oprofile.OprofileProject.getProject();
+ EventIdCache eventIdCache;
+ if (project != null) {
+ eventIdCache = cacheMap.get(project.getLocationURI().getHost());
+ } else {
+ eventIdCache = cacheMap.get(LOCAL);
+ }
+
+ if (eventIdCache.nameMap == null) {
+ readXML(eventIdCache);
+ buildCache(eventIdCache);
+ }
+ return eventIdCache.nameMap.get(name) != null ? (Element) eventIdCache.nameMap.get(name) : null;
+
+ }
+
+ /**
+ * Build the cache
+ */
+ private void buildCache(EventIdCache eventId) {
+ eventId.nameMap = new HashMap<>();
+ NodeList eventList = eventId.eventRoot.getElementsByTagName(EVENT);
+ for (int i = 0; i < eventList.getLength(); i++) {
+ Element elem = (Element) eventList.item(i);
+ String eventName = elem.getAttribute(EVENT_NAME);
+ eventId.nameMap.put(eventName, elem);
+ }
+ }
+
+ /**
+ * Read the XML from ophelp
+ */
+ private void readXML(EventIdCache eventId) {
+ if (eventId.eventRoot != null) {
+ return;
+ }
+
+ try {
+ Process p = RuntimeProcessFactory.getFactory().exec(OPHELP + ' ' + "-X", //$NON-NLS-1$
+ Oprofile.OprofileProject.getProject());
+
+ DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
+ DocumentBuilder builder;
+ try {
+ builder = factory.newDocumentBuilder();
+ try {
+ eventId.eventDoc = builder.parse(p.getInputStream());
+ Element elem = (Element) eventId.eventDoc.getElementsByTagName(HELP_EVENTS).item(0);
+ eventId.eventRoot = elem;
+ } catch (IOException | SAXException e) {
+ }
+ } catch (ParserConfigurationException e1) {
+ e1.printStackTrace();
+ }
+
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+
+ /**
+ * Get the unit mask type. Schema Version 1.1 and newer of ophelp XML will list
+ * the unit mask type as an attribute. Older version will not so we default to
+ * file lookups.
+ *
+ * @param name the name of the event
+ * @return the type of unit mask. This can be either mandatory, exclusive,
+ * bitmask, or null if none could be found.
+ */
+ public String getUnitMaskType(String name) {
+ IProject project = Oprofile.OprofileProject.getProject();
+ EventIdCache eventIdCache;
+ if (project != null) {
+ eventIdCache = cacheMap.get(project.getLocationURI().getHost());
+ } else {
+ eventIdCache = cacheMap.get(LOCAL);
+ }
+
+ if (eventIdCache.eventRoot == null) {
+ readXML(eventIdCache);
+ buildCache(eventIdCache);
+ }
+
+ Element header = (Element) eventIdCache.eventRoot.getElementsByTagName(HEADER).item(0);
+
+ double schemaVersion = 0;
+
+ if (!eventIdCache.eventRoot.getAttribute(SCHEMA).isEmpty()) {
+ schemaVersion = Double.parseDouble(eventIdCache.eventRoot.getAttribute(SCHEMA));
+ } else {
+ schemaVersion = Double.parseDouble(header.getAttribute(SCHEMA));
+ }
+
+ String unitMaskType = null;
+ IRemoteFileProxy proxy = null;
+ try {
+ proxy = RemoteProxyManager.getInstance().getFileProxy(Oprofile.OprofileProject.getProject());
+ } catch (CoreException e) {
+ e.printStackTrace();
+ }
+
+ // Schema Version > 1.0 has the unit mask type within the XML
+ if (schemaVersion > 1.0) {
+ Element event = getElementWithName(name);
+ Element unitMaskTag = (Element) event.getElementsByTagName(InfoAdapter.UNIT_MASKS).item(0);
+ return unitMaskTag.getAttribute(CATEGORY);
+ } else {
+ IFileStore fileStore = proxy.getResource(InfoAdapter.CPUTYPE);
+ try (InputStream fileInputStream = fileStore.openInputStream(EFS.NONE, new NullProgressMonitor());
+ BufferedReader bi = new BufferedReader(new InputStreamReader(fileInputStream))) {
+
+ String cpuType = bi.readLine();
+ IFileStore opArchEvents = proxy.getResource(InfoAdapter.OP_SHARE + cpuType + "/" + InfoAdapter.EVENTS); //$NON-NLS-1$
+ IFileStore opArchUnitMasks = proxy
+ .getResource(InfoAdapter.OP_SHARE + cpuType + "/" + InfoAdapter.UNIT_MASKS); //$NON-NLS-1$
+
+ try (InputStream inputStreamEvents = opArchEvents.openInputStream(EFS.NONE, new NullProgressMonitor());
+ BufferedReader eventReader = new BufferedReader(new InputStreamReader(inputStreamEvents))) {
+ String line;
+ while ((line = eventReader.readLine()) != null) {
+ // find the line with the event name
+ if (line.contains("name:" + name + ' ')) { //$NON-NLS-1$
+ int start = line.indexOf("um:") + 3; //$NON-NLS-1$
+ int end = line.indexOf(' ', start);
+ // grab the string that references the unit mask type
+ String um = line.substring(start, end);
+ try (InputStream inputStreamMasks = opArchUnitMasks.openInputStream(EFS.NONE,
+ new NullProgressMonitor());
+ BufferedReader unitMaskReader = new BufferedReader(
+ new InputStreamReader(inputStreamMasks))) {
+ while ((line = unitMaskReader.readLine()) != null) {
+ if (line.contains("name:" + um + ' ')) { //$NON-NLS-1$
+ start = line.indexOf("type:") + 5; //$NON-NLS-1$
+ end = line.indexOf(' ', start);
+ unitMaskType = line.substring(start, end);
+ return unitMaskType;
+ }
+ }
+ }
+ }
+ }
+ }
+ } catch (IOException | CoreException e) {
+ }
+ }
+ return unitMaskType;
+ }
+
+ /**
+ * @since 3.0
+ */
+ public void setCacheDoc(Element oldRoot) {
+ eventRoot = oldRoot;
+ }
}
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/opxml/OprofileSAXHandler.java b/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/opxml/OprofileSAXHandler.java
index c154b2b59d..7045e42ba0 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/opxml/OprofileSAXHandler.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/opxml/OprofileSAXHandler.java
@@ -1,9 +1,11 @@
/*******************************************************************************
* Copyright (c) 2004, 2018 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Keith Seitz <keiths@redhat.com> - initial API and implementation
@@ -94,8 +96,7 @@ public class OprofileSAXHandler extends DefaultHandler {
/**
* Sets the calldata for the processor.
*
- * @param callData
- * the calldata to pass to the processor
+ * @param callData the calldata to pass to the processor
*/
private void setCallData(Object callData) {
this.callData = callData;
@@ -104,8 +105,7 @@ public class OprofileSAXHandler extends DefaultHandler {
/**
* Returns the processor for a given request type.
*
- * @param type
- * the name of the processor
+ * @param type the name of the processor
* @return the requested processor or null
*/
private static XMLProcessor getProcessor(String type) {
@@ -170,8 +170,7 @@ public class OprofileSAXHandler extends DefaultHandler {
* Pushes the current XMLProcessor onto the stack and installs the given
* processor as the document's parser/handler.
*
- * @param proc
- * the processor to continue parsing the document
+ * @param proc the processor to continue parsing the document
*/
public void push(XMLProcessor proc) {
processorStack.add(processor);
@@ -184,8 +183,7 @@ public class OprofileSAXHandler extends DefaultHandler {
* This assumes that endElement caused the pop, so it calls endElement in the
* parent processor.
*
- * @param tag
- * the XML tag to pass to the parent processor
+ * @param tag the XML tag to pass to the parent processor
*/
public void pop(String tag) {
processor = processorStack.pop();
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/opxml/OpxmlConstants.java b/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/opxml/OpxmlConstants.java
index 7cd4648be0..98a4adf509 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/opxml/OpxmlConstants.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/opxml/OpxmlConstants.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2004,2008 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2004, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Keith Seitz <keiths@redhat.com> - initial API and implementation
@@ -12,32 +14,32 @@
package org.eclipse.linuxtools.internal.oprofile.core.opxml;
/**
- * A class of constants for communications with the opxml wrapper
- * program.
+ * A class of constants for communications with the opxml wrapper program.
+ *
* @see org.eclipse.linuxtools.internal.oprofile.core.opxml.OprofileSAXHandler
*/
public class OpxmlConstants {
- /**
- * Request static oprofile information (num counters, defaults, event lists)
- */
- public static final String OPXML_INFO = "info"; //$NON-NLS-1$
- public static final String INFO_TAG = OPXML_INFO;
+ /**
+ * Request static oprofile information (num counters, defaults, event lists)
+ */
+ public static final String OPXML_INFO = "info"; //$NON-NLS-1$
+ public static final String INFO_TAG = OPXML_INFO;
- /**
- * Request model data for a session
- */
- public static final String OPXML_MODELDATA = "model-data"; //$NON-NLS-1$
- public static final String MODELDATA_TAG = OPXML_MODELDATA;
+ /**
+ * Request model data for a session
+ */
+ public static final String OPXML_MODELDATA = "model-data"; //$NON-NLS-1$
+ public static final String MODELDATA_TAG = OPXML_MODELDATA;
- /**
- * Request event validity check
- */
- public static final String OPXML_CHECKEVENTS = "check-events"; //$NON-NLS-1$
- public static final String CHECKEVENTS_TAG = OPXML_CHECKEVENTS;
+ /**
+ * Request event validity check
+ */
+ public static final String OPXML_CHECKEVENTS = "check-events"; //$NON-NLS-1$
+ public static final String CHECKEVENTS_TAG = OPXML_CHECKEVENTS;
- /**
- * Request session list
- */
- public static final String OPXML_SESSIONS = "sessions"; //$NON-NLS-1$
- public static final String SESSIONS_TAG = OPXML_SESSIONS;
+ /**
+ * Request session list
+ */
+ public static final String OPXML_SESSIONS = "sessions"; //$NON-NLS-1$
+ public static final String SESSIONS_TAG = OPXML_SESSIONS;
}
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/opxml/XMLProcessor.java b/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/opxml/XMLProcessor.java
index 0a9c806469..a75a6cb385 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/opxml/XMLProcessor.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/opxml/XMLProcessor.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2004 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2004, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Keith Seitz <keiths@redhat.com> - initial API and implementation
@@ -13,67 +15,78 @@ package org.eclipse.linuxtools.internal.oprofile.core.opxml;
import org.xml.sax.Attributes;
/**
- * A class which (minimally) parses XML documents. This class provides only basic
- * support for collecting information from XML documents. It is intended to be subclassed,
- * providing only common functionality for all parser classes.
+ * A class which (minimally) parses XML documents. This class provides only
+ * basic support for collecting information from XML documents. It is intended
+ * to be subclassed, providing only common functionality for all parser classes.
+ *
* @see org.eclipse.linuxtools.internal.oprofile.core.opxml.OpxmlRunner
*/
public class XMLProcessor {
- // The characters in the current tag
- protected String characters;
+ // The characters in the current tag
+ protected String characters;
- /**
- * This method is called whenever the SAXHandler is about to invoke the
- * processor for the first time on a given document.
- * @param callData call data for the processor (usually the result is stored here)
- */
- public void reset(Object callData) {
- }
+ /**
+ * This method is called whenever the SAXHandler is about to invoke the
+ * processor for the first time on a given document.
+ *
+ * @param callData call data for the processor (usually the result is stored
+ * here)
+ */
+ public void reset(Object callData) {
+ }
- /**
- * This method is called whenever a new tag is seen in the document. By default,
- * this process will clear the characters collected for the tag. Processors will typically
- * call this baseclass method to setup for collecting new character information for a
- * tag.
- * @param name the name of the tag
- * @param attrs the tag's attributes
- * @param callData call data for the processor (usually the result is stored here)
- */
- public void startElement(String name, Attributes attrs, Object callData) {
- characters = ""; //$NON-NLS-1$
- }
+ /**
+ * This method is called whenever a new tag is seen in the document. By default,
+ * this process will clear the characters collected for the tag. Processors will
+ * typically call this baseclass method to setup for collecting new character
+ * information for a tag.
+ *
+ * @param name the name of the tag
+ * @param attrs the tag's attributes
+ * @param callData call data for the processor (usually the result is stored
+ * here)
+ */
+ public void startElement(String name, Attributes attrs, Object callData) {
+ characters = ""; //$NON-NLS-1$
+ }
- /**
- * This method is called whenever the closing tag for an element is seen in the
- * document.
- * @param name the element which is ending
- * @param callData call data for the processor (usually the result is stored here)
- */
- public void endElement(String name, Object callData) {
- }
+ /**
+ * This method is called whenever the closing tag for an element is seen in the
+ * document.
+ *
+ * @param name the element which is ending
+ * @param callData call data for the processor (usually the result is stored
+ * here)
+ */
+ public void endElement(String name, Object callData) {
+ }
- /**
- * This method is called whenever characters are seen in the document that are not in
- * a markup tag.
- * @param chars the characters read
- * @param callData call data for the processor (usually the result is stored here)
- */
- public void characters(String chars, Object callData) {
- characters = chars;
- }
+ /**
+ * This method is called whenever characters are seen in the document that are
+ * not in a markup tag.
+ *
+ * @param chars the characters read
+ * @param callData call data for the processor (usually the result is stored
+ * here)
+ */
+ public void characters(String chars, Object callData) {
+ characters = chars;
+ }
- /**
- * This method is called on attribute strings and does the reverse of valid_string in
- * xmlfmt.cc in opxml.
- * @param source source attribute string
- * @return the source string with escaped characters translated back to their single character counterpart
- */
- public String validString(String source) {
- final String chars_long[] = {"&amp;", "&quot;", "&apos;", "&lt;", "&gt;"}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
- final String chars[] = {"&", "\"", "'", "<", ">"}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
- for (int i = 0; i < chars_long.length; i++) {
- source.replaceAll(chars_long[i], chars[i]);
- }
- return source;
- }
+ /**
+ * This method is called on attribute strings and does the reverse of
+ * valid_string in xmlfmt.cc in opxml.
+ *
+ * @param source source attribute string
+ * @return the source string with escaped characters translated back to their
+ * single character counterpart
+ */
+ public String validString(String source) {
+ final String chars_long[] = { "&amp;", "&quot;", "&apos;", "&lt;", "&gt;" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
+ final String chars[] = { "&", "\"", "'", "<", ">" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
+ for (int i = 0; i < chars_long.length; i++) {
+ source.replaceAll(chars_long[i], chars[i]);
+ }
+ return source;
+ }
}
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/opxml/checkevent/CheckEventAdapter.java b/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/opxml/checkevent/CheckEventAdapter.java
index 96137dd009..661c1f54cc 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/opxml/checkevent/CheckEventAdapter.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/opxml/checkevent/CheckEventAdapter.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2010, 2017 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2010, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Red Hat - initial API and implementation
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/opxml/checkevent/CheckEventsProcessor.java b/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/opxml/checkevent/CheckEventsProcessor.java
index e65f1037d8..32246d5f40 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/opxml/checkevent/CheckEventsProcessor.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/opxml/checkevent/CheckEventsProcessor.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2004, 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2004, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Keith Seitz <keiths@redhat.com> - initial API and implementation
@@ -15,41 +17,42 @@ import org.eclipse.linuxtools.internal.oprofile.core.opxml.XMLProcessor;
/**
* XML handler class for opxml's "check-events".
+ *
* @see org.eclipse.linuxtools.internal.oprofile.core.opxml.OpxmlRunner
*/
public class CheckEventsProcessor extends XMLProcessor {
- public static final int INVALID_UNKNOWN = 0; //unexpected error
- public static final int EVENT_OK = 1; //valid
- public static final int INVALID_UMASK = 3; //invalid unit mask value
- public static final int INVALID_COUNTER = 4; //invalid event for given counter number
+ public static final int INVALID_UNKNOWN = 0; // unexpected error
+ public static final int EVENT_OK = 1; // valid
+ public static final int INVALID_UMASK = 3; // invalid unit mask value
+ public static final int INVALID_COUNTER = 4; // invalid event for given counter number
- private static final String RESULT_TAG = "result"; //$NON-NLS-1$
- private static final String CHECK_EVENTS_TAG ="check-events"; //$NON-NLS-1$
+ private static final String RESULT_TAG = "result"; //$NON-NLS-1$
+ private static final String CHECK_EVENTS_TAG = "check-events"; //$NON-NLS-1$
- private static final String EVENT_OK_STR = "ok"; //$NON-NLS-1$
- private static final String INVALID_UMASK_STR = "invalid-um"; //$NON-NLS-1$
- private static final String INVALID_COUNTER_STR = "invalid-counter"; //$NON-NLS-1$
+ private static final String EVENT_OK_STR = "ok"; //$NON-NLS-1$
+ private static final String INVALID_UMASK_STR = "invalid-um"; //$NON-NLS-1$
+ private static final String INVALID_COUNTER_STR = "invalid-counter"; //$NON-NLS-1$
- private int result;
+ private int result;
- @Override
- public void reset(Object callData) {
- result = INVALID_UNKNOWN;
- }
+ @Override
+ public void reset(Object callData) {
+ result = INVALID_UNKNOWN;
+ }
- @Override
- public void endElement(String name, Object callData) {
- if (name.equals(RESULT_TAG)) {
- if (characters.equals(EVENT_OK_STR)) {
- result = EVENT_OK;
- } else if (characters.equals(INVALID_UMASK_STR)) {
- result = INVALID_UMASK;
- } else if (characters.equals(INVALID_COUNTER_STR)) {
- result = INVALID_COUNTER;
- }
- } else if (name.equals(CHECK_EVENTS_TAG)) {
- int[] r = (int[]) callData;
- r[0] = result;
- }
- }
+ @Override
+ public void endElement(String name, Object callData) {
+ if (name.equals(RESULT_TAG)) {
+ if (characters.equals(EVENT_OK_STR)) {
+ result = EVENT_OK;
+ } else if (characters.equals(INVALID_UMASK_STR)) {
+ result = INVALID_UMASK;
+ } else if (characters.equals(INVALID_COUNTER_STR)) {
+ result = INVALID_COUNTER;
+ }
+ } else if (name.equals(CHECK_EVENTS_TAG)) {
+ int[] r = (int[]) callData;
+ r[0] = result;
+ }
+ }
}
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/opxml/info/DefaultsProcessor.java b/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/opxml/info/DefaultsProcessor.java
index 2172d2cac6..98e8674fc7 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/opxml/info/DefaultsProcessor.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/opxml/info/DefaultsProcessor.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2004 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2004, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Keith Seitz <keiths@redhat.com> - initial API and implementation
@@ -18,29 +20,30 @@ import org.eclipse.linuxtools.internal.oprofile.core.opxml.XMLProcessor;
/**
* XML handler class for opxml's "defaults".
+ *
* @see org.eclipse.linuxtools.internal.oprofile.core.opxml.OpxmlRunner
*/
public class DefaultsProcessor extends XMLProcessor {
- // XML tags reconize by this processor (public)
- public static final String SAMPLE_DIR = "sample-dir"; //$NON-NLS-1$
- public static final String LOCK_FILE = "lock-file"; //$NON-NLS-1$
- public static final String LOG_FILE = "log-file"; //$NON-NLS-1$
- public static final String DUMP_STATUS = "dump-status"; //$NON-NLS-1$
- protected HashMap<String,String> map = new HashMap<>();
+ // XML tags reconize by this processor (public)
+ public static final String SAMPLE_DIR = "sample-dir"; //$NON-NLS-1$
+ public static final String LOCK_FILE = "lock-file"; //$NON-NLS-1$
+ public static final String LOG_FILE = "log-file"; //$NON-NLS-1$
+ public static final String DUMP_STATUS = "dump-status"; //$NON-NLS-1$
+ protected HashMap<String, String> map = new HashMap<>();
- @Override
- public void reset(Object callData) {
- map.clear();
- }
+ @Override
+ public void reset(Object callData) {
+ map.clear();
+ }
- @Override
- public void endElement(String name, Object callData) {
- if (name.equals(OpInfoProcessor.DEFAULTS_TAG)) {
- OpInfo info = (OpInfo) callData;
- info.setDefaults(map);
- OprofileSAXHandler.getInstance(callData).pop(name);
- } else {
- map.put(name, characters);
- }
- }
+ @Override
+ public void endElement(String name, Object callData) {
+ if (name.equals(OpInfoProcessor.DEFAULTS_TAG)) {
+ OpInfo info = (OpInfo) callData;
+ info.setDefaults(map);
+ OprofileSAXHandler.getInstance(callData).pop(name);
+ } else {
+ map.put(name, characters);
+ }
+ }
}
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/opxml/info/EventListProcessor.java b/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/opxml/info/EventListProcessor.java
index b5dc69f334..2975be8bf9 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/opxml/info/EventListProcessor.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/opxml/info/EventListProcessor.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2004,2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2004, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Keith Seitz <keiths@redhat.com> - initial API and implementation
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/opxml/info/InfoAdapter.java b/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/opxml/info/InfoAdapter.java
index 3beb56b227..2757e12be0 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/opxml/info/InfoAdapter.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/opxml/info/InfoAdapter.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2010, 2017 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2010, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Red Hat - initial API and implementation
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/opxml/info/OpInfoProcessor.java b/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/opxml/info/OpInfoProcessor.java
index 51a07f3782..e70ca68fb4 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/opxml/info/OpInfoProcessor.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/opxml/info/OpInfoProcessor.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2004,2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2004, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Keith Seitz <keiths@redhat.com> - initial API and implementation
@@ -16,61 +18,61 @@ import org.eclipse.linuxtools.internal.oprofile.core.opxml.OprofileSAXHandler;
import org.eclipse.linuxtools.internal.oprofile.core.opxml.XMLProcessor;
import org.xml.sax.Attributes;
-
/**
* Opxml processor for the "info" command.
+ *
* @see org.eclipse.linuxtools.internal.oprofile.core.opxml.OpxmlRunner
*/
public class OpInfoProcessor extends XMLProcessor {
- // Other XMLProcessors used by this processor
- private DefaultsProcessor defaultsProc;
- private EventListProcessor eventListProc;
+ // Other XMLProcessors used by this processor
+ private DefaultsProcessor defaultsProc;
+ private EventListProcessor eventListProc;
- // XML tags processed by this processor
- public static final String NUM_COUNTERS_TAG = "num-counters"; //$NON-NLS-1$
- public static final String DEFAULTS_TAG = "defaults"; //$NON-NLS-1$
- public static final String EVENT_LIST_TAG = "event-list"; //$NON-NLS-1$
- public static final String CPU_FREQUENCY_TAG = "cpu-frequency"; //$NON-NLS-1$
- public static final String TIMER_MODE = "timer-mode"; //$NON-NLS-1$
+ // XML tags processed by this processor
+ public static final String NUM_COUNTERS_TAG = "num-counters"; //$NON-NLS-1$
+ public static final String DEFAULTS_TAG = "defaults"; //$NON-NLS-1$
+ public static final String EVENT_LIST_TAG = "event-list"; //$NON-NLS-1$
+ public static final String CPU_FREQUENCY_TAG = "cpu-frequency"; //$NON-NLS-1$
+ public static final String TIMER_MODE = "timer-mode"; //$NON-NLS-1$
- public OpInfoProcessor() {
- defaultsProc = new DefaultsProcessor();
- eventListProc = new EventListProcessor();
- }
+ public OpInfoProcessor() {
+ defaultsProc = new DefaultsProcessor();
+ eventListProc = new EventListProcessor();
+ }
- @Override
- public void startElement(String name, Attributes attrs, Object callData) {
- if (name.equals(DEFAULTS_TAG)) {
- OprofileSAXHandler.getInstance(callData).push(defaultsProc);
- } else if (name.equals(EVENT_LIST_TAG)) {
- OprofileSAXHandler.getInstance(callData).push(eventListProc);
- eventListProc.startElement(name, attrs, callData);
- } else {
- super.startElement(name, attrs, callData);
- }
- }
+ @Override
+ public void startElement(String name, Attributes attrs, Object callData) {
+ if (name.equals(DEFAULTS_TAG)) {
+ OprofileSAXHandler.getInstance(callData).push(defaultsProc);
+ } else if (name.equals(EVENT_LIST_TAG)) {
+ OprofileSAXHandler.getInstance(callData).push(eventListProc);
+ eventListProc.startElement(name, attrs, callData);
+ } else {
+ super.startElement(name, attrs, callData);
+ }
+ }
- @Override
- public void endElement(String name, Object callData) {
- if (name.equals(CPU_FREQUENCY_TAG)) {
- double speed = Double.parseDouble(characters);
- OpInfo info = (OpInfo) callData;
- info.setCPUSpeed(speed);
- } else if (name.equals(TIMER_MODE)) {
- boolean timerMode = Boolean.parseBoolean(characters);
- OpInfo info = (OpInfo) callData;
- info.setTimerMode(timerMode);
- } else if (name.equals(NUM_COUNTERS_TAG)) {
- int numCounters = 0;
- try {
- numCounters = Integer.parseInt(characters);
- } catch (NumberFormatException nfe) {
- }
- OpInfo info = (OpInfo) callData;
- info.setNrCounters(numCounters);
- } else if (name.equals(EVENT_LIST_TAG)) {
- OpInfo info = (OpInfo) callData;
- info.setEvents(eventListProc.getCounterNum(), eventListProc.getEvents());
- }
- }
+ @Override
+ public void endElement(String name, Object callData) {
+ if (name.equals(CPU_FREQUENCY_TAG)) {
+ double speed = Double.parseDouble(characters);
+ OpInfo info = (OpInfo) callData;
+ info.setCPUSpeed(speed);
+ } else if (name.equals(TIMER_MODE)) {
+ boolean timerMode = Boolean.parseBoolean(characters);
+ OpInfo info = (OpInfo) callData;
+ info.setTimerMode(timerMode);
+ } else if (name.equals(NUM_COUNTERS_TAG)) {
+ int numCounters = 0;
+ try {
+ numCounters = Integer.parseInt(characters);
+ } catch (NumberFormatException nfe) {
+ }
+ OpInfo info = (OpInfo) callData;
+ info.setNrCounters(numCounters);
+ } else if (name.equals(EVENT_LIST_TAG)) {
+ OpInfo info = (OpInfo) callData;
+ info.setEvents(eventListProc.getCounterNum(), eventListProc.getEvents());
+ }
+ }
}
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/opxml/modeldata/DependentProcessor.java b/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/opxml/modeldata/DependentProcessor.java
index c9d5ca9a9a..32f4ddfe4f 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/opxml/modeldata/DependentProcessor.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/opxml/modeldata/DependentProcessor.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2008 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2008, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Kent Sebastian <ksebasti@redhat.com> - initial API and implementation
@@ -17,63 +19,64 @@ import org.eclipse.linuxtools.internal.oprofile.core.opxml.OprofileSAXHandler;
import org.eclipse.linuxtools.internal.oprofile.core.opxml.XMLProcessor;
import org.xml.sax.Attributes;
-
/**
* XML handler class for dependent images (<image> tags under <dependent>)
*/
public class DependentProcessor extends XMLProcessor {
- //XML tags parsed by this processor
- private static final String IMAGE_TAG = "image"; //$NON-NLS-1$
- private static final String SYMBOLS_TAG = "symbols"; //$NON-NLS-1$
- private static final String DEPENDENT_TAG = "dependent"; //$NON-NLS-1$
+ // XML tags parsed by this processor
+ private static final String IMAGE_TAG = "image"; //$NON-NLS-1$
+ private static final String SYMBOLS_TAG = "symbols"; //$NON-NLS-1$
+ private static final String DEPENDENT_TAG = "dependent"; //$NON-NLS-1$
+
+ // attribute tags
+ private static final String ATTR_IMAGENAME = "name"; //$NON-NLS-1$
+ private static final String ATTR_COUNT = "count"; //$NON-NLS-1$
+
+ /**
+ * the current image being constructed
+ */
+ private OpModelImage image;
+ /**
+ * a list of all the dependent images
+ */
+ private ArrayList<OpModelImage> imageList;
+ /**
+ * processor used for symbols of an image
+ */
+ private SymbolsProcessor _symbolsProcessor = new SymbolsProcessor();
- //attribute tags
- private static final String ATTR_IMAGENAME = "name"; //$NON-NLS-1$
- private static final String ATTR_COUNT = "count"; //$NON-NLS-1$
+ @Override
+ public void reset(Object callData) {
+ image = new OpModelImage();
+ imageList = new ArrayList<>();
+ }
- /**
- * the current image being constructed
- */
- private OpModelImage image;
- /**
- * a list of all the dependent images
- */
- private ArrayList<OpModelImage> imageList;
- /**
- * processor used for symbols of an image
- */
- private SymbolsProcessor _symbolsProcessor = new SymbolsProcessor();
+ @Override
+ public void startElement(String name, Attributes attrs, Object callData) {
+ if (name.equals(IMAGE_TAG)) {
+ image.setName(validString(attrs.getValue(ATTR_IMAGENAME)));
+ image.setCount(Integer.parseInt(attrs.getValue(ATTR_COUNT)));
+ } else if (name.equals(SYMBOLS_TAG)) {
+ OprofileSAXHandler.getInstance(callData).push(_symbolsProcessor);
+ }
+ }
- @Override
- public void reset(Object callData) {
- image = new OpModelImage();
- imageList = new ArrayList<>();
- }
- @Override
- public void startElement(String name, Attributes attrs, Object callData) {
- if (name.equals(IMAGE_TAG)) {
- image.setName(validString(attrs.getValue(ATTR_IMAGENAME)));
- image.setCount(Integer.parseInt(attrs.getValue(ATTR_COUNT)));
- } else if (name.equals(SYMBOLS_TAG)) {
- OprofileSAXHandler.getInstance(callData).push(_symbolsProcessor);
- }
- }
- @Override
- public void endElement(String name, Object callData) {
- if (name.equals(IMAGE_TAG)) {
- imageList.add(image);
- image = new OpModelImage();
- } else if (name.equals(SYMBOLS_TAG)) {
- image.setSymbols(_symbolsProcessor.getSymbols());
- } else if (name.equals(DEPENDENT_TAG)) {
- OprofileSAXHandler.getInstance(callData).pop(DEPENDENT_TAG);
- }
- }
+ @Override
+ public void endElement(String name, Object callData) {
+ if (name.equals(IMAGE_TAG)) {
+ imageList.add(image);
+ image = new OpModelImage();
+ } else if (name.equals(SYMBOLS_TAG)) {
+ image.setSymbols(_symbolsProcessor.getSymbols());
+ } else if (name.equals(DEPENDENT_TAG)) {
+ OprofileSAXHandler.getInstance(callData).pop(DEPENDENT_TAG);
+ }
+ }
- public OpModelImage[] getImages() {
- OpModelImage[] images = new OpModelImage[imageList.size()];
- imageList.toArray(images);
- return images;
- }
+ public OpModelImage[] getImages() {
+ OpModelImage[] images = new OpModelImage[imageList.size()];
+ imageList.toArray(images);
+ return images;
+ }
}
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/opxml/modeldata/ModelDataAdapter.java b/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/opxml/modeldata/ModelDataAdapter.java
index 907ce1ed2d..9363ec1375 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/opxml/modeldata/ModelDataAdapter.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/opxml/modeldata/ModelDataAdapter.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2010 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2010, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Red Hat - initial API and implementation
@@ -29,348 +31,350 @@ import org.w3c.dom.NodeList;
import org.xml.sax.SAXException;
/**
- * This class takes the XML that is output from 'opreport -X --details' for
- * the current session, and uses that data to modify it into the format
- * expected by the SAX parser.
+ * This class takes the XML that is output from 'opreport -X --details' for the
+ * current session, and uses that data to modify it into the format expected by
+ * the SAX parser.
*/
public class ModelDataAdapter extends AbstractDataAdapter {
- public final static String ID = "id"; //$NON-NLS-1$
- public final static String IDREF = "idref"; //$NON-NLS-1$
- public final static String NAME = "name"; //$NON-NLS-1$
- public final static String COUNT = "count"; //$NON-NLS-1$
- public final static String SAMPLE = "sample"; //$NON-NLS-1$
- public final static String LINE = "line"; //$NON-NLS-1$
-
- public final static String SYMBOL_DATA = "symboldata"; //$NON-NLS-1$
- public final static String SYMBOL_DETAILS = "symboldetails"; //$NON-NLS-1$
- public final static String SYMBOL = "symbol"; //$NON-NLS-1$
-
- public final static String FILE = "file"; //$NON-NLS-1$
-
- public final static String SETUP = "setup"; //$NON-NLS-1$
- public final static String EVENT_SETUP = "eventsetup"; //$NON-NLS-1$
- public final static String TIMER_SETUP = "timersetup"; //$NON-NLS-1$
- public final static String SETUP_COUNT = "setupcount"; //$NON-NLS-1$
- public final static String EVENT_NAME = "eventname"; //$NON-NLS-1$
- public final static String RTC_INTERRUPTS = "rtcinterrupts"; //$NON-NLS-1$
-
- public final static String PROFILE = "profile"; //$NON-NLS-1$
- public final static String MODEL_DATA = "model-data"; //$NON-NLS-1$
-
- public final static String MODULE = "module"; //$NON-NLS-1$
- public final static String DEPENDENT = "dependent"; //$NON-NLS-1$
-
- public final static String BINARY = "binary"; //$NON-NLS-1$
- public final static String IMAGE = "image"; //$NON-NLS-1$
-
- public final static String SYMBOLS = "symbols"; //$NON-NLS-1$
- public final static String SYMBOL_TABLE = "symboltable"; //$NON-NLS-1$
- public final static String DETAIL_TABLE = "detailtable"; //$NON-NLS-1$
-
- public final static String DETAIL_DATA = "detaildata"; //$NON-NLS-1$
-
- private boolean isParseable;
- private Document newDoc; // the document we intend to build
- private Element oldRoot; // the root of the document with data from opreport
- private Element newRoot; // the root of the document we intent to build
-
- /**
- * Constructor to the ModelAdapter class
- * @param is The input stream to be parsed
- */
- public ModelDataAdapter(InputStream is) {
- isParseable = true;
- DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
- DocumentBuilder builder;
- try {
- builder = factory.newDocumentBuilder();
- try {
- Document oldDoc = builder.parse(is);
- Element elem = (Element) oldDoc.getElementsByTagName(PROFILE).item(0);
- oldRoot = elem;
-
- newDoc = builder.newDocument();
- newRoot = newDoc.createElement(MODEL_DATA);
- newDoc.appendChild(newRoot);
- } catch (IOException e) {
- isParseable = false;
- } catch (SAXException e) {
- isParseable = false;
- }
- } catch (ParserConfigurationException e1) {
- e1.printStackTrace();
- }
- }
-
- @Override
- public void process (){
- createXML();
- }
-
- private void createXML() {
-
- // get the binary name and the image count
- Element oldImage = (Element) oldRoot.getElementsByTagName(BINARY).item(0);
- Element newImage = newDoc.createElement(IMAGE);
-
- String binName = oldImage.getAttribute(NAME);
- newImage.setAttribute(NAME, binName);
-
- Element countTag = (Element) oldImage.getElementsByTagName(COUNT).item(0);
- String imageCount = countTag.getTextContent().trim();
- newImage.setAttribute(COUNT, imageCount);
-
- // There is no setup count in timer mode
- if (!InfoAdapter.hasTimerSupport()){
- // get the count that was used to profile
- Element setupTag = (Element) oldRoot.getElementsByTagName(SETUP).item(0);
- Element eventSetupTag = (Element) setupTag.getElementsByTagName(EVENT_SETUP).item(0);
- String setupcount = eventSetupTag.getAttribute(SETUP_COUNT);
- newImage.setAttribute(SETUP_COUNT, setupcount);
- }
-
- // these elements contain the data needed to populate the new symbol table
- Element oldSymbolTableTag = (Element) oldRoot.getElementsByTagName(SYMBOL_TABLE).item(0);
- NodeList oldSymbolDataList = oldSymbolTableTag.getElementsByTagName(SYMBOL_DATA);
-
- Element oldDetailTableTag = (Element) oldRoot.getElementsByTagName(DETAIL_TABLE).item(0);
- NodeList oldDetailTableList = oldDetailTableTag.getElementsByTagName(SYMBOL_DETAILS);
-
- // parse the data into HashMaps for O(1) lookup time, as opposed to O(n).
- HashMap<String, HashMap<String, String>> oldSymbolDataListMap = parseDataList (oldSymbolDataList);
- HashMap<String, NodeList> oldDetailTableListMap = parseDetailTable (oldDetailTableList);
-
- // An ArrayList to hold the binary and other modules
- ArrayList<Element> oldImageList = new ArrayList<>();
- // The first element is the original binary!
- oldImageList.add(oldImage);
-
- NodeList oldModuleList = oldImage.getElementsByTagName(MODULE);
- // Set up the dependent tag for any modules run by this binary
- Element dependentTag = newDoc.createElement(DEPENDENT);
- if (oldModuleList.getLength() > 0){
- dependentTag.setAttribute(COUNT, "0"); //$NON-NLS-1$
-
- for (int t = 0; t < oldModuleList.getLength(); t++){
- oldImageList.add((Element)oldModuleList.item(t));
- }
- }
-
- // iterate through all (binary/modules)
- for (Element oldImg : oldImageList) {
- Element newImg;
- if (oldImg.getTagName().equals(BINARY)){
- newImg = newImage;
- }else{
- newImg = newDoc.createElement(IMAGE);
-
- String imgName = oldImg.getAttribute(NAME);
- newImg.setAttribute(NAME, imgName);
-
- Element modCountTag = (Element) oldImg.getElementsByTagName(COUNT).item(0);
- String imgCount = modCountTag.getTextContent().trim();
- newImg.setAttribute(COUNT, imgCount);
- }
-
- Element newSymbolsTag = newDoc.createElement(SYMBOLS);
-
- // these elements contain the data needed to populate the new symbol table
- NodeList oldSymbolList = oldImg.getElementsByTagName(SYMBOL);
-
- // iterate through all symbols
- for (int i = 0; i < oldSymbolList.getLength(); i++) {
- Element oldSymbol = (Element) oldSymbolList.item(i);
-
- /**
- * The original binary is a parent for all symbols
- * We only want library function calls under their respective
- * modules, and not under the original binary as well.
- */
- if (!oldSymbol.getParentNode().isSameNode(oldImg)){
- continue;
- }
-
- Element newSymbol = newDoc.createElement(SYMBOL);
- String idref = oldSymbol.getAttribute(IDREF);
- String symbolCount = ((Element) oldSymbol.getElementsByTagName(COUNT).item(0)).getTextContent().trim();
- newSymbol.setAttribute(COUNT, symbolCount);
-
- // get the symboltable entry corresponding to the id of this symbol
- HashMap<String, String> symbolData = oldSymbolDataListMap.get(idref);
- newSymbol.setAttribute(NAME, symbolData.get(NAME));
- newSymbol.setAttribute(FILE, symbolData.get(FILE));
- newSymbol.setAttribute(LINE, symbolData.get(LINE));
-
- // get the symboldetails entry corresponding to the id of this symbol
- NodeList detailDataList = oldDetailTableListMap.get(idref);
-
- // go through the detail data of each symbol's details
- HashMap<String, Element> tmp = new HashMap<>();
- // temporary place to store the elements for sorting
- TreeSet<Element> sorted = new TreeSet<>(SAMPLE_COUNT_ORDER);
- for (int l = 0; l < detailDataList.getLength(); l++) {
-
- Element detailData = (Element) detailDataList.item(l);
- String sampleFile = detailData.getAttribute(FILE);
- String sampleLine = detailData.getAttribute(LINE);
-
- // The sample has a line number but no file
- // This means that the file is the same as the symbol (parent)
- if (sampleFile.equals("") && !sampleLine.isEmpty()){ //$NON-NLS-1$ $NON-NLS-2$
- sampleFile = symbolData.get(FILE);
- }else{
- if (sampleFile.equals("")){ //$NON-NLS-1$
- sampleFile = "??"; //$NON-NLS-1$
- }
- if (sampleLine.equals("")){ //$NON-NLS-1$
- sampleLine = "0"; //$NON-NLS-1$
- }
- }
- Element detailDataCount = (Element) detailData.getElementsByTagName(COUNT).item(0);
- String count = detailDataCount.getTextContent().trim();
-
- // if a sample at this line already exists then increase count for that line.
- if (tmp.containsKey(sampleLine)) {
- Element elem = (Element) tmp.get(sampleLine).getElementsByTagName(COUNT).item(0);
- int val = Integer.parseInt(elem.getTextContent().trim()) + Integer.parseInt(count);
- elem.setTextContent(String.valueOf(val));
- } else {
- Element sampleTag = newDoc.createElement(SAMPLE);
-
- Element fileTag = newDoc.createElement(FILE);
- fileTag.setTextContent(sampleFile);
-
- Element lineTag = newDoc.createElement(LINE);
- lineTag.setTextContent(sampleLine);
-
- Element sampleCountTag = newDoc.createElement(COUNT);
- sampleCountTag.setTextContent(count);
-
- sampleTag.appendChild(fileTag);
- sampleTag.appendChild(lineTag);
- sampleTag.appendChild(sampleCountTag);
-
- tmp.put(sampleLine, sampleTag);
- }
- }
-
- // add the elements to the sorter
- for (Element elem : tmp.values()) {
- sorted.add(elem);
- }
-
- // append the elements in sorted order
- for (Element e : sorted) {
- newSymbol.appendChild(e);
- }
-
- newSymbolsTag.appendChild(newSymbol);
- }
-
- newImg.appendChild(newSymbolsTag);
- // If this is a module, attach it to the dependent tag
- if (oldImg.getTagName().equals(MODULE)){
- dependentTag.appendChild(newImg);
- int currVal = Integer.parseInt(dependentTag.getAttribute(COUNT));
- int val = Integer.parseInt(newImg.getAttribute(COUNT));
- dependentTag.setAttribute(COUNT, String.valueOf(currVal + val));
- }else{
- newRoot.appendChild(newImg);
- }
- }
-
- if (oldModuleList.getLength() > 0){
- newImage.appendChild(dependentTag);
- }
-
- }
-
- /**
- *
- * @param oldDetailTableList the list of 'symboldetails' tags within detailtable
- * @return a HashMap where the key is a function id and the value is a NodeList
- * containing a list of the 'detaildata' tags that contain sample information.
- */
- private HashMap<String, NodeList> parseDetailTable(NodeList oldDetailTableList) {
- HashMap<String, NodeList> ret = new HashMap<> ();
- for (int i = 0; i < oldDetailTableList.getLength(); i++){
- Element symbolDetails = (Element) oldDetailTableList.item(i);
- String id = symbolDetails.getAttribute(ID);
- NodeList detailDataList = symbolDetails.getElementsByTagName(DETAIL_DATA);
- ret.put(id, detailDataList);
- }
- return ret;
- }
-
- /**
- *
- * @param oldSymbolDataList the list of 'symboldata' tags within symboltable
- * @return a Hashmap where the key is a function id and the value is a HashMap
- * with various parameters of data
- */
- private HashMap<String, HashMap<String, String>> parseDataList(NodeList oldSymbolDataList) {
- HashMap<String, HashMap<String,String>> ret = new HashMap<> ();
- for (int j = 0; j < oldSymbolDataList.getLength(); j++){
- HashMap<String,String> tmp = new HashMap<> ();
- Element symbolData = (Element) oldSymbolDataList.item(j);
- String id = symbolData.getAttribute(ID);
- String name = symbolData.getAttribute(NAME);
- String file = symbolData.getAttribute(FILE);
- if (file.equals("")){ //$NON-NLS-1$
- file = "??"; //$NON-NLS-1$
- }
- String line = symbolData.getAttribute(LINE);
- if (line.equals("")){ //$NON-NLS-1$
- line = "0"; //$NON-NLS-1$
- }
- tmp.put(NAME, name);
- tmp.put(FILE, file);
- tmp.put(LINE, line);
- ret.put(id, tmp);
- }
- return ret;
- }
-
- @Override
- public Document getDocument() {
- return newDoc;
- }
-
- /**
- * Helper class to sort the samples of a given symbol in descending order from largest
- * to smallest
- */
- private static final Comparator<Element> SAMPLE_COUNT_ORDER = new Comparator<Element>()
- {
- @Override
- public int compare(Element a, Element b) {
- // sort from largest to smallest count in descending order
- // items with the same count are sorted by line number from smallest
- // to largest in descending order
- Element a_countTag = (Element) a.getElementsByTagName(COUNT).item(0);
- Element b_countTag = (Element) b.getElementsByTagName(COUNT).item(0);
- Element a_LineTag = (Element) a.getElementsByTagName(LINE).item(0);
- Element b_LineTag = (Element) b.getElementsByTagName(LINE).item(0);
-
- Integer a_count = Integer.parseInt(a_countTag.getTextContent().trim());
- Integer b_count = Integer.parseInt(b_countTag.getTextContent().trim());
- Integer a_line = Integer.parseInt(a_LineTag.getTextContent().trim());
- Integer b_line = Integer.parseInt(b_LineTag.getTextContent().trim());
-
- if (a_count.compareTo(b_count) == 0){
- return a_line.compareTo(b_line);
- }
- return -a_count.compareTo(b_count);
- }
- };
-
- /**
- * Returns if parseable
- * @return isParseable boolean variable
- */
- public boolean isParseable() {
- return isParseable;
- }
+ public final static String ID = "id"; //$NON-NLS-1$
+ public final static String IDREF = "idref"; //$NON-NLS-1$
+ public final static String NAME = "name"; //$NON-NLS-1$
+ public final static String COUNT = "count"; //$NON-NLS-1$
+ public final static String SAMPLE = "sample"; //$NON-NLS-1$
+ public final static String LINE = "line"; //$NON-NLS-1$
+
+ public final static String SYMBOL_DATA = "symboldata"; //$NON-NLS-1$
+ public final static String SYMBOL_DETAILS = "symboldetails"; //$NON-NLS-1$
+ public final static String SYMBOL = "symbol"; //$NON-NLS-1$
+
+ public final static String FILE = "file"; //$NON-NLS-1$
+
+ public final static String SETUP = "setup"; //$NON-NLS-1$
+ public final static String EVENT_SETUP = "eventsetup"; //$NON-NLS-1$
+ public final static String TIMER_SETUP = "timersetup"; //$NON-NLS-1$
+ public final static String SETUP_COUNT = "setupcount"; //$NON-NLS-1$
+ public final static String EVENT_NAME = "eventname"; //$NON-NLS-1$
+ public final static String RTC_INTERRUPTS = "rtcinterrupts"; //$NON-NLS-1$
+
+ public final static String PROFILE = "profile"; //$NON-NLS-1$
+ public final static String MODEL_DATA = "model-data"; //$NON-NLS-1$
+
+ public final static String MODULE = "module"; //$NON-NLS-1$
+ public final static String DEPENDENT = "dependent"; //$NON-NLS-1$
+
+ public final static String BINARY = "binary"; //$NON-NLS-1$
+ public final static String IMAGE = "image"; //$NON-NLS-1$
+
+ public final static String SYMBOLS = "symbols"; //$NON-NLS-1$
+ public final static String SYMBOL_TABLE = "symboltable"; //$NON-NLS-1$
+ public final static String DETAIL_TABLE = "detailtable"; //$NON-NLS-1$
+
+ public final static String DETAIL_DATA = "detaildata"; //$NON-NLS-1$
+
+ private boolean isParseable;
+ private Document newDoc; // the document we intend to build
+ private Element oldRoot; // the root of the document with data from opreport
+ private Element newRoot; // the root of the document we intent to build
+
+ /**
+ * Constructor to the ModelAdapter class
+ *
+ * @param is The input stream to be parsed
+ */
+ public ModelDataAdapter(InputStream is) {
+ isParseable = true;
+ DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
+ DocumentBuilder builder;
+ try {
+ builder = factory.newDocumentBuilder();
+ try {
+ Document oldDoc = builder.parse(is);
+ Element elem = (Element) oldDoc.getElementsByTagName(PROFILE).item(0);
+ oldRoot = elem;
+
+ newDoc = builder.newDocument();
+ newRoot = newDoc.createElement(MODEL_DATA);
+ newDoc.appendChild(newRoot);
+ } catch (IOException e) {
+ isParseable = false;
+ } catch (SAXException e) {
+ isParseable = false;
+ }
+ } catch (ParserConfigurationException e1) {
+ e1.printStackTrace();
+ }
+ }
+
+ @Override
+ public void process() {
+ createXML();
+ }
+
+ private void createXML() {
+
+ // get the binary name and the image count
+ Element oldImage = (Element) oldRoot.getElementsByTagName(BINARY).item(0);
+ Element newImage = newDoc.createElement(IMAGE);
+
+ String binName = oldImage.getAttribute(NAME);
+ newImage.setAttribute(NAME, binName);
+
+ Element countTag = (Element) oldImage.getElementsByTagName(COUNT).item(0);
+ String imageCount = countTag.getTextContent().trim();
+ newImage.setAttribute(COUNT, imageCount);
+
+ // There is no setup count in timer mode
+ if (!InfoAdapter.hasTimerSupport()) {
+ // get the count that was used to profile
+ Element setupTag = (Element) oldRoot.getElementsByTagName(SETUP).item(0);
+ Element eventSetupTag = (Element) setupTag.getElementsByTagName(EVENT_SETUP).item(0);
+ String setupcount = eventSetupTag.getAttribute(SETUP_COUNT);
+ newImage.setAttribute(SETUP_COUNT, setupcount);
+ }
+
+ // these elements contain the data needed to populate the new symbol table
+ Element oldSymbolTableTag = (Element) oldRoot.getElementsByTagName(SYMBOL_TABLE).item(0);
+ NodeList oldSymbolDataList = oldSymbolTableTag.getElementsByTagName(SYMBOL_DATA);
+
+ Element oldDetailTableTag = (Element) oldRoot.getElementsByTagName(DETAIL_TABLE).item(0);
+ NodeList oldDetailTableList = oldDetailTableTag.getElementsByTagName(SYMBOL_DETAILS);
+
+ // parse the data into HashMaps for O(1) lookup time, as opposed to O(n).
+ HashMap<String, HashMap<String, String>> oldSymbolDataListMap = parseDataList(oldSymbolDataList);
+ HashMap<String, NodeList> oldDetailTableListMap = parseDetailTable(oldDetailTableList);
+
+ // An ArrayList to hold the binary and other modules
+ ArrayList<Element> oldImageList = new ArrayList<>();
+ // The first element is the original binary!
+ oldImageList.add(oldImage);
+
+ NodeList oldModuleList = oldImage.getElementsByTagName(MODULE);
+ // Set up the dependent tag for any modules run by this binary
+ Element dependentTag = newDoc.createElement(DEPENDENT);
+ if (oldModuleList.getLength() > 0) {
+ dependentTag.setAttribute(COUNT, "0"); //$NON-NLS-1$
+
+ for (int t = 0; t < oldModuleList.getLength(); t++) {
+ oldImageList.add((Element) oldModuleList.item(t));
+ }
+ }
+
+ // iterate through all (binary/modules)
+ for (Element oldImg : oldImageList) {
+ Element newImg;
+ if (oldImg.getTagName().equals(BINARY)) {
+ newImg = newImage;
+ } else {
+ newImg = newDoc.createElement(IMAGE);
+
+ String imgName = oldImg.getAttribute(NAME);
+ newImg.setAttribute(NAME, imgName);
+
+ Element modCountTag = (Element) oldImg.getElementsByTagName(COUNT).item(0);
+ String imgCount = modCountTag.getTextContent().trim();
+ newImg.setAttribute(COUNT, imgCount);
+ }
+
+ Element newSymbolsTag = newDoc.createElement(SYMBOLS);
+
+ // these elements contain the data needed to populate the new symbol table
+ NodeList oldSymbolList = oldImg.getElementsByTagName(SYMBOL);
+
+ // iterate through all symbols
+ for (int i = 0; i < oldSymbolList.getLength(); i++) {
+ Element oldSymbol = (Element) oldSymbolList.item(i);
+
+ /**
+ * The original binary is a parent for all symbols We only want library function
+ * calls under their respective modules, and not under the original binary as
+ * well.
+ */
+ if (!oldSymbol.getParentNode().isSameNode(oldImg)) {
+ continue;
+ }
+
+ Element newSymbol = newDoc.createElement(SYMBOL);
+ String idref = oldSymbol.getAttribute(IDREF);
+ String symbolCount = ((Element) oldSymbol.getElementsByTagName(COUNT).item(0)).getTextContent().trim();
+ newSymbol.setAttribute(COUNT, symbolCount);
+
+ // get the symboltable entry corresponding to the id of this symbol
+ HashMap<String, String> symbolData = oldSymbolDataListMap.get(idref);
+ newSymbol.setAttribute(NAME, symbolData.get(NAME));
+ newSymbol.setAttribute(FILE, symbolData.get(FILE));
+ newSymbol.setAttribute(LINE, symbolData.get(LINE));
+
+ // get the symboldetails entry corresponding to the id of this symbol
+ NodeList detailDataList = oldDetailTableListMap.get(idref);
+
+ // go through the detail data of each symbol's details
+ HashMap<String, Element> tmp = new HashMap<>();
+ // temporary place to store the elements for sorting
+ TreeSet<Element> sorted = new TreeSet<>(SAMPLE_COUNT_ORDER);
+ for (int l = 0; l < detailDataList.getLength(); l++) {
+
+ Element detailData = (Element) detailDataList.item(l);
+ String sampleFile = detailData.getAttribute(FILE);
+ String sampleLine = detailData.getAttribute(LINE);
+
+ // The sample has a line number but no file
+ // This means that the file is the same as the symbol (parent)
+ if (sampleFile.equals("") && !sampleLine.isEmpty()) { //$NON-NLS-1$ $NON-NLS-2$
+ sampleFile = symbolData.get(FILE);
+ } else {
+ if (sampleFile.equals("")) { //$NON-NLS-1$
+ sampleFile = "??"; //$NON-NLS-1$
+ }
+ if (sampleLine.equals("")) { //$NON-NLS-1$
+ sampleLine = "0"; //$NON-NLS-1$
+ }
+ }
+ Element detailDataCount = (Element) detailData.getElementsByTagName(COUNT).item(0);
+ String count = detailDataCount.getTextContent().trim();
+
+ // if a sample at this line already exists then increase count for that line.
+ if (tmp.containsKey(sampleLine)) {
+ Element elem = (Element) tmp.get(sampleLine).getElementsByTagName(COUNT).item(0);
+ int val = Integer.parseInt(elem.getTextContent().trim()) + Integer.parseInt(count);
+ elem.setTextContent(String.valueOf(val));
+ } else {
+ Element sampleTag = newDoc.createElement(SAMPLE);
+
+ Element fileTag = newDoc.createElement(FILE);
+ fileTag.setTextContent(sampleFile);
+
+ Element lineTag = newDoc.createElement(LINE);
+ lineTag.setTextContent(sampleLine);
+
+ Element sampleCountTag = newDoc.createElement(COUNT);
+ sampleCountTag.setTextContent(count);
+
+ sampleTag.appendChild(fileTag);
+ sampleTag.appendChild(lineTag);
+ sampleTag.appendChild(sampleCountTag);
+
+ tmp.put(sampleLine, sampleTag);
+ }
+ }
+
+ // add the elements to the sorter
+ for (Element elem : tmp.values()) {
+ sorted.add(elem);
+ }
+
+ // append the elements in sorted order
+ for (Element e : sorted) {
+ newSymbol.appendChild(e);
+ }
+
+ newSymbolsTag.appendChild(newSymbol);
+ }
+
+ newImg.appendChild(newSymbolsTag);
+ // If this is a module, attach it to the dependent tag
+ if (oldImg.getTagName().equals(MODULE)) {
+ dependentTag.appendChild(newImg);
+ int currVal = Integer.parseInt(dependentTag.getAttribute(COUNT));
+ int val = Integer.parseInt(newImg.getAttribute(COUNT));
+ dependentTag.setAttribute(COUNT, String.valueOf(currVal + val));
+ } else {
+ newRoot.appendChild(newImg);
+ }
+ }
+
+ if (oldModuleList.getLength() > 0) {
+ newImage.appendChild(dependentTag);
+ }
+
+ }
+
+ /**
+ *
+ * @param oldDetailTableList the list of 'symboldetails' tags within detailtable
+ * @return a HashMap where the key is a function id and the value is a NodeList
+ * containing a list of the 'detaildata' tags that contain sample
+ * information.
+ */
+ private HashMap<String, NodeList> parseDetailTable(NodeList oldDetailTableList) {
+ HashMap<String, NodeList> ret = new HashMap<>();
+ for (int i = 0; i < oldDetailTableList.getLength(); i++) {
+ Element symbolDetails = (Element) oldDetailTableList.item(i);
+ String id = symbolDetails.getAttribute(ID);
+ NodeList detailDataList = symbolDetails.getElementsByTagName(DETAIL_DATA);
+ ret.put(id, detailDataList);
+ }
+ return ret;
+ }
+
+ /**
+ *
+ * @param oldSymbolDataList the list of 'symboldata' tags within symboltable
+ * @return a Hashmap where the key is a function id and the value is a HashMap
+ * with various parameters of data
+ */
+ private HashMap<String, HashMap<String, String>> parseDataList(NodeList oldSymbolDataList) {
+ HashMap<String, HashMap<String, String>> ret = new HashMap<>();
+ for (int j = 0; j < oldSymbolDataList.getLength(); j++) {
+ HashMap<String, String> tmp = new HashMap<>();
+ Element symbolData = (Element) oldSymbolDataList.item(j);
+ String id = symbolData.getAttribute(ID);
+ String name = symbolData.getAttribute(NAME);
+ String file = symbolData.getAttribute(FILE);
+ if (file.equals("")) { //$NON-NLS-1$
+ file = "??"; //$NON-NLS-1$
+ }
+ String line = symbolData.getAttribute(LINE);
+ if (line.equals("")) { //$NON-NLS-1$
+ line = "0"; //$NON-NLS-1$
+ }
+ tmp.put(NAME, name);
+ tmp.put(FILE, file);
+ tmp.put(LINE, line);
+ ret.put(id, tmp);
+ }
+ return ret;
+ }
+
+ @Override
+ public Document getDocument() {
+ return newDoc;
+ }
+
+ /**
+ * Helper class to sort the samples of a given symbol in descending order from
+ * largest to smallest
+ */
+ private static final Comparator<Element> SAMPLE_COUNT_ORDER = new Comparator<Element>() {
+ @Override
+ public int compare(Element a, Element b) {
+ // sort from largest to smallest count in descending order
+ // items with the same count are sorted by line number from smallest
+ // to largest in descending order
+ Element a_countTag = (Element) a.getElementsByTagName(COUNT).item(0);
+ Element b_countTag = (Element) b.getElementsByTagName(COUNT).item(0);
+ Element a_LineTag = (Element) a.getElementsByTagName(LINE).item(0);
+ Element b_LineTag = (Element) b.getElementsByTagName(LINE).item(0);
+
+ Integer a_count = Integer.parseInt(a_countTag.getTextContent().trim());
+ Integer b_count = Integer.parseInt(b_countTag.getTextContent().trim());
+ Integer a_line = Integer.parseInt(a_LineTag.getTextContent().trim());
+ Integer b_line = Integer.parseInt(b_LineTag.getTextContent().trim());
+
+ if (a_count.compareTo(b_count) == 0) {
+ return a_line.compareTo(b_line);
+ }
+ return -a_count.compareTo(b_count);
+ }
+ };
+
+ /**
+ * Returns if parseable
+ *
+ * @return isParseable boolean variable
+ */
+ public boolean isParseable() {
+ return isParseable;
+ }
}
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/opxml/modeldata/ModelDataProcessor.java b/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/opxml/modeldata/ModelDataProcessor.java
index 5c85103ab0..d44a510786 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/opxml/modeldata/ModelDataProcessor.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/opxml/modeldata/ModelDataProcessor.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2004,2008 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2004, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Keith Seitz <keiths@redhat.com> - initial API and implementation
@@ -17,78 +19,80 @@ import org.eclipse.linuxtools.internal.oprofile.core.opxml.OprofileSAXHandler;
import org.eclipse.linuxtools.internal.oprofile.core.opxml.XMLProcessor;
import org.xml.sax.Attributes;
-
/**
* A processor for `opxml samples`.
*/
public class ModelDataProcessor extends XMLProcessor {
- //The resulting image compiled by the processor to be used by the caller.
- public static class CallData {
- public OpModelImage opModelImage;
- public CallData(OpModelImage im) { opModelImage = im; }
- }
+ // The resulting image compiled by the processor to be used by the caller.
+ public static class CallData {
+ public OpModelImage opModelImage;
+
+ public CallData(OpModelImage im) {
+ opModelImage = im;
+ }
+ }
- //XML tags parsed by this processor
- private static final String IMAGE_TAG = "image"; //$NON-NLS-1$
- private static final String SYMBOLS_TAG = "symbols"; //$NON-NLS-1$
- private static final String DEPENDENT_TAG = "dependent"; //$NON-NLS-1$
+ // XML tags parsed by this processor
+ private static final String IMAGE_TAG = "image"; //$NON-NLS-1$
+ private static final String SYMBOLS_TAG = "symbols"; //$NON-NLS-1$
+ private static final String DEPENDENT_TAG = "dependent"; //$NON-NLS-1$
- //attribute tags
- private static final String ATTR_IMAGENAME = "name"; //$NON-NLS-1$
- private static final String ATTR_COUNT = "count"; //$NON-NLS-1$
- private static final String ATTR_DEPCOUNT = "count"; //$NON-NLS-1$
+ // attribute tags
+ private static final String ATTR_IMAGENAME = "name"; //$NON-NLS-1$
+ private static final String ATTR_COUNT = "count"; //$NON-NLS-1$
+ private static final String ATTR_DEPCOUNT = "count"; //$NON-NLS-1$
- //the current image being constructed
- private OpModelImage image;
- private int imgSeen; //for ensuring image singleton-ness
+ // the current image being constructed
+ private OpModelImage image;
+ private int imgSeen; // for ensuring image singleton-ness
- //processors used for symbols and dependent images
- private SymbolsProcessor _symbolsProcessor = new SymbolsProcessor();
- private DependentProcessor _dependentProcessor = new DependentProcessor();
+ // processors used for symbols and dependent images
+ private SymbolsProcessor _symbolsProcessor = new SymbolsProcessor();
+ private DependentProcessor _dependentProcessor = new DependentProcessor();
+ @Override
+ public void reset(Object callData) {
+ image = ((CallData) callData).opModelImage;
+ imgSeen = 0;
+ }
- @Override
- public void reset(Object callData) {
- image = ((CallData) callData).opModelImage;
- imgSeen = 0;
- }
- @Override
- public void startElement(String name, Attributes attrs, Object callData) {
- if (name.equals(IMAGE_TAG)) {
- if (imgSeen == 0) {
- image.setName(validString(attrs.getValue(ATTR_IMAGENAME)));
- image.setCount(Integer.parseInt(attrs.getValue(ATTR_COUNT)));
- }
+ @Override
+ public void startElement(String name, Attributes attrs, Object callData) {
+ if (name.equals(IMAGE_TAG)) {
+ if (imgSeen == 0) {
+ image.setName(validString(attrs.getValue(ATTR_IMAGENAME)));
+ image.setCount(Integer.parseInt(attrs.getValue(ATTR_COUNT)));
+ }
- imgSeen++;
- } else if (name.equals(SYMBOLS_TAG)) {
- OprofileSAXHandler.getInstance(callData).push(_symbolsProcessor);
- } else if (name.equals(DEPENDENT_TAG)) {
- image.setDepCount(Integer.parseInt(attrs.getValue(ATTR_DEPCOUNT)));
- OprofileSAXHandler.getInstance(callData).push(_dependentProcessor);
- } else {
- super.startElement(name, attrs, callData);
- }
- }
+ imgSeen++;
+ } else if (name.equals(SYMBOLS_TAG)) {
+ OprofileSAXHandler.getInstance(callData).push(_symbolsProcessor);
+ } else if (name.equals(DEPENDENT_TAG)) {
+ image.setDepCount(Integer.parseInt(attrs.getValue(ATTR_DEPCOUNT)));
+ OprofileSAXHandler.getInstance(callData).push(_dependentProcessor);
+ } else {
+ super.startElement(name, attrs, callData);
+ }
+ }
- @Override
- public void endElement(String name, Object callData) {
- if (name.equals(IMAGE_TAG)) {
- if (imgSeen > 1) {
- //should only ever be one image, otherwise oprofile was run
- // outside of eclipse and the ui would not handle it properly
- image.setCount(OpModelImage.IMAGE_PARSE_ERROR);
- image.setDepCount(0);
- image.setDependents(null);
- image.setSymbols(null);
- image.setName(""); //$NON-NLS-1$
- }
- } else if (name.equals(SYMBOLS_TAG)){
- image.setSymbols(_symbolsProcessor.getSymbols());
- } else if (name.equals(DEPENDENT_TAG)){
- image.setDependents(_dependentProcessor.getImages());
- } else {
- super.endElement(name, callData);
- }
- }
+ @Override
+ public void endElement(String name, Object callData) {
+ if (name.equals(IMAGE_TAG)) {
+ if (imgSeen > 1) {
+ // should only ever be one image, otherwise oprofile was run
+ // outside of eclipse and the ui would not handle it properly
+ image.setCount(OpModelImage.IMAGE_PARSE_ERROR);
+ image.setDepCount(0);
+ image.setDependents(null);
+ image.setSymbols(null);
+ image.setName(""); //$NON-NLS-1$
+ }
+ } else if (name.equals(SYMBOLS_TAG)) {
+ image.setSymbols(_symbolsProcessor.getSymbols());
+ } else if (name.equals(DEPENDENT_TAG)) {
+ image.setDependents(_dependentProcessor.getImages());
+ } else {
+ super.endElement(name, callData);
+ }
+ }
}
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/opxml/modeldata/SamplesProcessor.java b/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/opxml/modeldata/SamplesProcessor.java
index 39372ce011..ab3272c6cb 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/opxml/modeldata/SamplesProcessor.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/opxml/modeldata/SamplesProcessor.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2008 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2008, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Kent Sebastian <ksebasti@redhat.com> - initial API and implementation
@@ -18,52 +20,52 @@ import org.eclipse.linuxtools.internal.oprofile.core.model.OpModelSample;
import org.eclipse.linuxtools.internal.oprofile.core.opxml.OprofileSAXHandler;
import org.eclipse.linuxtools.internal.oprofile.core.opxml.XMLProcessor;
-
/**
* XML handler class for <sample> tags (individual samples).
*/
public class SamplesProcessor extends XMLProcessor {
- //XML tags parsed by this processor
- private static final String SAMPLE_TAG = "sample"; //$NON-NLS-1$
- private static final String COUNT_TAG = "count"; //$NON-NLS-1$
- private static final String LINE_TAG = "line"; //$NON-NLS-1$
- private static final String SYMBOL_TAG = "symbol"; //$NON-NLS-1$
- private static final String FILE_TAG = "file"; //$NON-NLS-1$
+ // XML tags parsed by this processor
+ private static final String SAMPLE_TAG = "sample"; //$NON-NLS-1$
+ private static final String COUNT_TAG = "count"; //$NON-NLS-1$
+ private static final String LINE_TAG = "line"; //$NON-NLS-1$
+ private static final String SYMBOL_TAG = "symbol"; //$NON-NLS-1$
+ private static final String FILE_TAG = "file"; //$NON-NLS-1$
- //the current sample being constructed
- private OpModelSample sample;
- //a list of all samples (for this symbol)
- private ArrayList<OpModelSample> sampleList;
+ // the current sample being constructed
+ private OpModelSample sample;
+ // a list of all samples (for this symbol)
+ private ArrayList<OpModelSample> sampleList;
- @Override
- public void reset(Object callData) {
- sample = new OpModelSample();
- sampleList = new ArrayList<>();
- }
+ @Override
+ public void reset(Object callData) {
+ sample = new OpModelSample();
+ sampleList = new ArrayList<>();
+ }
- @Override
- public void endElement(String name, Object callData) {
- if (name.equals(COUNT_TAG)) {
- sample.setCount(Integer.parseInt(characters));
- } else if (name.equals(LINE_TAG)) {
- sample.setLine(Integer.parseInt(characters));
- } else if (name.equals(FILE_TAG)) {
- sample.setFilePath(characters);
- } else if (name.equals(SAMPLE_TAG)) {
- sampleList.add(sample);
- sample = new OpModelSample();
- } else if (name.equals(SYMBOL_TAG)) {
- OprofileSAXHandler.getInstance(callData).pop(SYMBOL_TAG);
- }
- }
+ @Override
+ public void endElement(String name, Object callData) {
+ if (name.equals(COUNT_TAG)) {
+ sample.setCount(Integer.parseInt(characters));
+ } else if (name.equals(LINE_TAG)) {
+ sample.setLine(Integer.parseInt(characters));
+ } else if (name.equals(FILE_TAG)) {
+ sample.setFilePath(characters);
+ } else if (name.equals(SAMPLE_TAG)) {
+ sampleList.add(sample);
+ sample = new OpModelSample();
+ } else if (name.equals(SYMBOL_TAG)) {
+ OprofileSAXHandler.getInstance(callData).pop(SYMBOL_TAG);
+ }
+ }
- /**
- * Return oprofile samples
- * @return samples An array of oprofile samples
- */
- public OpModelSample[] getSamples() {
- OpModelSample[] samples = new OpModelSample[sampleList.size()];
- sampleList.toArray(samples);
- return samples;
- }
+ /**
+ * Return oprofile samples
+ *
+ * @return samples An array of oprofile samples
+ */
+ public OpModelSample[] getSamples() {
+ OpModelSample[] samples = new OpModelSample[sampleList.size()];
+ sampleList.toArray(samples);
+ return samples;
+ }
}
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/opxml/modeldata/SymbolsProcessor.java b/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/opxml/modeldata/SymbolsProcessor.java
index d27a183995..6a78b272f8 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/opxml/modeldata/SymbolsProcessor.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/opxml/modeldata/SymbolsProcessor.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2008 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2008, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Kent Sebastian <ksebasti@redhat.com> - initial API and implementation
@@ -21,66 +23,67 @@ import org.xml.sax.Attributes;
* A processor for the <symbols> tag from `opxml samples ..`
*/
public class SymbolsProcessor extends XMLProcessor {
- //XML tags parsed by this processor
- private static final String SYMBOLS_TAG = "symbols"; //$NON-NLS-1$
- private static final String SYMBOL_TAG = "symbol"; //$NON-NLS-1$
- private static final String SAMPLE_TAG = "sample"; //$NON-NLS-1$
-
- //attribute tags
- private static final String ATTR_NAME = "name"; //$NON-NLS-1$
- private static final String ATTR_FILE = "file"; //$NON-NLS-1$
- private static final String ATTR_COUNT = "count"; //$NON-NLS-1$
- private static final String ATTR_LINE = "line"; //$NON-NLS-1$
+ // XML tags parsed by this processor
+ private static final String SYMBOLS_TAG = "symbols"; //$NON-NLS-1$
+ private static final String SYMBOL_TAG = "symbol"; //$NON-NLS-1$
+ private static final String SAMPLE_TAG = "sample"; //$NON-NLS-1$
- /**
- * The current symbol being constructed
- */
- private OpModelSymbol symbol;
- //all the symbols in this <symbols> tag, to be returned to the calling ModelDataProcessor
- private ArrayList<OpModelSymbol> symbols;
+ // attribute tags
+ private static final String ATTR_NAME = "name"; //$NON-NLS-1$
+ private static final String ATTR_FILE = "file"; //$NON-NLS-1$
+ private static final String ATTR_COUNT = "count"; //$NON-NLS-1$
+ private static final String ATTR_LINE = "line"; //$NON-NLS-1$
- /**
- * The processor used for individual samples
- */
- private SamplesProcessor samplesProcessor = new SamplesProcessor();
+ /**
+ * The current symbol being constructed
+ */
+ private OpModelSymbol symbol;
+ // all the symbols in this <symbols> tag, to be returned to the calling
+ // ModelDataProcessor
+ private ArrayList<OpModelSymbol> symbols;
+ /**
+ * The processor used for individual samples
+ */
+ private SamplesProcessor samplesProcessor = new SamplesProcessor();
- @Override
- public void reset(Object callData) {
- symbol = new OpModelSymbol();
- symbols = new ArrayList<>();
- }
+ @Override
+ public void reset(Object callData) {
+ symbol = new OpModelSymbol();
+ symbols = new ArrayList<>();
+ }
- @Override
- public void startElement(String name, Attributes attrs, Object callData) {
- if (name.equals(SYMBOL_TAG)) {
- symbol.setName(validString(attrs.getValue(ATTR_NAME)));
- symbol.setCount(Integer.parseInt(attrs.getValue(ATTR_COUNT)));
- symbol.setFilePath(validString(attrs.getValue(ATTR_FILE)));
- symbol.setLine(Integer.parseInt(attrs.getValue(ATTR_LINE)));
- } else if (name.equals(SAMPLE_TAG)) {
- OprofileSAXHandler.getInstance(callData).push(samplesProcessor);
- }
- }
+ @Override
+ public void startElement(String name, Attributes attrs, Object callData) {
+ if (name.equals(SYMBOL_TAG)) {
+ symbol.setName(validString(attrs.getValue(ATTR_NAME)));
+ symbol.setCount(Integer.parseInt(attrs.getValue(ATTR_COUNT)));
+ symbol.setFilePath(validString(attrs.getValue(ATTR_FILE)));
+ symbol.setLine(Integer.parseInt(attrs.getValue(ATTR_LINE)));
+ } else if (name.equals(SAMPLE_TAG)) {
+ OprofileSAXHandler.getInstance(callData).push(samplesProcessor);
+ }
+ }
- @Override
- public void endElement(String name, Object callData) {
- if (name.equals(SYMBOL_TAG)) {
- symbol.setSamples(samplesProcessor.getSamples());
- symbols.add(symbol);
- symbol = new OpModelSymbol();
- } else if (name.equals(SYMBOLS_TAG)) {
- OprofileSAXHandler.getInstance(callData).pop(SYMBOLS_TAG);
- }
- }
+ @Override
+ public void endElement(String name, Object callData) {
+ if (name.equals(SYMBOL_TAG)) {
+ symbol.setSamples(samplesProcessor.getSamples());
+ symbols.add(symbol);
+ symbol = new OpModelSymbol();
+ } else if (name.equals(SYMBOLS_TAG)) {
+ OprofileSAXHandler.getInstance(callData).pop(SYMBOLS_TAG);
+ }
+ }
- /**
- * Return all parsed samples
- * @return s the parsed symbols
- */
- public OpModelSymbol[] getSymbols() {
- OpModelSymbol [] s = new OpModelSymbol[symbols.size()];
- symbols.toArray(s);
- return s;
- }
+ /**
+ * Return all parsed samples
+ *
+ * @return s the parsed symbols
+ */
+ public OpModelSymbol[] getSymbols() {
+ OpModelSymbol[] s = new OpModelSymbol[symbols.size()];
+ symbols.toArray(s);
+ return s;
+ }
}
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/opxml/sessions/SessionManager.java b/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/opxml/sessions/SessionManager.java
index a231d3708f..a432538045 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/opxml/sessions/SessionManager.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/opxml/sessions/SessionManager.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2010 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2010, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Red Hat - initial API and implementation
@@ -61,8 +63,7 @@ public class SessionManager {
/**
* Session manager class constructor to manipulate the XML data
*
- * @param file
- * the xml file
+ * @param file the xml file
*/
public SessionManager(File file) {
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
@@ -88,10 +89,8 @@ public class SessionManager {
/**
* Add a session to the specified event element if it does not exist.
*
- * @param sessionName
- * the name of the session
- * @param eventName
- * the name of the event
+ * @param sessionName the name of the session
+ * @param eventName the name of the event
*/
public void addSession(String sessionName, String eventName) {
Element event = null;
@@ -114,8 +113,7 @@ public class SessionManager {
/**
* Check if a session exists
*
- * @param sessionName
- * the name of the session
+ * @param sessionName the name of the session
* @return true if the session exists, otherwise false
*/
public boolean existsSession(String sessionName) {
@@ -125,14 +123,10 @@ public class SessionManager {
/**
* Find an element in the XML
*
- * @param elem
- * the element to look under
- * @param tagName
- * the name of the tag
- * @param attName
- * the name of the attribute
- * @param attVal
- * the name of the attribute value
+ * @param elem the element to look under
+ * @param tagName the name of the tag
+ * @param attName the name of the attribute
+ * @param attVal the name of the attribute value
* @return the element that matches the search, or null if none is found.
*/
private Element find(Element elem, String tagName, String attName, String attVal) {
@@ -227,8 +221,7 @@ public class SessionManager {
/**
* Return a list of the events run with the given session
*
- * @param sessionName
- * the name of the session
+ * @param sessionName the name of the session
* @return A String ArrayList of event names that were run with the given
* session.
*/
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/opxml/sessions/SessionsProcessor.java b/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/opxml/sessions/SessionsProcessor.java
index e998d15de0..fd7602ebdf 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/opxml/sessions/SessionsProcessor.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/opxml/sessions/SessionsProcessor.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2004 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2004, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Keith Seitz <keiths@redhat.com> - initial API and implementation
@@ -17,77 +19,77 @@ import org.eclipse.linuxtools.internal.oprofile.core.model.OpModelSession;
import org.eclipse.linuxtools.internal.oprofile.core.opxml.XMLProcessor;
import org.xml.sax.Attributes;
-
/**
* A processor for sessions.
+ *
* @see org.eclipse.linuxtools.internal.oprofile.core.opxml.OpxmlRunner
*/
public class SessionsProcessor extends XMLProcessor {
- public static class SessionInfo {
- /**
- * A list of Session as well as Events under each of them
- */
- public ArrayList<OpModelSession> list;
+ public static class SessionInfo {
+ /**
+ * A list of Session as well as Events under each of them
+ */
+ public ArrayList<OpModelSession> list;
- public SessionInfo(ArrayList<OpModelSession> session){
- this.list = session;
- }
- }
+ public SessionInfo(ArrayList<OpModelSession> session) {
+ this.list = session;
+ }
+ }
- // XML tags recognized by this processor
- public static final String SESSION_TAG = "session"; //$NON-NLS-1$
- private static final String SESSION_NAME_ATTR = "name"; //$NON-NLS-1$
- public static final String SAMPLE_COUNT_TAG = "count"; //$NON-NLS-1$
- public static final String EVENT_TAG = "event"; //$NON-NLS-1$
- private static final String EVENT_NAME_ATTR = "name"; //$NON-NLS-1$
+ // XML tags recognized by this processor
+ public static final String SESSION_TAG = "session"; //$NON-NLS-1$
+ private static final String SESSION_NAME_ATTR = "name"; //$NON-NLS-1$
+ public static final String SAMPLE_COUNT_TAG = "count"; //$NON-NLS-1$
+ public static final String EVENT_TAG = "event"; //$NON-NLS-1$
+ private static final String EVENT_NAME_ATTR = "name"; //$NON-NLS-1$
- /**
- * The current session being constructed
- */
- private OpModelSession currentSession;
+ /**
+ * The current session being constructed
+ */
+ private OpModelSession currentSession;
- /**
- * The current event being constructed
- */
- private OpModelEvent currentEvent;
+ /**
+ * The current event being constructed
+ */
+ private OpModelEvent currentEvent;
- /**
- * A list of all sessions
- */
- private ArrayList<OpModelEvent> eventList;
+ /**
+ * A list of all sessions
+ */
+ private ArrayList<OpModelEvent> eventList;
- @Override
- public void startElement(String name, Attributes attrs, Object callData) {
- if (name.equals(SESSION_TAG)) {
- String sessionName = validString(attrs.getValue(SESSION_NAME_ATTR));
- currentSession = new OpModelSession(sessionName);
- eventList = new ArrayList<>();
- } else if (name.equals(EVENT_TAG)) {
- String eventName = attrs.getValue(EVENT_NAME_ATTR);
- currentEvent = new OpModelEvent(currentSession,eventName);
- } else {
- super.startElement(name, attrs, callData);
- }
- }
+ @Override
+ public void startElement(String name, Attributes attrs, Object callData) {
+ if (name.equals(SESSION_TAG)) {
+ String sessionName = validString(attrs.getValue(SESSION_NAME_ATTR));
+ currentSession = new OpModelSession(sessionName);
+ eventList = new ArrayList<>();
+ } else if (name.equals(EVENT_TAG)) {
+ String eventName = attrs.getValue(EVENT_NAME_ATTR);
+ currentEvent = new OpModelEvent(currentSession, eventName);
+ } else {
+ super.startElement(name, attrs, callData);
+ }
+ }
- @Override
- public void endElement(String name, Object callData) {
- if (name.equals(SESSION_TAG)) {
- // Got end of session -- save in session list
- OpModelEvent[] s = new OpModelEvent[eventList.size()];
- eventList.toArray(s);
- currentSession.setEvents(s);
- SessionInfo info = (SessionInfo) callData;
- info.list.add(currentSession);
- currentSession = null;
- eventList = null;
- } else if (name.equals(EVENT_TAG)) {
- // Got end of event -- save session list into current OpModelEvent and
- // save current event into call data
- eventList.add(currentEvent);
- currentEvent = null;
- } else {
- super.endElement(name, callData);
- }
- }
+ @Override
+ public void endElement(String name, Object callData) {
+ if (name.equals(SESSION_TAG)) {
+ // Got end of session -- save in session list
+ OpModelEvent[] s = new OpModelEvent[eventList.size()];
+ eventList.toArray(s);
+ currentSession.setEvents(s);
+ SessionInfo info = (SessionInfo) callData;
+ info.list.add(currentSession);
+ currentSession = null;
+ eventList = null;
+ } else if (name.equals(EVENT_TAG)) {
+ // Got end of event -- save session list into current OpModelEvent and
+ // save current event into call data
+ eventList.add(currentEvent);
+ currentEvent = null;
+ } else {
+ super.endElement(name, callData);
+ }
+ }
}
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.doc/pom.xml b/oprofile/org.eclipse.linuxtools.oprofile.doc/pom.xml
index 507646e27e..400b1a9a5f 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.doc/pom.xml
+++ b/oprofile/org.eclipse.linuxtools.oprofile.doc/pom.xml
@@ -1,11 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (C) 2011,2017 Red Hat, Inc.
+ Copyright (C) 2011, 2018 Red Hat, Inc.
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
+ This program and the accompanying materials are made
+ available under the terms of the Eclipse Public License 2.0
+ which is available at https://www.eclipse.org/legal/epl-2.0/
+
+ SPDX-License-Identifier: EPL-2.0
-->
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.launch.tests/plugin.properties b/oprofile/org.eclipse.linuxtools.oprofile.launch.tests/plugin.properties
index d656a77efb..a7eef039b2 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.launch.tests/plugin.properties
+++ b/oprofile/org.eclipse.linuxtools.oprofile.launch.tests/plugin.properties
@@ -1,9 +1,11 @@
#*******************************************************************************
-# Copyright (c) 2009 Red Hat, Inc.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
+# Copyright (c) 2009, 2018 Red Hat, Inc.
+#
+# This program and the accompanying materials are made
+# available under the terms of the Eclipse Public License 2.0
+# which is available at https://www.eclipse.org/legal/epl-2.0/
+#
+# SPDX-License-Identifier: EPL-2.0
#
# Contributors:
# Kent Sebastian <ksebasti@redhat.com> - initial API and implementation
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.launch.tests/pom.xml b/oprofile/org.eclipse.linuxtools.oprofile.launch.tests/pom.xml
index 5df21a7964..6c57a917e4 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.launch.tests/pom.xml
+++ b/oprofile/org.eclipse.linuxtools.oprofile.launch.tests/pom.xml
@@ -1,11 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (C) 2011, Red Hat, Inc.
+ Copyright (C) 2011, 2018 Red Hat, Inc.
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
+ This program and the accompanying materials are made
+ available under the terms of the Eclipse Public License 2.0
+ which is available at https://www.eclipse.org/legal/epl-2.0/
+
+ SPDX-License-Identifier: EPL-2.0
-->
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.launch.tests/src/org/eclipse/linuxtools/oprofile/launch/tests/AllLaunchTests.java b/oprofile/org.eclipse.linuxtools.oprofile.launch.tests/src/org/eclipse/linuxtools/oprofile/launch/tests/AllLaunchTests.java
index 3086b97659..ade92644e0 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.launch.tests/src/org/eclipse/linuxtools/oprofile/launch/tests/AllLaunchTests.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.launch.tests/src/org/eclipse/linuxtools/oprofile/launch/tests/AllLaunchTests.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Kent Sebastian <ksebasti@redhat.com> - initial API and implementation
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.launch.tests/src/org/eclipse/linuxtools/oprofile/launch/tests/TestLaunching.java b/oprofile/org.eclipse.linuxtools.oprofile.launch.tests/src/org/eclipse/linuxtools/oprofile/launch/tests/TestLaunching.java
index 996ead32cf..447ffd86a5 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.launch.tests/src/org/eclipse/linuxtools/oprofile/launch/tests/TestLaunching.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.launch.tests/src/org/eclipse/linuxtools/oprofile/launch/tests/TestLaunching.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Kent Sebastian <ksebasti@redhat.com> - initial API and implementation
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.launch.tests/src/org/eclipse/linuxtools/oprofile/launch/tests/TestLaunchingExternalProject.java b/oprofile/org.eclipse.linuxtools.oprofile.launch.tests/src/org/eclipse/linuxtools/oprofile/launch/tests/TestLaunchingExternalProject.java
index 5086bb1140..a1e2789dab 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.launch.tests/src/org/eclipse/linuxtools/oprofile/launch/tests/TestLaunchingExternalProject.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.launch.tests/src/org/eclipse/linuxtools/oprofile/launch/tests/TestLaunchingExternalProject.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2009, 2017 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Kent Sebastian <ksebasti@redhat.com> - initial API and implementation
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.launch.tests/src/org/eclipse/linuxtools/oprofile/launch/tests/TestSetup.java b/oprofile/org.eclipse.linuxtools.oprofile.launch.tests/src/org/eclipse/linuxtools/oprofile/launch/tests/TestSetup.java
index 5ab5b56feb..5a7c48616e 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.launch.tests/src/org/eclipse/linuxtools/oprofile/launch/tests/TestSetup.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.launch.tests/src/org/eclipse/linuxtools/oprofile/launch/tests/TestSetup.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Kent Sebastian <ksebasti@redhat.com> - initial API and implementation
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.launch.tests/src/org/eclipse/linuxtools/oprofile/launch/tests/utils/LaunchTestingOptions.java b/oprofile/org.eclipse.linuxtools.oprofile.launch.tests/src/org/eclipse/linuxtools/oprofile/launch/tests/utils/LaunchTestingOptions.java
index 1849cc6078..1e48cb43cc 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.launch.tests/src/org/eclipse/linuxtools/oprofile/launch/tests/utils/LaunchTestingOptions.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.launch.tests/src/org/eclipse/linuxtools/oprofile/launch/tests/utils/LaunchTestingOptions.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2013 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2013, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Red Hat - initial API and implementation
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.launch.tests/src/org/eclipse/linuxtools/oprofile/launch/tests/utils/OprofileTestingEventConfigTab.java b/oprofile/org.eclipse.linuxtools.oprofile.launch.tests/src/org/eclipse/linuxtools/oprofile/launch/tests/utils/OprofileTestingEventConfigTab.java
index ab9449aa0b..cac04d7446 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.launch.tests/src/org/eclipse/linuxtools/oprofile/launch/tests/utils/OprofileTestingEventConfigTab.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.launch.tests/src/org/eclipse/linuxtools/oprofile/launch/tests/utils/OprofileTestingEventConfigTab.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2013 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2013, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Red Hat - initial API and implementation
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.launch.tests/src/org/eclipse/linuxtools/oprofile/launch/tests/utils/TestingOprofileLaunchConfigurationDelegate.java b/oprofile/org.eclipse.linuxtools.oprofile.launch.tests/src/org/eclipse/linuxtools/oprofile/launch/tests/utils/TestingOprofileLaunchConfigurationDelegate.java
index 09f18dc2dc..11a83ee837 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.launch.tests/src/org/eclipse/linuxtools/oprofile/launch/tests/utils/TestingOprofileLaunchConfigurationDelegate.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.launch.tests/src/org/eclipse/linuxtools/oprofile/launch/tests/utils/TestingOprofileLaunchConfigurationDelegate.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2009, 2017 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Kent Sebastian <ksebasti@redhat.com> - initial API and implementation
@@ -23,9 +25,6 @@ import org.eclipse.linuxtools.internal.oprofile.launch.launching.OprofileLaunchC
/**
* Helper delegate class
- *
- * @author Red Hat Inc.
- *
*/
public final class TestingOprofileLaunchConfigurationDelegate extends
OprofileLaunchConfigurationDelegate {
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.launch/plugin.properties b/oprofile/org.eclipse.linuxtools.oprofile.launch/plugin.properties
index 3a2afa4203..211586e926 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.launch/plugin.properties
+++ b/oprofile/org.eclipse.linuxtools.oprofile.launch/plugin.properties
@@ -1,9 +1,11 @@
#*******************************************************************************
-# Copyright (c) 2008 Red Hat, Inc.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
+# Copyright (c) 2008, 2018 Red Hat, Inc.
+#
+# This program and the accompanying materials are made
+# available under the terms of the Eclipse Public License 2.0
+# which is available at https://www.eclipse.org/legal/epl-2.0/
+#
+# SPDX-License-Identifier: EPL-2.0
#
# Contributors:
# Red Hat, Inc. - initial API and implementation
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.launch/pom.xml b/oprofile/org.eclipse.linuxtools.oprofile.launch/pom.xml
index f4e427be11..b1d11730bf 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.launch/pom.xml
+++ b/oprofile/org.eclipse.linuxtools.oprofile.launch/pom.xml
@@ -1,11 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (C) 2011, Red Hat, Inc.
+ Copyright (C) 2011, 2018 Red Hat, Inc.
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
+ This program and the accompanying materials are made
+ available under the terms of the Eclipse Public License 2.0
+ which is available at https://www.eclipse.org/legal/epl-2.0/
+
+ SPDX-License-Identifier: EPL-2.0
-->
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/internal/oprofile/launch/OprofileLaunchMessages.java b/oprofile/org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/internal/oprofile/launch/OprofileLaunchMessages.java
index 9e95dc8401..db4682deba 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/internal/oprofile/launch/OprofileLaunchMessages.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/internal/oprofile/launch/OprofileLaunchMessages.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2004 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2004, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Keith Seitz <keiths@redhat.com> - initial API and implementation
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/internal/oprofile/launch/OprofileLaunchPlugin.java b/oprofile/org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/internal/oprofile/launch/OprofileLaunchPlugin.java
index 522bfd0d26..300ed93fbc 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/internal/oprofile/launch/OprofileLaunchPlugin.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/internal/oprofile/launch/OprofileLaunchPlugin.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2004, 2008, 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2004, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Keith Seitz <keiths@redhat.com> - initial API and implementation
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/internal/oprofile/launch/configuration/AbstractEventConfigTab.java b/oprofile/org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/internal/oprofile/launch/configuration/AbstractEventConfigTab.java
index 6d2b62839c..ec61d8babd 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/internal/oprofile/launch/configuration/AbstractEventConfigTab.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/internal/oprofile/launch/configuration/AbstractEventConfigTab.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2012, 2017 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2012, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Red Hat initial API and implementation
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/internal/oprofile/launch/configuration/EventConfigCache.java b/oprofile/org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/internal/oprofile/launch/configuration/EventConfigCache.java
index 7d78855d3f..2dd0976423 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/internal/oprofile/launch/configuration/EventConfigCache.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/internal/oprofile/launch/configuration/EventConfigCache.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2008, 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2008, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Kent Sebastian <ksebasti@redhat.com> - initial API and implementation
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/internal/oprofile/launch/configuration/LaunchOptions.java b/oprofile/org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/internal/oprofile/launch/configuration/LaunchOptions.java
index 6364feae6d..d9ea4bcb61 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/internal/oprofile/launch/configuration/LaunchOptions.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/internal/oprofile/launch/configuration/LaunchOptions.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2004,2017 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2004, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Keith Seitz <keiths@redhat.com> - initial API and implementation
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/internal/oprofile/launch/configuration/OprofileCounter.java b/oprofile/org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/internal/oprofile/launch/configuration/OprofileCounter.java
index b76a589600..2eb816feb4 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/internal/oprofile/launch/configuration/OprofileCounter.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/internal/oprofile/launch/configuration/OprofileCounter.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2004, 2017 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2004, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Keith Seitz <keiths@redhat.com> - initial API and implementation
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/internal/oprofile/launch/configuration/OprofileEventConfigTab.java b/oprofile/org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/internal/oprofile/launch/configuration/OprofileEventConfigTab.java
index 4e021aab87..e280d624bf 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/internal/oprofile/launch/configuration/OprofileEventConfigTab.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/internal/oprofile/launch/configuration/OprofileEventConfigTab.java
@@ -1,22 +1,15 @@
/*******************************************************************************
- * Copyright (c) 2004, 2008, 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2004, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Keith Seitz <keiths@redhat.com> - initial API and implementation
* Kent Sebastian <ksebasti@redhat.com> -
- *
- * CounterSubTab Contributors:
- * Keith Seitz <keiths@redhat.com> - initial API and implementation (before subclassing)
- * Kent Sebastian <ksebasti@redhat.com> - turned into a sub class,
- * changed layouts, fixed up some interactivity issues, ..
- *
- * UnitMaskViewer Contributors:
- * Keith Seitz <keiths@redhat.com> - initial API and implementation
- * Kent Sebastian <ksebasti@redhat.com>
*******************************************************************************/
package org.eclipse.linuxtools.internal.oprofile.launch.configuration;
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/internal/oprofile/launch/configuration/OprofileLaunchConfigurationTabGroup.java b/oprofile/org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/internal/oprofile/launch/configuration/OprofileLaunchConfigurationTabGroup.java
index 811d166d2e..4bb0ec9a49 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/internal/oprofile/launch/configuration/OprofileLaunchConfigurationTabGroup.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/internal/oprofile/launch/configuration/OprofileLaunchConfigurationTabGroup.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2008 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2008, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Kent Sebastian <ksebasti@redhat.com> - initial API and implementation
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/internal/oprofile/launch/configuration/OprofileSetupTab.java b/oprofile/org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/internal/oprofile/launch/configuration/OprofileSetupTab.java
index 69364af894..03c157bf74 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/internal/oprofile/launch/configuration/OprofileSetupTab.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/internal/oprofile/launch/configuration/OprofileSetupTab.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2004,2017 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2004, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Keith Seitz <keiths@redhat.com> - initial API and implementation
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/internal/oprofile/launch/launching/AbstractOprofileLaunchConfigurationDelegate.java b/oprofile/org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/internal/oprofile/launch/launching/AbstractOprofileLaunchConfigurationDelegate.java
index 44981b95fd..8b908846fa 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/internal/oprofile/launch/launching/AbstractOprofileLaunchConfigurationDelegate.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/internal/oprofile/launch/launching/AbstractOprofileLaunchConfigurationDelegate.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2004, 2008, 2009 Red Hat, Inc. and others
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2004, 2018 Red Hat, Inc. and others
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Kent Sebastian <ksebasti@redhat.com> - initial API and implementation
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/internal/oprofile/launch/launching/OprofileLaunchConfigurationDelegate.java b/oprofile/org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/internal/oprofile/launch/launching/OprofileLaunchConfigurationDelegate.java
index 24cae8571c..fc1748cf9c 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/internal/oprofile/launch/launching/OprofileLaunchConfigurationDelegate.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/internal/oprofile/launch/launching/OprofileLaunchConfigurationDelegate.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc. and others
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2018 Red Hat, Inc. and others
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Kent Sebastian <ksebasti@redhat.com> - initial API and implementation
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/internal/oprofile/launch/launching/OprofileLaunchShortcut.java b/oprofile/org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/internal/oprofile/launch/launching/OprofileLaunchShortcut.java
index 1d835bc2f9..440ae8cc53 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/internal/oprofile/launch/launching/OprofileLaunchShortcut.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/internal/oprofile/launch/launching/OprofileLaunchShortcut.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2008 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2008, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Kent Sebastian <ksebasti@redhat.com> - initial API and implementation
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/internal/oprofile/launch/oprofilelaunch.properties b/oprofile/org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/internal/oprofile/launch/oprofilelaunch.properties
index da6b41fc64..3d53608268 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/internal/oprofile/launch/oprofilelaunch.properties
+++ b/oprofile/org.eclipse.linuxtools.oprofile.launch/src/org/eclipse/linuxtools/internal/oprofile/launch/oprofilelaunch.properties
@@ -1,9 +1,11 @@
#####################################################################
-# Copyright (c) 2004,2008 Red Hat, Inc.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
+# Copyright (c) 2004, 2018 Red Hat, Inc.
+#
+# This program and the accompanying materials are made
+# available under the terms of the Eclipse Public License 2.0
+# which is available at https://www.eclipse.org/legal/epl-2.0/
+#
+# SPDX-License-Identifier: EPL-2.0
#
# Contributors:
# Keith Seitz <keiths@redhat.com> - initial implementation
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.remote-feature/feature.properties b/oprofile/org.eclipse.linuxtools.oprofile.remote-feature/feature.properties
index bbf9b3db3b..903b0deab5 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.remote-feature/feature.properties
+++ b/oprofile/org.eclipse.linuxtools.oprofile.remote-feature/feature.properties
@@ -1,9 +1,11 @@
#*******************************************************************************
-# Copyright (c) 2008 Red Hat, Inc.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
+# Copyright (c) 2008, 2018 Red Hat, Inc.
+#
+# This program and the accompanying materials are made
+# available under the terms of the Eclipse Public License 2.0
+# which is available at https://www.eclipse.org/legal/epl-2.0/
+#
+# SPDX-License-Identifier: EPL-2.0
#
# Contributors:
# Red Hat, Inc. - initial API and implementation
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.remote-feature/pom.xml b/oprofile/org.eclipse.linuxtools.oprofile.remote-feature/pom.xml
index 0375a0fd21..326641fb67 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.remote-feature/pom.xml
+++ b/oprofile/org.eclipse.linuxtools.oprofile.remote-feature/pom.xml
@@ -1,11 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (C) 2011, Red Hat, Inc.
+ Copyright (C) 2011, 2018 Red Hat, Inc.
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
-->
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.remote.launch/plugin.properties b/oprofile/org.eclipse.linuxtools.oprofile.remote.launch/plugin.properties
index 655c55d4fa..d1746e6e06 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.remote.launch/plugin.properties
+++ b/oprofile/org.eclipse.linuxtools.oprofile.remote.launch/plugin.properties
@@ -1,9 +1,11 @@
#*******************************************************************************
-# Copyright (c) 2008 Red Hat, Inc.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
+# Copyright (c) 2008, 2018 Red Hat, Inc.
+#
+# This program and the accompanying materials are made
+# available under the terms of the Eclipse Public License 2.0
+# which is available at https://www.eclipse.org/legal/epl-2.0/
+#
+# SPDX-License-Identifier: EPL-2.0
#
# Contributors:
# Red Hat, Inc. - initial API and implementation
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.remote.launch/src/org/eclipse/linuxtools/internal/oprofile/remote/launch/configuration/OprofileRemoteLaunchConfigurationTabGroup.java b/oprofile/org.eclipse.linuxtools.oprofile.remote.launch/src/org/eclipse/linuxtools/internal/oprofile/remote/launch/configuration/OprofileRemoteLaunchConfigurationTabGroup.java
index d7bfa8d383..a6610ab360 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.remote.launch/src/org/eclipse/linuxtools/internal/oprofile/remote/launch/configuration/OprofileRemoteLaunchConfigurationTabGroup.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.remote.launch/src/org/eclipse/linuxtools/internal/oprofile/remote/launch/configuration/OprofileRemoteLaunchConfigurationTabGroup.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2012 IBM Corporation
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2012, 2018 IBM Corporation
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Rafael Medeiros Teixeira <rafaelmt@linux.vnet.ibm.com> - initial API and implementation
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.remote.launch/src/org/eclipse/linuxtools/internal/oprofile/remote/launch/launching/OprofileRemoteLaunchConfigurationDelegate.java b/oprofile/org.eclipse.linuxtools.oprofile.remote.launch/src/org/eclipse/linuxtools/internal/oprofile/remote/launch/launching/OprofileRemoteLaunchConfigurationDelegate.java
index 628d0214df..13456b121f 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.remote.launch/src/org/eclipse/linuxtools/internal/oprofile/remote/launch/launching/OprofileRemoteLaunchConfigurationDelegate.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.remote.launch/src/org/eclipse/linuxtools/internal/oprofile/remote/launch/launching/OprofileRemoteLaunchConfigurationDelegate.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2012 IBM Corporation
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2012, 2018 IBM Corporation
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Rafael Medeiros Teixeira <rafaelmt@linux.vnet.ibm.com> - initial API and implementation
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.tests/plugin.properties b/oprofile/org.eclipse.linuxtools.oprofile.tests/plugin.properties
index f8a1718df2..248a2e4b18 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.tests/plugin.properties
+++ b/oprofile/org.eclipse.linuxtools.oprofile.tests/plugin.properties
@@ -1,9 +1,11 @@
#*******************************************************************************
-# Copyright (c) 2009 Red Hat, Inc.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
+# Copyright (c) 2009, 2018 Red Hat, Inc.
+#
+# This program and the accompanying materials are made
+# available under the terms of the Eclipse Public License 2.0
+# which is available at https://www.eclipse.org/legal/epl-2.0/
+#
+# SPDX-License-Identifier: EPL-2.0
#
# Contributors:
# Kent Sebastian <ksebasti@redhat.com> - initial API and implementation
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.tests/pom.xml b/oprofile/org.eclipse.linuxtools.oprofile.tests/pom.xml
index edc9b43e5f..da1b9acf6b 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.tests/pom.xml
+++ b/oprofile/org.eclipse.linuxtools.oprofile.tests/pom.xml
@@ -1,11 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (C) 2011, Red Hat, Inc.
+ Copyright (C) 2011, 2018 Red Hat, Inc.
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
-->
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.tests/src/org/eclipse/linuxtools/oprofile/tests/TestPlugin.java b/oprofile/org.eclipse.linuxtools.oprofile.tests/src/org/eclipse/linuxtools/oprofile/tests/TestPlugin.java
index 4ca9f2eab1..a36edc2c4b 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.tests/src/org/eclipse/linuxtools/oprofile/tests/TestPlugin.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.tests/src/org/eclipse/linuxtools/oprofile/tests/TestPlugin.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Kent Sebastian <ksebasti@redhat.com> - initial API and implementation
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.tests/src/org/eclipse/linuxtools/oprofile/tests/TestingOpModelEvent.java b/oprofile/org.eclipse.linuxtools.oprofile.tests/src/org/eclipse/linuxtools/oprofile/tests/TestingOpModelEvent.java
index 9b208d8ec0..f5b397bb7a 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.tests/src/org/eclipse/linuxtools/oprofile/tests/TestingOpModelEvent.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.tests/src/org/eclipse/linuxtools/oprofile/tests/TestingOpModelEvent.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Kent Sebastian <ksebasti@redhat.com> - initial API and implementation
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.tests/src/org/eclipse/linuxtools/oprofile/tests/TestingOpModelEvent2.java b/oprofile/org.eclipse.linuxtools.oprofile.tests/src/org/eclipse/linuxtools/oprofile/tests/TestingOpModelEvent2.java
index 7e18a7d051..62444c0a60 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.tests/src/org/eclipse/linuxtools/oprofile/tests/TestingOpModelEvent2.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.tests/src/org/eclipse/linuxtools/oprofile/tests/TestingOpModelEvent2.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Kent Sebastian <ksebasti@redhat.com> - initial API and implementation
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.tests/src/org/eclipse/linuxtools/oprofile/tests/TestingOpModelEvent3.java b/oprofile/org.eclipse.linuxtools.oprofile.tests/src/org/eclipse/linuxtools/oprofile/tests/TestingOpModelEvent3.java
index 8f92ac4006..a586296052 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.tests/src/org/eclipse/linuxtools/oprofile/tests/TestingOpModelEvent3.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.tests/src/org/eclipse/linuxtools/oprofile/tests/TestingOpModelEvent3.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Kent Sebastian <ksebasti@redhat.com> - initial API and implementation
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.tests/src/org/eclipse/linuxtools/oprofile/tests/TestingOpModelEvent4.java b/oprofile/org.eclipse.linuxtools.oprofile.tests/src/org/eclipse/linuxtools/oprofile/tests/TestingOpModelEvent4.java
index 824369d9df..d6a5100fae 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.tests/src/org/eclipse/linuxtools/oprofile/tests/TestingOpModelEvent4.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.tests/src/org/eclipse/linuxtools/oprofile/tests/TestingOpModelEvent4.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Kent Sebastian <ksebasti@redhat.com> - initial API and implementation
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.tests/src/org/eclipse/linuxtools/oprofile/tests/TestingOpModelRoot.java b/oprofile/org.eclipse.linuxtools.oprofile.tests/src/org/eclipse/linuxtools/oprofile/tests/TestingOpModelRoot.java
index b5dfae1ed6..c0ac2ef0ee 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.tests/src/org/eclipse/linuxtools/oprofile/tests/TestingOpModelRoot.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.tests/src/org/eclipse/linuxtools/oprofile/tests/TestingOpModelRoot.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Kent Sebastian <ksebasti@redhat.com> - initial API and implementation
@@ -33,10 +35,6 @@ public class TestingOpModelRoot extends OpModelRoot {
new TestingOpModelEvent2(e[1], NAME_E2_S2),
new TestingOpModelEvent3(e[1], NAME_E2_S3),
new TestingOpModelEvent4(e[1], NAME_E2_S4)});
-
-
-
-
return e;
}
}
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.ui.tests/plugin.properties b/oprofile/org.eclipse.linuxtools.oprofile.ui.tests/plugin.properties
index d656a77efb..a7eef039b2 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.ui.tests/plugin.properties
+++ b/oprofile/org.eclipse.linuxtools.oprofile.ui.tests/plugin.properties
@@ -1,9 +1,11 @@
#*******************************************************************************
-# Copyright (c) 2009 Red Hat, Inc.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
+# Copyright (c) 2009, 2018 Red Hat, Inc.
+#
+# This program and the accompanying materials are made
+# available under the terms of the Eclipse Public License 2.0
+# which is available at https://www.eclipse.org/legal/epl-2.0/
+#
+# SPDX-License-Identifier: EPL-2.0
#
# Contributors:
# Kent Sebastian <ksebasti@redhat.com> - initial API and implementation
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.ui.tests/pom.xml b/oprofile/org.eclipse.linuxtools.oprofile.ui.tests/pom.xml
index 3f1666915e..4bb472cf52 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.ui.tests/pom.xml
+++ b/oprofile/org.eclipse.linuxtools.oprofile.ui.tests/pom.xml
@@ -1,11 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (C) 2011, Red Hat, Inc.
+ Copyright (C) 2011, 2018 Red Hat, Inc.
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
+ This program and the accompanying materials are made
+ available under the terms of the Eclipse Public License 2.0
+ which is available at https://www.eclipse.org/legal/epl-2.0/
+
+ SPDX-License-Identifier: EPL-2.0
-->
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.ui.tests/src/org/eclipse/linuxtools/oprofile/ui/tests/TestUiDataModel.java b/oprofile/org.eclipse.linuxtools.oprofile.ui.tests/src/org/eclipse/linuxtools/oprofile/ui/tests/TestUiDataModel.java
index c9101fc838..23c5d42cf1 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.ui.tests/src/org/eclipse/linuxtools/oprofile/ui/tests/TestUiDataModel.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.ui.tests/src/org/eclipse/linuxtools/oprofile/ui/tests/TestUiDataModel.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Kent Sebastian <ksebasti@redhat.com> - initial API and implementation
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.ui/plugin.properties b/oprofile/org.eclipse.linuxtools.oprofile.ui/plugin.properties
index 1c41e9918e..c50ac740c2 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.ui/plugin.properties
+++ b/oprofile/org.eclipse.linuxtools.oprofile.ui/plugin.properties
@@ -1,9 +1,11 @@
#*******************************************************************************
-# Copyright (c) 2004, 2008 Red Hat, Inc.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
+# Copyright (c) 2004, 2018 Red Hat, Inc.
+#
+# This program and the accompanying materials are made
+# available under the terms of the Eclipse Public License 2.0
+# which is available at https://www.eclipse.org/legal/epl-2.0/
+#
+# SPDX-License-Identifier: EPL-2.0
#
# Contributors:
# Red Hat, Inc. - initial API and implementation
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.ui/pom.xml b/oprofile/org.eclipse.linuxtools.oprofile.ui/pom.xml
index 96875f6ad1..995c66b075 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.ui/pom.xml
+++ b/oprofile/org.eclipse.linuxtools.oprofile.ui/pom.xml
@@ -1,11 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (C) 2011, Red Hat, Inc.
+ Copyright (C) 2011, 2018 Red Hat, Inc.
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
+ This program and the accompanying materials are made
+ available under the terms of the Eclipse Public License 2.0
+ which is available at https://www.eclipse.org/legal/epl-2.0/
+
+ SPDX-License-Identifier: EPL-2.0
-->
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/internal/oprofile/ui/OprofileUiMessages.java b/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/internal/oprofile/ui/OprofileUiMessages.java
index 476daba459..222e0fd628 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/internal/oprofile/ui/OprofileUiMessages.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/internal/oprofile/ui/OprofileUiMessages.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2004 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2004, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Keith Seitz <keiths@redhat.com> - initial API and implementation
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/internal/oprofile/ui/OprofileUiPlugin.java b/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/internal/oprofile/ui/OprofileUiPlugin.java
index 9bb06e7f66..a25b43338e 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/internal/oprofile/ui/OprofileUiPlugin.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/internal/oprofile/ui/OprofileUiPlugin.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2004, 2008, 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2004, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Keith Seitz <keiths@redhat.com> - initial API and implementation
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/internal/oprofile/ui/oprofileui.properties b/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/internal/oprofile/ui/oprofileui.properties
index a8f24cdc65..270bbaf981 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/internal/oprofile/ui/oprofileui.properties
+++ b/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/internal/oprofile/ui/oprofileui.properties
@@ -1,9 +1,11 @@
######################################################################
-# Copyright (c) 2004,2008 Red Hat, Inc.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
+# Copyright (c) 2004, 2018 Red Hat, Inc.
+#
+# This program and the accompanying materials are made
+# available under the terms of the Eclipse Public License 2.0
+# which is available at https://www.eclipse.org/legal/epl-2.0/
+#
+# SPDX-License-Identifier: EPL-2.0
#
# Contributors:
# Keith Seitz <keiths@redhat.com> - initial implementation
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/internal/oprofile/ui/view/OcountView.java b/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/internal/oprofile/ui/view/OcountView.java
index aaaca711bd..148b822b93 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/internal/oprofile/ui/view/OcountView.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/internal/oprofile/ui/view/OcountView.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2015 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2015, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Red Hat Inc - initial API and implementation
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/internal/oprofile/ui/view/OprofileView.java b/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/internal/oprofile/ui/view/OprofileView.java
index c3769ee517..910e3b5edc 100755
--- a/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/internal/oprofile/ui/view/OprofileView.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/internal/oprofile/ui/view/OprofileView.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2008, 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2008, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Kent Sebastian <ksebasti@redhat.com> - initial API and implementation
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/internal/oprofile/ui/view/OprofileViewContentProvider.java b/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/internal/oprofile/ui/view/OprofileViewContentProvider.java
index 108acf954f..781dc34a63 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/internal/oprofile/ui/view/OprofileViewContentProvider.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/internal/oprofile/ui/view/OprofileViewContentProvider.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2008 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2008, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Kent Sebastian <ksebasti@redhat.com> - initial API and implementation,
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/internal/oprofile/ui/view/OprofileViewDeleteSessionAction.java b/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/internal/oprofile/ui/view/OprofileViewDeleteSessionAction.java
index 9c382ec1cc..10fa928045 100755
--- a/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/internal/oprofile/ui/view/OprofileViewDeleteSessionAction.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/internal/oprofile/ui/view/OprofileViewDeleteSessionAction.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2010, 2017 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2010, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Red Hat - initial API and implementation
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/internal/oprofile/ui/view/OprofileViewDoubleClickListener.java b/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/internal/oprofile/ui/view/OprofileViewDoubleClickListener.java
index 9f1c58d886..43f18a1aa1 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/internal/oprofile/ui/view/OprofileViewDoubleClickListener.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/internal/oprofile/ui/view/OprofileViewDoubleClickListener.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2008, 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2008, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Kent Sebastian <ksebasti@redhat.com> - initial API and implementation
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/internal/oprofile/ui/view/OprofileViewLabelProvider.java b/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/internal/oprofile/ui/view/OprofileViewLabelProvider.java
index 29ff9a1195..9bbaba26c9 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/internal/oprofile/ui/view/OprofileViewLabelProvider.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/internal/oprofile/ui/view/OprofileViewLabelProvider.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2008 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2008, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Kent Sebastian <ksebasti@redhat.com> - initial API and implementation,
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/internal/oprofile/ui/view/OprofileViewLogReaderAction.java b/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/internal/oprofile/ui/view/OprofileViewLogReaderAction.java
index 33e1c6f44b..2ae73d4bd0 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/internal/oprofile/ui/view/OprofileViewLogReaderAction.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/internal/oprofile/ui/view/OprofileViewLogReaderAction.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2004, 2016 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2004, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Kent Sebastian <ksebasti@redhat.com> - initial API and implementation
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/internal/oprofile/ui/view/OprofileViewRefreshAction.java b/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/internal/oprofile/ui/view/OprofileViewRefreshAction.java
index 0369dc619f..867b823448 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/internal/oprofile/ui/view/OprofileViewRefreshAction.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/internal/oprofile/ui/view/OprofileViewRefreshAction.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2008 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2008, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Kent Sebastian <ksebasti@redhat.com> - initial API and implementation
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/internal/oprofile/ui/view/OprofileViewSaveDefaultSessionAction.java b/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/internal/oprofile/ui/view/OprofileViewSaveDefaultSessionAction.java
index b47d85c7ec..ca8e3509c3 100755
--- a/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/internal/oprofile/ui/view/OprofileViewSaveDefaultSessionAction.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/internal/oprofile/ui/view/OprofileViewSaveDefaultSessionAction.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2004, 2017 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2004, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Kent Sebastian <ksebasti@redhat.com> - initial API and implementation
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/internal/oprofile/ui/view/OprofileViewSortAction.java b/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/internal/oprofile/ui/view/OprofileViewSortAction.java
index cffc6cd118..6c63d7258a 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/internal/oprofile/ui/view/OprofileViewSortAction.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/internal/oprofile/ui/view/OprofileViewSortAction.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2014 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2014, 2018 IBM Corporation.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Brajesh K Rathore <brrathor@linux.vnet.ibm.com> - initial API and implementation
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/model/IUiModelElement.java b/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/model/IUiModelElement.java
index 7ee47880e7..2baf6fe3ba 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/model/IUiModelElement.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/model/IUiModelElement.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2008 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2008, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Kent Sebastian <ksebasti@redhat.com> - initial API and implementation
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/model/UiModelDependent.java b/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/model/UiModelDependent.java
index ba330e4438..86486a27ff 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/model/UiModelDependent.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/model/UiModelDependent.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2008 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2008, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Kent Sebastian <ksebasti@redhat.com> - initial API and implementation
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/model/UiModelError.java b/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/model/UiModelError.java
index 13e2faa4ae..b203d525bc 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/model/UiModelError.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/model/UiModelError.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Kent Sebastian <ksebasti@redhat.com> - initial API and implementation
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/model/UiModelEvent.java b/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/model/UiModelEvent.java
index 8817cf5ba5..e2d9fa8eaa 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/model/UiModelEvent.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/model/UiModelEvent.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2008 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2008, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Kent Sebastian <ksebasti@redhat.com> - initial API and implementation
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/model/UiModelImage.java b/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/model/UiModelImage.java
index af94387a5f..aa488079e2 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/model/UiModelImage.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/model/UiModelImage.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2008 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2008, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Kent Sebastian <ksebasti@redhat.com> - initial API and implementation
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/model/UiModelRoot.java b/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/model/UiModelRoot.java
index 026e705d1d..6d92dbecc6 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/model/UiModelRoot.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/model/UiModelRoot.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2008,2009 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2008, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Kent Sebastian <ksebasti@redhat.com> - initial API and implementation
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/model/UiModelSample.java b/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/model/UiModelSample.java
index 93bf0a2773..e7807bd1ec 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/model/UiModelSample.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/model/UiModelSample.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2008 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2008, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Kent Sebastian <ksebasti@redhat.com> - initial API and implementation
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/model/UiModelSession.java b/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/model/UiModelSession.java
index cb9b47857e..588077e3fb 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/model/UiModelSession.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/model/UiModelSession.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2008 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2008, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Kent Sebastian <ksebasti@redhat.com> - initial API and implementation
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/model/UiModelSorting.java b/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/model/UiModelSorting.java
index 51d636d4fc..ddc9a4f238 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/model/UiModelSorting.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/model/UiModelSorting.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2014 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2014, 2018 IBM Corporation and others.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Brajesh K Rathore <brrathor@linux.vnet.ibm.com> - initial API and implementation
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/model/UiModelSymbol.java b/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/model/UiModelSymbol.java
index 0005e20065..1da6901de0 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/model/UiModelSymbol.java
+++ b/oprofile/org.eclipse.linuxtools.oprofile.ui/src/org/eclipse/linuxtools/oprofile/ui/model/UiModelSymbol.java
@@ -1,9 +1,11 @@
/*******************************************************************************
- * Copyright (c) 2008 Red Hat, Inc.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2008, 2018 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Kent Sebastian <ksebasti@redhat.com> - initial API and implementation
diff --git a/oprofile/pom.xml b/oprofile/pom.xml
index 5968f957df..7bd96387bb 100644
--- a/oprofile/pom.xml
+++ b/oprofile/pom.xml
@@ -1,11 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (C) 2011, Red Hat, Inc.
+ Copyright (C) 2011, 2018 Red Hat, Inc.
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
+ This program and the accompanying materials are made
+ available under the terms of the Eclipse Public License 2.0
+ which is available at https://www.eclipse.org/legal/epl-2.0/
+
+ SPDX-License-Identifier: EPL-2.0
-->
<project xmlns="http://maven.apache.org/POM/4.0.0"
@@ -25,20 +26,6 @@
<name>Linux Tools OProfile Parent</name>
- <licenses>
- <license>
- <name>Eclipse Public License v1.0</name>
- <comments>
- All rights reserved.
-
- This program and the accompanying materials are made
- available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.htm
- </comments>
- </license>
- </licenses>
-
<modules>
<module>org.eclipse.linuxtools.oprofile.core</module>
<module>org.eclipse.linuxtools.oprofile.core.tests</module>