<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Oct 2, 2020, at 3:51 AM, Pavel Labath <<a href="mailto:pavel@labath.sk" class="">pavel@labath.sk</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">On 01/10/2020 22:32, Walter wrote:<br class=""><blockquote type="cite" class="">After a chat with Greg, we agreed on this set of commands<br class=""><br class=""><br class="">trace load /path/to/json process trace start/stop process trace save<br class="">/path/to/json thread trace start/stop thread trace dump [instructions |<br class="">functions]<br class=""><br class=""></blockquote><br class="">Thanks. The new commands look good to me.<br class=""></div></div></blockquote><div><br class=""></div>Great, we can move the "trace dump" over to "thread trace dump" for <a href="https://reviews.llvm.org/D86670" class="">https://reviews.llvm.org/D86670</a> and keep that moving.</div><div><br class=""><blockquote type="cite" class=""><div class=""><div class="">The multi-process trace concept is interesting. I don't question its<br class="">usefulness -- I am sure it can be useful for various kinds of analysis<br class="">(though I've never used that myself). I am wondering though about how to<br class="">represent this thing in lldb, as we don't really have anything close to<br class="">the concept of "debugging" all processes on a given system.<br class=""><br class="">The only thing that comes close is probably the kernel-level debugging.<br class="">One idea (which has just occurred to me, so it may not be good) might be<br class="">to make these traces behave similarly to that. I.e., create a single<br class="">target/process with one "thread" per physical cpu, and then have a<br class="">special "os plugin" like thing which would present individual<br class="">process/threads.<br class=""></div></div></blockquote><div><br class=""></div>I don't know enough about how trace data is stored or annotated after the raw data is pulled from the cores, but to make it useful it must be able to be associated with processes and threads somehow otherwise it would be just a bunch of addresses that would all overlap between many processes. </div><div><br class=""></div><div> <br class=""><blockquote type="cite" class=""><div class=""><div class="">That would have the advantage of maintaining the one trace-one target<br class="">invariant and also would preserve the information about relative timings<br class="">of individual "processes". I think that wuold be an interesting way to<br class="">view these things, but I don't know if it would be the best one...<br class=""></div></div></blockquote></div><br class=""><div class="">I might suggest that each trace plug-in should do its best to represent processes and threads as separate entities so that they all remain separate. What ever data starts out as should be abstracted and I think I would rather see individual processes with their threads if that is possible to do, but I am just thinking of this with just a bit of knowledge tracing data. I think many chip makers create these trace formats and they are designed from a "trace a core" perspective, but if we can tame this data and present it as users would want to see it instead of trying to represent it as the data is stored, I think we will have a compelling trace feature in our debugger.</div><div class=""><br class=""></div><div class="">Greg</div></body></html>