Comments (7)
The problem with this is that you can only use temporal information to synchronise the ITM in the absence of sync packets. The easiest hack is what you've done, to just force the ITM to be synced. In that case, if an ITM Sync arrives, everything will be re-synched, but if it doesn't with the current arrnagement then once you're out of sync you stay there...which is not nice. Need to think on this one.
from orbuculum.
"try harder" :) you can detect most things by just discarding invalid sequences. it tends to actually resync quicker than you think. (I've written parsers for this before, but yours has more bits in it that I don't want to handle myself) See http://git.zapb.de/libswo.git/ for one implementation, I handled it less gracefully in https://github.com/karlp/swopy (which worked but was a kinda fragile PoC)
sync packets are a serious intrusion on the bandwidth available, and I've been using this already for the last few weeks with just the HACK: commit referenced above.
from orbuculum.
Karl,
Once it's synced it won't unsync unless it's told to by the TPIU (which won't happen with no TPIU in stream) so all that's needed is to start off initially synced rather than not synced. When an non-understood or corrupt packet arrives the default is to drop back to the idle state anyway (see the ITM_HW, ITM_SW, ITM_TS and ITM_EXTENSION states) so by your logic it should re-sync very quickly.....but the consequence is likely to be 'noise' packets from time to time so it might need to be a switchable option, especially given that the codespace for the first octet is very full....there aren't many invalid sequences!
Main focus for past few weeks has been on increasing the available b/w via parallel trace rather than reducing the amount of traffic :-)
To implement this change you don't need to change each program in the suite, just change line 48 of itmDecoder.c to be i->p=ITM_IDLE rather than ITM_UNSYNCED.
For now I'll leave this open, but do report back on how it behaves for you. If the current state machine does fall into sync then I'm happy to add a command line switch to enable this behaviour with a suitable warning about the potential for noise in the readme.
from orbuculum.
OK, I've added a -n command line switch to force the ITM into sync'ed mode on all of the tools, cos I can see some use cases where that might be handy.
However (and it's quite a big however), I did a bit of testing recording 60 seconds of PC samples as an example data flow. During that time 17 ITM Syncs were received, while 1080704 octets of real ITM traffic arrived at the same time. Given that an ITM Sync is 6 octets that means that the overhead for including Syncs in that traffic flow was about 0.01%. You can send Syncs more quickly if you wish, but that gives you some idea of the 'cost' of including them.
Don't believe everything you read in Arm documentation :-)
DAVE
from orbuculum.
That.... doesn't match my experience, I saw far more syncs. but ok. cool :) -n will work for me :)
from orbuculum.
Well, you can make it spit them out more often - it depends on where you place the SYNCTAP in DWT_CTRL of course. This is the least frequent you will get them if you've got it enabled. You can tap at CYCNT[24], CYCCNT[26] or CYCCNT[28]. My core was running at 72MHz and I was on CYCCNT[28] which is 3.728secs/sync ~= 16 syncs/min (which is what I saw). At its most frequent you would get 257 of them per min on CYCCNT[24], giving you an overhead in my use case of about 0.15%. Either way, not a whole hill of beans. When you start switching on things like timestamping then thats a different matter, and you'll very quickly overfill the channel. Anyway, feel free to use -n :-)
See http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0337e/ch11s05s01.html for more.
from orbuculum.
OK, I'm convinced on this one...when using the tools with JLink no syncs are issued, which means they sit silently until you figure out what's wrong. I've inverted the sense of the '-n' switch to make it enforce rather than relax the SYNC requirement. Sending you this note 'cos its likely to burn you and your scripts otherwise when you upgrade.
from orbuculum.
Related Issues (20)
- Install more files on Linux HOT 1
- Extraneous arguments in meson.build file HOT 3
- Inconsistent results from orbfifo when reading from file and writing to permanent file HOT 3
- Arch linux builds need a meson prefix HOT 3
- Cannot set server and port in orbfifo HOT 2
- Do not require trailing slash in orbfifo basedir HOT 2
- Cannot abort orbfifo with Ctrl + C when not yet connected HOT 6
- First contribution HOT 1
- gdbtrace.init does not seem to work with newer version of arm-none-eabi-gdb HOT 7
- Windows CLI output has corrupted characters HOT 2
- orbtop CPU usage increases over time
- Orbmortem save to file not working HOT 2
- 'ARM_INS_ERET' not in /usr/include/capstone/arm.h HOT 2
- orbtop should provide immediate error about missing objdump HOT 2
- orbtop: Exception number format, 0..N vs -16..N HOT 5
- orbtop exception tick count wrong for nested instructions HOT 1
- Weird help message for the orbtrace -T option HOT 1
- Loosely formatted orbcat output specification doesn't result in output HOT 1
- Package binaries along with releases HOT 1
- Orbuculum fails to connect to J-LINK GDB Server on Windows. HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from orbuculum.