Paul C. Anagnostopoulos via llvm-dev
2020-Oct-20 23:20 UTC
[llvm-dev] Instrumenting a program for timing
Is there a standard method of instrumenting a program so it will optionally display the CPU time for one or more phases? I'd like to do that for TableGen.
Robinson, Paul via llvm-dev
2020-Oct-21 13:40 UTC
[llvm-dev] Instrumenting a program for timing
> -----Original Message----- > From: llvm-dev <llvm-dev-bounces at lists.llvm.org> On Behalf Of Paul C. > Anagnostopoulos via llvm-dev > Sent: Tuesday, October 20, 2020 7:20 PM > To: llvm-dev at lists.llvm.org > Subject: [llvm-dev] Instrumenting a program for timing > > Is there a standard method of instrumenting a program so it will > optionally display the CPU time for one or more phases? I'd like to do > that for TableGen.Clang has something like that with the -ftime-trace option. This appears to make use of the llvm::TimeTraceScope class. --paulr
Paul C. Anagnostopoulos via llvm-dev
2020-Oct-21 13:50 UTC
[llvm-dev] Instrumenting a program for timing
Thanks, I'll check that out. At 10/21/2020 09:40 AM, Robinson, Paul wrote:>> -----Original Message----- >> From: llvm-dev <llvm-dev-bounces at lists.llvm.org> On Behalf Of Paul C. >> Anagnostopoulos via llvm-dev >> Sent: Tuesday, October 20, 2020 7:20 PM >> To: llvm-dev at lists.llvm.org >> Subject: [llvm-dev] Instrumenting a program for timing >> >> Is there a standard method of instrumenting a program so it will >> optionally display the CPU time for one or more phases? I'd like to do >> that for TableGen. > >Clang has something like that with the -ftime-trace option. This appears >to make use of the llvm::TimeTraceScope class. >--paulr