Commit Graph

13 Commits

Author SHA1 Message Date
Xi Ge
049f381807 FineModuleTracing: being blocklisted in collecting fine trace shouldn't change that the promised file is being emitted 2024-12-20 21:33:24 -08:00
Xi Ge
c965343f54 Frontend: add a flag to disable fine-grained module tracing 2024-12-13 16:07:15 -08:00
Xi Ge
7f3c9cbeb1 FineModuleTrace: add a blocklist action for skipping fine module tracing 2024-12-13 13:49:38 -08:00
Xi Ge
3f69aed0f8 FineModuleTracing: use requested action type to further gate whether emitting fine-grained module trace is supported.
Emitting fine-grained module tracing files during full compilation should be sufficient for the use case in design. Other
swift-frontend invocations, such as emitting modules, doesn't need fully type-checked AST to perform the action, therefore
requesting/walking the fully typechecked AST to emit those tracing files may introduce performance overhead.
2024-12-10 22:10:25 -08:00
Xi Ge
5deb21d4fe FineModuleTrace: avoid emitting trace file when lazy type checking is enabled.
When lazy type checking is enabled, the generated AST to walk on may contain function bodies that
are not fully type-checked. Walking on these function bodies could expose latent bugs.

Resolves rdar://140818215
2024-12-07 22:13:10 -08:00
Xi Ge
77cbc19923 FineModuleTrace: use SWIFT_COMPILER_FINE_GRAINED_TRACE_PATH to indicate where the fine module trace should be emitted to. NFC 2024-11-21 11:50:36 -08:00
Xi Ge
e406b5440e test: ensure IDE/objc_send_collector_1.swift is valid regardless of whether the emitted trace file is pretty printed 2024-11-20 16:40:23 -08:00
Xi Ge
fc1dac7e77 ObjCMessageTracing: append trace file content atomically to a canonical file location provided by the build environment
To simplify post-processing of these collected ObjC message traces, this PR teaches the compiler to atomically append the content of
ObjC message trace to a file location provided by the build environment, instead of emitting multiple files.
2024-11-19 11:57:29 -08:00
Akira Hatanaka
555c00a731 ModuleTrace: use clang API to emit information in JSON (#77422) 2024-11-07 15:31:55 -08:00
Xi Ge
94d1333072 ModuleObjCTrace: walk only Swift source files to collect used ObjC method invocations 2024-11-04 18:56:12 -08:00
Xi Ge
3cb5fbd411 ModuleObjCTrace: allow configuring the directory path to where the objc message trace file will be emitted to via an environment variable 2024-11-04 12:51:35 -08:00
Xi Ge
6e42dfb470 ModuleObjcMessageTrace: also include a field for the current compiler version 2024-11-01 21:35:14 -07:00
Xi Ge
95f2523ef3 ModuleObjcMessageTrace: report ObjC method calls from all source files under compilation 2024-10-31 14:52:09 -07:00