aras-p / ClangBuildAnalyzer

Clang build analysis tool using -ftime-trace
The Unlicense
995 stars 64 forks source link

Error no json files found on macOS 12/ LLVM clang 13 #79

Closed z-aki closed 2 years ago

z-aki commented 2 years ago

Looking at an older issue https://github.com/aras-p/ClangBuildAnalyzer/issues/45 I'm guessing LLVM clang 13 is not identified by this tool.

The error is

Stopping build tracing and saving to '1'... ERROR: no clang -ftime-trace .json files found under './'.

Clang version:

clang version 13.0.0 Target: x86_64-apple-darwin21.2.0 Thread model: posix

Example json file is :

Expand
``` { "traceEvents": [ { "pid": 16764, "tid": 259, "ph": "X", "ts": 6343, "dur": 831, "name": "Source", "args": { "detail": "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk/usr/include/sys/cdefs.h" } }, { "pid": 16764, "tid": 259, "ph": "X", "ts": 3786, "dur": 242254, "name": "Frontend" }, { "pid": 16764, "tid": 259, "ph": "X", "ts": 125, "dur": 258862, "name": "ExecuteCompiler" }, { "pid": 16764, "tid": 260, "ph": "X", "ts": 0, "dur": 258861, "name": "Total ExecuteCompiler", "args": { "count": 1, "avg ms": 258 } }, { "pid": 16764, "tid": 261, "ph": "X", "ts": 0, "dur": 242253, "name": "Total Frontend", "args": { "count": 1, "avg ms": 242 } }, { "pid": 16764, "tid": 262, "ph": "X", "ts": 0, "dur": 217862, "name": "Total Source", "args": { "count": 28, "avg ms": 7 } }, { "pid": 16764, "tid": 263, "ph": "X", "ts": 0, "dur": 2, "name": "Total PerformPendingInstantiations", "args": { "count": 1, "avg ms": 0 } }, { "cat": "", "pid": 16764, "tid": 259, "ts": 0, "ph": "M", "name": "process_name", "args": { "name": "clang" } }, { "cat": "", "pid": 16764, "tid": 259, "ts": 0, "ph": "M", "name": "thread_name", "args": { "name": "" } } ], "beginningOfTime": 1641965546191608 } ```
aras-p commented 2 years ago

Are you using the analyzer build from releases, or the manual built from latest github branch?

z-aki commented 2 years ago

Are you using the analyzer build from releases, or the manual built from latest github branch?

I tried 1.2.0 and 1.1.0 from https://github.com/aras-p/ClangBuildAnalyzer/releases same error

aras-p commented 2 years ago

The published binaries don't have a fix yet. In the latest source build I can't reproduce the error on your json file. Will try to publish new binaries soon.

aras-p commented 2 years ago

Can you try with 1.3.0 binaries: https://github.com/aras-p/ClangBuildAnalyzer/releases/tag/v1.3.0

z-aki commented 2 years ago

Amazing! thanks

hukz37 commented 2 years ago

Amazing! thanks

Hello, how to operate it? I still can't use this new one. Can you give me some guidance? thank you

z-aki commented 2 years ago

Do your build. Does not matter how; an IDE build, a makefile, a shell script, whatever. As long as it invokes Clang and passes -ftime-trace flag to the compiler (Clang 9.0 or later is required for this).

https://github.com/aras-p/ClangBuildAnalyzer#usage

@hukz37