From: Basile Starynkevitch <basile@starynkevitch.net>
To: khareshivansh03@gmail.com
Cc: gcc@gcc.gnu.org
Subject: GCC -ftime-trace
Date: Sat, 11 Feb 2023 20:36:53 +0100 [thread overview]
Message-ID: <06594032-1183-8c05-2e03-0c8c37f3106c@starynkevitch.net> (raw)
Hello all,
Shivansh Khare wrote:
> I have looked into the different starter projects that are offered in the
> [Wiki GSoC page](https://gcc.gnu.org/wiki/SummerOfCode) and I was
> particularly interested in the `-ftime-trace` project. The following is
> what is given as a short description about the problematic:
> "Implement something similar to Clang's -ftime-trace feature which
> generates performance reports that show where the compiler spends compile
> time. For more information, please check the following blog post.
Are you aware of the existing -ftime-report option to GCC 12 or later?
On Linux (and probably many other POSIX) systems, at least in straight
(non-cross) x86-64 GCC compilers, implementing that should be not very
difficult. Here are some insights.
Read carefully https://man7.org/linux/man-pages/man7/time.7.html
First, you could experiment by writing a GCC plugin doing that timing
(in some experimental way).
https://gcc.gnu.org/onlinedocs/gccint/Plugins.html
Maybe consider later providing such a "standard" GCC plugin to do the
timing.
Modifying the pass manager
https://gcc.gnu.org/onlinedocs/gccint/Pass-manager.html#Pass-manager to
use clock_gettime system call. See
https://man7.org/linux/man-pages/man2/clock_gettime.2.html
It is related to plugin gate functions...
Regards.
BTW, my pet open source project is http://refpersys.org/ (symbolic
inference engine, work in progress).
--
Basile Starynkevitch <basile@starynkevitch.net>
(only mine opinions / les opinions sont miennes uniquement)
92340 Bourg-la-Reine, France
web page: starynkevitch.net/Basile/
next reply other threads:[~2023-02-11 19:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-11 19:36 Basile Starynkevitch [this message]
2023-02-13 8:14 ` Richard Biener
2023-02-13 16:44 ` NightStrike
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=06594032-1183-8c05-2e03-0c8c37f3106c@starynkevitch.net \
--to=basile@starynkevitch.net \
--cc=gcc@gcc.gnu.org \
--cc=khareshivansh03@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).