Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upTrace key operations #40063
Trace key operations #40063
Conversation
|
There are some noteworthy rough edges:
Updates:
|
|
CI failures are because I didn't update the harness System impl(s). That can wait until next week. |
|
There are deliberately few trace events in the checker to avoid (excessively) skewing the runtime. If people would like to see more, e.g. for debugging, my inclination would be to add a separate mode (i.e. profiling trace vs activity trace). Note that the persistence format is JSON, so it's very easy to create enormous trace files (e.g. adding |
|
Have you looked at the sources for |
|
Rough instructions for using it in its present state:
|
Produce output in Chrome's event tracing format so that it can be viewed in Chrome/Edge.
|
Having applied this to several repos now, I feel pretty confident that this is useful in its current state. Enriching it with additional tracepoints (e.g. for inference) or output (e.g. stack traces) can follow in future PRs. |
| export function startTracing(configFilePath: string | undefined, traceDir: string, isBuildMode: boolean) { | ||
| Debug.assert(!traceFd, "Tracing already started"); | ||
|
|
||
| if (fs === undefined) { |
rbuckton
Sep 10, 2020
•
Member
In the future we might be able to move some of this logic to a conditionally loaded module, similar to the extended debug information for flow nodes in ~/src/debug/dbg.ts loaded by ~/src/compiler/debug.ts:
TypeScript/src/compiler/debug.ts
Lines 655 to 668 in d896353
I've been thinking about moving more of ts.Debug into the external file to reduce the file size of tsc.js, typescript.js, and tsserver.js as well.
This obviously isn't something we need to do now, but we might want to consider putting it on the backlog.

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.

Produce output in Chrome's event tracing format so that it can be viewed in Chrome/Edge.
Hat tip to @samccone for suggesting the format.