That's a silly way due to few addressing methods, arrays, eeprom ram copy and so on
Best way is the Ida and log this var at warmup cycle
I am talking abot IDA, I write variable in custom code and press X, if is not used anywhere else I use it.
Work so far in various ECUs(at least 10 of them with different software) so it is was pre luck I don't know