[PATCH] D78903: [Driver] Add option -fproc-stat-report

2020-11-27 Thread Zarko Todorovski via Phabricator via cfe-commits
ZarkoCA added inline comments. Comment at: clang/test/Driver/report-stat.c:1 +// RUN: %clang -c -fproc-stat-report %s | FileCheck %s +// CHECK: clang{{.*}}: output={{.*}}.o, total={{[0-9.]+}} ms, user={{[0-9.]+}} ms, mem={{[0-9]+}} Kb ZarkoCA wrote: > Hi

[PATCH] D78903: [Driver] Add option -fproc-stat-report

2020-11-26 Thread Zarko Todorovski via Phabricator via cfe-commits
ZarkoCA added inline comments. Comment at: clang/test/Driver/report-stat.c:1 +// RUN: %clang -c -fproc-stat-report %s | FileCheck %s +// CHECK: clang{{.*}}: output={{.*}}.o, total={{[0-9.]+}} ms, user={{[0-9.]+}} ms, mem={{[0-9]+}} Kb Hi @sepavloff, is it

[PATCH] D78903: [Driver] Add option -fproc-stat-report

2020-11-17 Thread Thorsten via Phabricator via cfe-commits
tschuett added a comment. Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78903/new/ https://reviews.llvm.org/D78903 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D78903: [Driver] Add option -fproc-stat-report

2020-11-17 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. In D78903#2397845 , @tschuett wrote: > Could you add quotation marks around the executable name to make the CSV file > easier to parse? Implemented: rG9faedb2d7146

[PATCH] D78903: [Driver] Add option -fproc-stat-report

2020-11-16 Thread Thorsten via Phabricator via cfe-commits
tschuett added a comment. Could you add quotation marks around the executable name to make the CSV file easier to parse? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78903/new/ https://reviews.llvm.org/D78903

[PATCH] D78903: [Driver] Add option -fproc-stat-report

2020-11-12 Thread Serge Pavlov via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG92d7a84e128a: [Driver] Add option -fproc-stat-report (authored by sepavloff). Herald added a subscriber: dang. Changed prior to commit:

[PATCH] D78903: [Driver] Add option -fproc-stat-report

2020-06-18 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. Thank you @aganea ! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78903/new/ https://reviews.llvm.org/D78903 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D78903: [Driver] Add option -fproc-stat-report

2020-06-18 Thread Alexandre Ganea via Phabricator via cfe-commits
aganea accepted this revision. aganea added a comment. This revision is now accepted and ready to land. Thanks again for the changes @sepavloff! Looks good to me! You might wait a bit before commiting, if there are further comments. Comment at: clang/lib/Driver/Driver.cpp:3806

[PATCH] D78903: [Driver] Add option -fproc-stat-report

