Let’s say I want to have multiple traces of one function/functioncall, while only sending the data that I want to have an input to the function once. So consider a function like this:
uint8_t recv_plain(uint8_t cmd, uint8_t scmd, uint8_t len, uint8_t* pt) {
[..]
static volatile return_value; //static volatile to prevent optimizations
trigger_high();
return_value = functioncall(input);
trigger_low();
[...]
trigger_high();
return_value =functioncall(input);
trigger_low();
[...]
}
And so on. I have multiple questions here:
- In python, I then call capture() and then
get_last_trace()[:scope.adc.trig_count]
- I except that if I divide the resulting trace into equal parts, then each of those parts should represent the trace for a function call. Is this correct? - Considering a manage to get rid of compiler optimizations so that the assembly between the trigger_high and the trigger_low function always looks the same. Can I then expect the trace for two chain function calls to be twice as long as the one for function call? For example, can I expect the trace for the code example above to be twice as long as if I were to call the function just once:
uint8_t recv_plain(uint8_t cmd, uint8_t scmd, uint8_t len, uint8_t* pt) {
[..]
static volatile return_value; //static volatile to prevent optimizations
trigger_high();
return_value = functioncall(input);
trigger_low();
[...]
}
Because this does not seem to be the case and I would like to get more understanding as to why this is not the case.
Thank you so much!
Vincent