From e0b710efc472409691ec8614daf93660261acb5f Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Wed, 22 Feb 2023 07:56:28 +0100 Subject: [PATCH 1/4] sets target execution environment for launch configs --- .launch/Build SCViewer.launch | 2 ++ .launch/Build and deploy SCViewer.launch | 2 ++ .launch/Set SCViewer version.launch | 2 ++ 3 files changed, 6 insertions(+) diff --git a/.launch/Build SCViewer.launch b/.launch/Build SCViewer.launch index 6f30297..4af4922 100644 --- a/.launch/Build SCViewer.launch +++ b/.launch/Build SCViewer.launch @@ -15,7 +15,9 @@ + + diff --git a/.launch/Build and deploy SCViewer.launch b/.launch/Build and deploy SCViewer.launch index 81ced40..7bc07d3 100644 --- a/.launch/Build and deploy SCViewer.launch +++ b/.launch/Build and deploy SCViewer.launch @@ -13,7 +13,9 @@ + + diff --git a/.launch/Set SCViewer version.launch b/.launch/Set SCViewer version.launch index d293261..26dc97c 100644 --- a/.launch/Set SCViewer version.launch +++ b/.launch/Set SCViewer version.launch @@ -18,7 +18,9 @@ + + From 07062d561873fcd6f3040761c76c6917225297db Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Wed, 22 Feb 2023 08:29:50 +0100 Subject: [PATCH 2/4] updates target platform to 2022-12 --- plugins/com.minres.scviewer.ui/plugin.xml | 2 +- .../com.minres.scviewer.target.target | 21 +++++++++---------- .../META-INF/MANIFEST.MF | 3 +-- 3 files changed, 12 insertions(+), 14 deletions(-) diff --git a/plugins/com.minres.scviewer.ui/plugin.xml b/plugins/com.minres.scviewer.ui/plugin.xml index 46310b0..b94bcc1 100644 --- a/plugins/com.minres.scviewer.ui/plugin.xml +++ b/plugins/com.minres.scviewer.ui/plugin.xml @@ -21,7 +21,7 @@ class="com.minres.scviewer.ui.TxEditorPart" contributorClass="com.minres.scviewer.ui.TxEditorActionBarContributor" extensions="txdb" - filenames="*.txdb,*.txlog,*.vcd" + filenames="*.txdb,*.txlog,*.vcd,*.ftr" icon="res/images/scviewer.png" id="com.minres.scviewer.ui.TxEditorPart" name="Wave Viewer"> diff --git a/releng/com.minres.scviewer.target/com.minres.scviewer.target.target b/releng/com.minres.scviewer.target/com.minres.scviewer.target.target index 55a1a8e..0f35c9a 100644 --- a/releng/com.minres.scviewer.target/com.minres.scviewer.target.target +++ b/releng/com.minres.scviewer.target/com.minres.scviewer.target.target @@ -3,7 +3,7 @@ - + @@ -11,12 +11,11 @@ - - + @@ -31,7 +30,7 @@ - + @@ -40,13 +39,13 @@ - - - - - - - + + + + + + + diff --git a/tests/com.minres.scviewer.database.test/META-INF/MANIFEST.MF b/tests/com.minres.scviewer.database.test/META-INF/MANIFEST.MF index 514f11a..bcc8e84 100644 --- a/tests/com.minres.scviewer.database.test/META-INF/MANIFEST.MF +++ b/tests/com.minres.scviewer.database.test/META-INF/MANIFEST.MF @@ -9,8 +9,7 @@ Require-Bundle: com.minres.scviewer.database, com.minres.scviewer.database.sqlite;bundle-version="1.0.0", com.minres.scviewer.database.text;bundle-version="1.0.0", com.minres.scviewer.database.vcd;bundle-version="1.0.0", - org.junit, - org.junit.jupiter.api + org.junit Bundle-ActivationPolicy: lazy Service-Component: OSGI-INF/component.xml Automatic-Module-Name: com.minres.scviewer.database.test From d95683a1462ca9abef354a803fa2fc0018c5273b Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Thu, 23 Feb 2023 13:31:02 +0100 Subject: [PATCH 3/4] fixes FTR reading and makes it more robust --- .../database/ftr/AbstractTxStream.java | 3 +- .../scviewer/database/ftr/FtrDbLoader.java | 56 +++++++++++++++---- .../src/jacob/CborDecoder.java | 7 ++- 3 files changed, 49 insertions(+), 17 deletions(-) diff --git a/plugins/com.minres.scviewer.database.ftr/src/com/minres/scviewer/database/ftr/AbstractTxStream.java b/plugins/com.minres.scviewer.database.ftr/src/com/minres/scviewer/database/ftr/AbstractTxStream.java index ac98dfc..2dce2f3 100644 --- a/plugins/com.minres.scviewer.database.ftr/src/com/minres/scviewer/database/ftr/AbstractTxStream.java +++ b/plugins/com.minres.scviewer.database.ftr/src/com/minres/scviewer/database/ftr/AbstractTxStream.java @@ -182,8 +182,7 @@ abstract class AbstractTxStream extends HierNode implements IWaveform { } } rowCount=rowEndTime.size()>0?rowEndTime.size():1; - //getChildNodes().parallelStream().forEach(c -> ((TxGenerator)c).calculateConcurrency()); - getChildNodes().stream().forEach(c -> ((TxGenerator)c).calculateConcurrency()); + getChildNodes().parallelStream().forEach(c -> ((TxGenerator)c).calculateConcurrency()); } } diff --git a/plugins/com.minres.scviewer.database.ftr/src/com/minres/scviewer/database/ftr/FtrDbLoader.java b/plugins/com.minres.scviewer.database.ftr/src/com/minres/scviewer/database/ftr/FtrDbLoader.java index 5aa4b21..d5f8990 100644 --- a/plugins/com.minres.scviewer.database.ftr/src/com/minres/scviewer/database/ftr/FtrDbLoader.java +++ b/plugins/com.minres.scviewer.database.ftr/src/com/minres/scviewer/database/ftr/FtrDbLoader.java @@ -131,7 +131,7 @@ public class FtrDbLoader implements IWaveformDbLoader { * @param txId the tx id * @return the transaction */ - public ITx getTransaction(long txId) { + public synchronized ITx getTransaction(long txId) { if (txCache.containsKey(txId)) return txCache.get(txId); if(transactions.containsKey(txId)) { @@ -185,8 +185,10 @@ public class FtrDbLoader implements IWaveformDbLoader { this.file=file; try(FileInputStream fis = new FileInputStream(file)) { new CborDbParser(this, fis); + } catch (IOException e) { + LOG.warn("Problem parsing file "+file.getName()+": " , e); } catch (Exception e) { - LOG.error("Error parsing file "+file.getName(), e); + LOG.error("Error parsing file "+file.getName()+ ": ", e); transactions.clear(); throw new InputFormatException(e.toString()); } @@ -242,17 +244,15 @@ public class FtrDbLoader implements IWaveformDbLoader { long name_id = cborDecoder.readInt(); long type_id = cborDecoder.readInt(); String attrName = strDict.get((int)name_id); - if(!attributeTypes.containsKey(attrName)) { - attributeTypes.put(attrName, new TxAttributeType(attrName, DataType.values()[(int)type_id], AssociationType.values()[(int)tag-7])); - } - TxAttributeType attrType = attributeTypes.get(attrName); + TxAttributeType attrType = getOrAddAttributeType(tag, type_id, attrName); switch((int)type_id) { case 0: // BOOLEAN - ITxAttribute b = new TxAttribute(attrType, cborDecoder.readInt()>0?"True":"False"); + ITxAttribute b = new TxAttribute(attrType, cborDecoder.readBoolean()?"True":"False"); ret.add(b); break; case 2: // INTEGER case 3: // UNSIGNED + case 10: // POINTER ITxAttribute a = new TxAttribute(attrType, String.valueOf(cborDecoder.readInt())); ret.add(a); break; @@ -269,6 +269,8 @@ public class FtrDbLoader implements IWaveformDbLoader { ITxAttribute s = new TxAttribute(attrType, strDict.get((int)cborDecoder.readInt())); ret.add(s); break; + default: + LOG.warn("Unsupported data type: "+type_id); } } } @@ -279,6 +281,14 @@ public class FtrDbLoader implements IWaveformDbLoader { return ret; } + private synchronized TxAttributeType getOrAddAttributeType(long tag, long type_id, String attrName) { + if(!attributeTypes.containsKey(attrName)) { + attributeTypes.put(attrName, new TxAttributeType(attrName, DataType.values()[(int)type_id], AssociationType.values()[(int)tag-7])); + } + TxAttributeType attrType = attributeTypes.get(attrName); + return attrType; + } + /** * Dispose. */ @@ -318,6 +328,7 @@ public class FtrDbLoader implements IWaveformDbLoader { long array_len = readArrayLength(); assert(array_len==-1); CborType next = peekType(); + int chunk_idx=0; while(next != null && !break_type.isEqualType(next)) { long tag = readTag(); switch((int)tag) { @@ -389,9 +400,12 @@ public class FtrDbLoader implements IWaveformDbLoader { } } next = peekType(); + chunk_idx++; } } catch(IOException e) { - LOG.error("Error parsing file input stream", e); + long pos = 0; + try {pos=inputStream.getChannel().position(); } catch (Exception ee) {} + LOG.error("Error parsing file input stream at position" + pos, e); } } @@ -437,7 +451,8 @@ public class FtrDbLoader implements IWaveformDbLoader { long gen_id = cborDecoder.readInt(); long name_id = cborDecoder.readInt(); long stream_id = cborDecoder.readInt(); - add(gen_id, new TxGenerator(loader, gen_id, loader.strDict.get((int)name_id), loader.txStreams.get(stream_id))); + if(loader.txStreams.containsKey(stream_id)) + add(gen_id, new TxGenerator(loader, gen_id, loader.strDict.get((int)name_id), loader.txStreams.get(stream_id))); } else { throw new IOException("Illegal tage ncountered: "+id); } @@ -451,14 +466,17 @@ public class FtrDbLoader implements IWaveformDbLoader { while(next != null && !break_type.isEqualType(next)) { long blockOffset = cborDecoder.getPos(); long tx_size = cborDecoder.readArrayLength(); + long txId = 0; + long genId = 0; + long attr_idx=0; for(long i = 0; i Date: Thu, 23 Feb 2023 15:50:47 +0100 Subject: [PATCH 4/4] updates version numbers --- doc/com.minres.scviewer.doc/pom.xml | 2 +- features/com.minres.scviewer.database.feature/pom.xml | 2 +- features/com.minres.scviewer.e4.feature/pom.xml | 2 +- features/com.minres.scviewer.e4.help.feature/pom.xml | 2 +- features/com.minres.scviewer.e4.platform.feature/pom.xml | 2 +- features/com.minres.scviewer.feature/pom.xml | 2 +- features/com.minres.scviewer.ui.feature/pom.xml | 2 +- plugins/com.minres.scviewer.database.ftr/pom.xml | 2 +- plugins/com.minres.scviewer.database.sqlite/pom.xml | 2 +- plugins/com.minres.scviewer.database.text/pom.xml | 2 +- plugins/com.minres.scviewer.database.ui.swt/pom.xml | 2 +- plugins/com.minres.scviewer.database.vcd/pom.xml | 2 +- plugins/com.minres.scviewer.database/pom.xml | 2 +- .../META-INF/MANIFEST.MF | 2 +- plugins/com.minres.scviewer.e4.application.help/pom.xml | 2 +- .../META-INF/MANIFEST.MF | 2 +- plugins/com.minres.scviewer.e4.application/pom.xml | 2 +- plugins/com.minres.scviewer.ui/pom.xml | 2 +- pom.xml | 4 ++-- products/com.minres.scviewer.e4.product/pom.xml | 4 ++-- products/com.minres.scviewer.e4.product/scviewer.product | 2 +- .../com.minres.scviewer.target.target | 7 ++++--- releng/com.minres.scviewer.target/pom.xml | 2 +- releng/com.minres.scviewer.updateSite/pom.xml | 2 +- tests/com.minres.scviewer.database.test/pom.xml | 2 +- 25 files changed, 30 insertions(+), 29 deletions(-) diff --git a/doc/com.minres.scviewer.doc/pom.xml b/doc/com.minres.scviewer.doc/pom.xml index 312f53b..4e78910 100644 --- a/doc/com.minres.scviewer.doc/pom.xml +++ b/doc/com.minres.scviewer.doc/pom.xml @@ -7,7 +7,7 @@ com.minres.scviewer com.minres.scviewer.parent - 2.17.1 + 2.17.2 ../.. diff --git a/features/com.minres.scviewer.database.feature/pom.xml b/features/com.minres.scviewer.database.feature/pom.xml index cd91068..7f525c9 100644 --- a/features/com.minres.scviewer.database.feature/pom.xml +++ b/features/com.minres.scviewer.database.feature/pom.xml @@ -5,7 +5,7 @@ com.minres.scviewer com.minres.scviewer.parent - 2.17.1 + 2.17.2 ../.. 3.0.0-SNAPSHOT diff --git a/features/com.minres.scviewer.e4.feature/pom.xml b/features/com.minres.scviewer.e4.feature/pom.xml index cfec10a..91cd079 100644 --- a/features/com.minres.scviewer.e4.feature/pom.xml +++ b/features/com.minres.scviewer.e4.feature/pom.xml @@ -5,7 +5,7 @@ com.minres.scviewer com.minres.scviewer.parent - 2.17.1 + 2.17.2 ../.. 1.1.0-SNAPSHOT diff --git a/features/com.minres.scviewer.e4.help.feature/pom.xml b/features/com.minres.scviewer.e4.help.feature/pom.xml index 1192a6b..24f3465 100644 --- a/features/com.minres.scviewer.e4.help.feature/pom.xml +++ b/features/com.minres.scviewer.e4.help.feature/pom.xml @@ -5,7 +5,7 @@ com.minres.scviewer com.minres.scviewer.parent - 2.17.1 + 2.17.2 ../.. 1.0.0-SNAPSHOT diff --git a/features/com.minres.scviewer.e4.platform.feature/pom.xml b/features/com.minres.scviewer.e4.platform.feature/pom.xml index 8fc5ccf..e2415a4 100644 --- a/features/com.minres.scviewer.e4.platform.feature/pom.xml +++ b/features/com.minres.scviewer.e4.platform.feature/pom.xml @@ -5,7 +5,7 @@ com.minres.scviewer com.minres.scviewer.parent - 2.17.1 + 2.17.2 ../.. 1.0.0-SNAPSHOT diff --git a/features/com.minres.scviewer.feature/pom.xml b/features/com.minres.scviewer.feature/pom.xml index f7c89d0..46cf00f 100644 --- a/features/com.minres.scviewer.feature/pom.xml +++ b/features/com.minres.scviewer.feature/pom.xml @@ -5,7 +5,7 @@ com.minres.scviewer com.minres.scviewer.parent - 2.17.1 + 2.17.2 ../.. 1.1.0-SNAPSHOT diff --git a/features/com.minres.scviewer.ui.feature/pom.xml b/features/com.minres.scviewer.ui.feature/pom.xml index ced77a1..11ccde9 100644 --- a/features/com.minres.scviewer.ui.feature/pom.xml +++ b/features/com.minres.scviewer.ui.feature/pom.xml @@ -5,7 +5,7 @@ com.minres.scviewer com.minres.scviewer.parent - 2.17.1 + 2.17.2 ../.. 1.1.0-SNAPSHOT diff --git a/plugins/com.minres.scviewer.database.ftr/pom.xml b/plugins/com.minres.scviewer.database.ftr/pom.xml index 00217c0..b83f1f9 100644 --- a/plugins/com.minres.scviewer.database.ftr/pom.xml +++ b/plugins/com.minres.scviewer.database.ftr/pom.xml @@ -6,7 +6,7 @@ com.minres.scviewer com.minres.scviewer.parent - 2.17.1 + 2.17.2 ../.. eclipse-plugin diff --git a/plugins/com.minres.scviewer.database.sqlite/pom.xml b/plugins/com.minres.scviewer.database.sqlite/pom.xml index 9c4ac8f..bf772c5 100644 --- a/plugins/com.minres.scviewer.database.sqlite/pom.xml +++ b/plugins/com.minres.scviewer.database.sqlite/pom.xml @@ -4,7 +4,7 @@ com.minres.scviewer com.minres.scviewer.parent - 2.17.1 + 2.17.2 ../.. eclipse-plugin diff --git a/plugins/com.minres.scviewer.database.text/pom.xml b/plugins/com.minres.scviewer.database.text/pom.xml index 81881c1..ea051de 100644 --- a/plugins/com.minres.scviewer.database.text/pom.xml +++ b/plugins/com.minres.scviewer.database.text/pom.xml @@ -6,7 +6,7 @@ com.minres.scviewer com.minres.scviewer.parent - 2.17.1 + 2.17.2 ../.. eclipse-plugin diff --git a/plugins/com.minres.scviewer.database.ui.swt/pom.xml b/plugins/com.minres.scviewer.database.ui.swt/pom.xml index 806f54e..4560781 100644 --- a/plugins/com.minres.scviewer.database.ui.swt/pom.xml +++ b/plugins/com.minres.scviewer.database.ui.swt/pom.xml @@ -5,7 +5,7 @@ com.minres.scviewer com.minres.scviewer.parent - 2.17.1 + 2.17.2 ../.. 4.0.0-SNAPSHOT diff --git a/plugins/com.minres.scviewer.database.vcd/pom.xml b/plugins/com.minres.scviewer.database.vcd/pom.xml index dae5ea0..9284855 100644 --- a/plugins/com.minres.scviewer.database.vcd/pom.xml +++ b/plugins/com.minres.scviewer.database.vcd/pom.xml @@ -5,7 +5,7 @@ com.minres.scviewer com.minres.scviewer.parent - 2.17.1 + 2.17.2 ../.. eclipse-plugin diff --git a/plugins/com.minres.scviewer.database/pom.xml b/plugins/com.minres.scviewer.database/pom.xml index ea83e1c..77a04e2 100644 --- a/plugins/com.minres.scviewer.database/pom.xml +++ b/plugins/com.minres.scviewer.database/pom.xml @@ -4,7 +4,7 @@ com.minres.scviewer com.minres.scviewer.parent - 2.17.1 + 2.17.2 ../.. eclipse-plugin diff --git a/plugins/com.minres.scviewer.e4.application.help/META-INF/MANIFEST.MF b/plugins/com.minres.scviewer.e4.application.help/META-INF/MANIFEST.MF index 10ffb53..7b6bc5d 100644 --- a/plugins/com.minres.scviewer.e4.application.help/META-INF/MANIFEST.MF +++ b/plugins/com.minres.scviewer.e4.application.help/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: SCViewer Help Bundle-SymbolicName: com.minres.scviewer.e4.application.help;singleton:=true -Bundle-Version: 2.17.1 +Bundle-Version: 2.17.2 Bundle-Vendor: MINRES Technologies GmbH Automatic-Module-Name: com.minres.scviewer.e4.application.help Bundle-RequiredExecutionEnvironment: JavaSE-11 diff --git a/plugins/com.minres.scviewer.e4.application.help/pom.xml b/plugins/com.minres.scviewer.e4.application.help/pom.xml index fd8ce25..7546b00 100644 --- a/plugins/com.minres.scviewer.e4.application.help/pom.xml +++ b/plugins/com.minres.scviewer.e4.application.help/pom.xml @@ -6,7 +6,7 @@ com.minres.scviewer com.minres.scviewer.parent - 2.17.1 + 2.17.2 ../.. eclipse-plugin diff --git a/plugins/com.minres.scviewer.e4.application/META-INF/MANIFEST.MF b/plugins/com.minres.scviewer.e4.application/META-INF/MANIFEST.MF index f6fc855..dd80143 100644 --- a/plugins/com.minres.scviewer.e4.application/META-INF/MANIFEST.MF +++ b/plugins/com.minres.scviewer.e4.application/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %Bundle-Name Bundle-SymbolicName: com.minres.scviewer.e4.application;singleton:=true -Bundle-Version: 2.17.1 +Bundle-Version: 2.17.2 Bundle-Vendor: %Bundle-Vendor Require-Bundle: javax.inject;bundle-version="1.0.0", org.eclipse.core.runtime;bundle-version="3.11.1", diff --git a/plugins/com.minres.scviewer.e4.application/pom.xml b/plugins/com.minres.scviewer.e4.application/pom.xml index e67949b..231c4fd 100644 --- a/plugins/com.minres.scviewer.e4.application/pom.xml +++ b/plugins/com.minres.scviewer.e4.application/pom.xml @@ -6,7 +6,7 @@ com.minres.scviewer com.minres.scviewer.parent - 2.17.1 + 2.17.2 ../.. eclipse-plugin diff --git a/plugins/com.minres.scviewer.ui/pom.xml b/plugins/com.minres.scviewer.ui/pom.xml index 43bd5ae..7969e95 100644 --- a/plugins/com.minres.scviewer.ui/pom.xml +++ b/plugins/com.minres.scviewer.ui/pom.xml @@ -4,7 +4,7 @@ com.minres.scviewer com.minres.scviewer.parent - 2.17.1 + 2.17.2 ../.. eclipse-plugin diff --git a/pom.xml b/pom.xml index aca5226..ad4bec1 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.minres.scviewer com.minres.scviewer.parent - 2.17.1 + 2.17.2 pom releng/com.minres.scviewer.target @@ -70,7 +70,7 @@ com.minres.scviewer com.minres.scviewer.target - 2.17.1 + 2.17.2 org.eclipse.justj.openjdk.hotspot.jre.minimal-15 diff --git a/products/com.minres.scviewer.e4.product/pom.xml b/products/com.minres.scviewer.e4.product/pom.xml index 25b1ae1..7ce7504 100644 --- a/products/com.minres.scviewer.e4.product/pom.xml +++ b/products/com.minres.scviewer.e4.product/pom.xml @@ -6,11 +6,11 @@ com.minres.scviewer com.minres.scviewer.parent - 2.17.1 + 2.17.2 ../.. com.minres.scviewer.e4.product - 2.17.1 + 2.17.2 eclipse-repository com.minres.scviewer diff --git a/products/com.minres.scviewer.e4.product/scviewer.product b/products/com.minres.scviewer.e4.product/scviewer.product index 54f8e01..a671948 100644 --- a/products/com.minres.scviewer.e4.product/scviewer.product +++ b/products/com.minres.scviewer.e4.product/scviewer.product @@ -1,7 +1,7 @@ - + diff --git a/releng/com.minres.scviewer.target/com.minres.scviewer.target.target b/releng/com.minres.scviewer.target/com.minres.scviewer.target.target index 0f35c9a..0c36901 100644 --- a/releng/com.minres.scviewer.target/com.minres.scviewer.target.target +++ b/releng/com.minres.scviewer.target/com.minres.scviewer.target.target @@ -3,7 +3,7 @@ - + @@ -11,11 +11,12 @@ + - + @@ -30,7 +31,7 @@ - + diff --git a/releng/com.minres.scviewer.target/pom.xml b/releng/com.minres.scviewer.target/pom.xml index 542b45a..fc40c70 100644 --- a/releng/com.minres.scviewer.target/pom.xml +++ b/releng/com.minres.scviewer.target/pom.xml @@ -12,7 +12,7 @@ com.minres.scviewer com.minres.scviewer.parent - 2.17.1 + 2.17.2 ../.. diff --git a/releng/com.minres.scviewer.updateSite/pom.xml b/releng/com.minres.scviewer.updateSite/pom.xml index 24cd8ec..307f6c7 100644 --- a/releng/com.minres.scviewer.updateSite/pom.xml +++ b/releng/com.minres.scviewer.updateSite/pom.xml @@ -7,7 +7,7 @@ com.minres.scviewer com.minres.scviewer.parent - 2.17.1 + 2.17.2 ../.. diff --git a/tests/com.minres.scviewer.database.test/pom.xml b/tests/com.minres.scviewer.database.test/pom.xml index d694c69..64ac288 100644 --- a/tests/com.minres.scviewer.database.test/pom.xml +++ b/tests/com.minres.scviewer.database.test/pom.xml @@ -6,7 +6,7 @@ com.minres.scviewer com.minres.scviewer.parent - 2.17.1 + 2.17.2 ../.. eclipse-test-plugin