2020-06-18 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff marked 2 inline comments as done. sepavloff added inline comments. Comment at: clang/lib/Driver/Driver.cpp:3814 + llvm::raw_fd_ostream OS(StatReportFile, EC, llvm::sys::fs::OF_Append); + if (!EC) { +if (auto L = OS.tryToLock())

[PATCH] D78903: [Driver] Add option -fproc-stat-report

2020-06-18 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 271665. sepavloff added a comment. Updated patch Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78903/new/ https://reviews.llvm.org/D78903 Files: clang/docs/UsersManual.rst

[PATCH] D78903: [Driver] Add option -fproc-stat-report

2020-06-18 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 271648. sepavloff added a comment. Updated patch according to reviewer's notes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78903/new/ https://reviews.llvm.org/D78903 Files: clang/docs/UsersManual.rst

[PATCH] D78903: [Driver] Add option -fproc-stat-report

2020-06-17 Thread Alexandre Ganea via Phabricator via cfe-commits
aganea added inline comments. Comment at: clang/lib/Driver/Driver.cpp:3782 + = Cmd.getProcessStatistics(); + if (ProcStat) { +if (PrintProcessStat) { sepavloff wrote: > aganea wrote: > > In the case where `!ProcStat`, I am wondering if we

[PATCH] D78903: [Driver] Add option -fproc-stat-report

2020-06-17 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff marked 2 inline comments as done. sepavloff added inline comments. Comment at: clang/lib/Driver/Driver.cpp:3782 + = Cmd.getProcessStatistics(); + if (ProcStat) { +if (PrintProcessStat) { aganea wrote: > In the case where

[PATCH] D78903: [Driver] Add option -fproc-stat-report

2020-06-16 Thread Alexandre Ganea via Phabricator via cfe-commits
aganea added inline comments. Comment at: clang/lib/Driver/Driver.cpp:3782 + = Cmd.getProcessStatistics(); + if (ProcStat) { +if (PrintProcessStat) { In the case where `!ProcStat`, I am wondering if we shouldn't emit zero values, in the

[PATCH] D78903: [Driver] Add option -fproc-stat-report

2020-05-27 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff marked 4 inline comments as done. sepavloff added inline comments. Comment at: clang/lib/Driver/Driver.cpp:3772 +C.setPostCallback([=](const Command , int Res) { + const llvm::sys::ProcessStatistics = Cmd.getProcessStatistics(); + if (ProcStat.isSet())

[PATCH] D78903: [Driver] Add option -fproc-stat-report

2020-05-27 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 266506. sepavloff added a comment. Updated patch Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78903/new/ https://reviews.llvm.org/D78903 Files: clang/docs/UsersManual.rst

[PATCH] D78903: [Driver] Add option -fproc-stat-report

2020-05-02 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff marked an inline comment as done. sepavloff added inline comments. Comment at: clang/docs/UsersManual.rst:770 + $ cat abc + clang-11,"/tmp/foo-123456.o",92000,84000,87536 + ld,"a.out",900,8000,53568 aganea wrote: > sepavloff wrote: > > aganea

[PATCH] D78903: [Driver] Add option -fproc-stat-report

2020-05-02 Thread Thorsten via Phabricator via cfe-commits
tschuett added inline comments. Comment at: clang/lib/Driver/Driver.cpp:83 #include "llvm/Support/raw_ostream.h" +#include #include https://llvm.org/docs/CodingStandards.html#include-iostream-is-forbidden Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D78903: [Driver] Add option -fproc-stat-report

2020-05-02 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 261621. sepavloff added a comment. Updated patch - added variant of the option without file, it is used to print statistics on stdout. - Updated file locking mechanism. - Updated test and documentation accordingly. Repository: rG LLVM Github Monorepo

[PATCH] D78903: [Driver] Add option -fproc-stat-report

2020-04-29 Thread Alexandre Ganea via Phabricator via cfe-commits
aganea added inline comments. Comment at: clang/docs/UsersManual.rst:770 + $ cat abc + clang-11,"/tmp/foo-123456.o",92000,84000,87536 + ld,"a.out",900,8000,53568 sepavloff wrote: > aganea wrote: > > Please add a header to the output .CSV, specifying the

[PATCH] D78903: [Driver] Add option -fproc-stat-report

2020-04-29 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff marked 3 inline comments as done. sepavloff added inline comments. Comment at: clang/docs/UsersManual.rst:770 + $ cat abc + clang-11,"/tmp/foo-123456.o",92000,84000,87536 + ld,"a.out",900,8000,53568 aganea wrote: > Please add a header to the

[PATCH] D78903: [Driver] Add option -fproc-stat-report

2020-04-29 Thread Alexandre Ganea via Phabricator via cfe-commits
aganea added inline comments. Comment at: clang/docs/UsersManual.rst:786 + + $ clang -fproc-stat-report=- foo.c + clang-11: output=/tmp/foo-123456.o, total=84000, user=76000, mem=87496 MaskRay wrote: > aganea wrote: > > Why not just `-fproc-stat-report` in

[PATCH] D78903: [Driver] Add option -fproc-stat-report

2020-04-29 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/docs/UsersManual.rst:786 + + $ clang -fproc-stat-report=- foo.c + clang-11: output=/tmp/foo-123456.o, total=84000, user=76000, mem=87496 aganea wrote: > Why not just `-fproc-stat-report` in this case? It can

[PATCH] D78903: [Driver] Add option -fproc-stat-report

2020-04-27 Thread Alexandre Ganea via Phabricator via cfe-commits
aganea added inline comments. Comment at: clang/docs/UsersManual.rst:770 + $ cat abc + clang-11,"/tmp/foo-123456.o",92000,84000,87536 + ld,"a.out",900,8000,53568 Please add a header to the output .CSV, specifying the units of measure where relevant.

[PATCH] D78903: [Driver] Add option -fproc-stat-report

2020-04-27 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff created this revision. sepavloff added reviewers: rsmith, rjmccall, aganea, hans. Herald added a project: clang. sepavloff added parent revisions: D78897: [Support] raw_fd_ostream can lock file before write, D78899: [Driver] Add callback to Command execution, D78901: [Support] Get