A place users can post their projects. If you have a small project and would like your own dedicated place to post and have others chat about it then this is your spot.

User avatar
By lucasromeiro
McChubby007 wrote:In order to keep the momentum and the interest up, I have just run some tests with a large test suite that I have to show you some example results.

Obviously, data and function trace of your code is tightly coupled to the code you are tracing, but this gives an example of tracing an software timer (isr) with a frequency of 1mSec intermixed with other events, functions and data logging.

There are two types of report :

1. Textual trace and profiler stats. This is the complete time ordered events as they occur, with the profiling stats at the end.

2. Interactive graphic : Using chrome trace tools (Have you used them?) TRAP will build a file that can be imported into Chrome Trace and then this can be interactively filtered/viewed etc, just as any chrome trace style stuff.

I have attached both styles of report, a text file (of textual trace/profiler) and a png (of chrome trace). If you want the raw file to import into chrome trace to interact with let me know.

The chrome trace shows the isr running for a short period, and I have selected some of the function calls which gives profiling time summary at the bottom of the picture.

I'm in the process of sorting the software for your use, as promised.

Oh and... this is running from the esp-core Arduino framework, so you don't need any fancy freeRTOS or anything else to use it, which is the point of it really. It also runs on Arduino Uno/Micro etc and Due.

I realize that I am very stupid!
I need to study hard enough to learn how to use this tool.
I'll wait for the next chapters and keep a close eye on everything.
I'm very interested in such a tool!
It is useful for anyone who develops.

At the end, when you're done, give some examples and if you can, an explanatory video or something.
It will help those who have never used a similar tool.
I think it can help a lot of people, but it needs to be easy to use / understand. For the most general public. I believe that is your goal.
User avatar
By McChubby007
#80158 Thanks for the encouragement, it keeps me working hard!

Yes, I am going to provide many examples, introducing each feature individually and simply so it can be understood. My example I attached was just so you can see the kinds of visuals and reports it produces, I wouldn't expect you to be able ti interpret it since it is tracing my test code.

It will make much more sense when you use it in your own code because you will see how your code behaves with the function names/variables etc. with the function call tree and so on.

If you use the Chrome Trace visualiser then that is just something to learn and Google have documented it, as it's their tool obviously. What I will do is provide my interpretation of how TRAP presents this data to Chrome Trace (Chrome Trace, of course, is intended primarily to debug web applications so it has some visuals which do not make much sense in an esp8266 world). There are a number of projects who use Chrome Trace, and they provide their own scheme to record the data so it can be imported. Chrome Trace can also import Linux ftrace format data but I've not tried that.

It is useful to understand other trace tools, such as strace or ftrace in Linux, as they are much the same in their purpose; very much a low-level debugging aid, just slightly higher level than an actual debugger, and of course it operates in real-time which is most important of all.
User avatar
By McChubby007
#80318 Thought I would give you an update : I'm working hard to get something half-polished to you for your benefit, and I'm just working on the tcp and udp drivers to allow the reports to be sent over wi-fi as they are generated.

Can I ask the regulars on this site, whom I respect for their opinions and knowledge... from my previous update to this post re. Chrome trace tools and their use & data presentation (see viewtopic.php?f=11&t=19046&start=4#p80156) : Are you familiar with them, do you use them, what do you think of them as general performance analysis tools?

I ask this, as I wonder how much use this option is for my toolset, and whether it is worth me spending more time, adding additional tweaks and touches (and the dreaded documentation!), especially if it is not going to be used or is too confusing. I accept, in any case, that this is a dry terse topic, and so it won't be for everyone even in its most simplest of forms. It does also need people to research or know how Chrome Trace operates and depicts information (I don't intend to explain chrome trace in my docs, but I will provide an 'interpretation' document to explain what events and other info equate to for the esp8266).

A final note : If you don't know chrome trace already, It is worth the low-level / expert software guys who visit here having a look at it - especially if you do Linux or Android development as more and more performance/analysis tools now produce data in this format : check youtube, there's enough there to get you going. Chrome trace can accept linux ftrace format data too.

Oh and remember : please tell me your opinion on chrome trace. Thank you.
User avatar
By quackmore
#80331 hey, this is a cool thread!

I have a question
didn't read the doc yet
pardon me if it will sound goofy ...

is your library intended just for testing or also for diagnostic ?

I mean trying to register what goes wrong and it's so hard to reproduce later ...