public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Questions on parallel processing and multi-threading support in GCC's profiling collection
@ 2023-07-17 15:01 Qing Zhao
  0 siblings, 0 replies; only message in thread
From: Qing Zhao @ 2023-07-17 15:01 UTC (permalink / raw)
  To: jan Hubicka; +Cc: GCC

Hi, Jan,

I did a little search online and also into GCC’s documentation, and found the following 
several options to support parallel processing  and multi-threading during profiling collection:

https://gcc.gnu.org/onlinedocs/gcc-10.5.0/gcc/Instrumentation-Options.html

-fprofile-dir=path and -fprofile-reproducible=[multithreaded|parallel-runs|serial]

=======
-fprofile-dir=path
…..
When an executable is run in a massive parallel environment, it is recommended to save profile to different folders. That can be done with variables in path that are exported during run-time:

%p
process ID.

%q{VAR}
value of environment variable VAR

-fprofile-reproducible=[multithreaded|parallel-runs|serial]
….

With -fprofile-reproducible=parallel-runs collected profile stays reproducible regardless the order of streaming of the data into gcda files. This setting makes it possible to run multiple instances of instrumented program in parallel (such as with make -j). This reduces quality of gathered data, in particular of indirect call profiling.

======

I have the following questions on GCC’s  profiling collection with parallel processing or multi-threading environment: 

1. In addition to the above two options, are there any other changes in GCC to support parallel processing or multi-threading?
2. Is there any documentation on how to collect and use profiling feedback for a parallel processing or multi-threading environment safely and accurately?
3. I noted that -fprofile-dir=path was added in GCC9, and -fprofile-reproducible was added in GCC10, is it doable to add these two options back to GCC8 to 
    Support parallel processing and multi-threading profiling collection? 

Thanks a lot for your help.

Qing

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-07-17 15:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-17 15:01 Questions on parallel processing and multi-threading support in GCC's profiling collection Qing Zhao

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).