all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Profiling native-compilation
@ 2021-04-23  7:10 Eli Zaretskii
  2021-04-23  8:45 ` Andrea Corallo via Emacs development discussions.
  0 siblings, 1 reply; 7+ messages in thread
From: Eli Zaretskii @ 2021-04-23  7:10 UTC (permalink / raw)
  To: Andrea Corallo; +Cc: emacs-devel

I tried to profile the code involved in native-compilation using
profiler.el, but the results seem to omit most of the functions
involved in that: the percents shown in the resulting profile are very
low, which seems to hint that most of the CPU time is spent in places
that profiler.el cannot identify.

Is it possible to use profiler.el to produce a meaningful profile of
native-compilation?  If yes, how does one go about setting up such
profiling?  And if this is not currently possible, why isn't it, and
can we do something to make the situation better?  For example, for at
least two C functions that are important to see in the profile -- GC
and redisplay -- we did arrange to be shown in the profile.  So if the
problem is that most of the time is spent inside C code, perhaps we
could do something similar in comp.c?

I think this is important because native-compilation is quite slow,
and at least I don't have a clear idea where most of that time is
spent.  Andrea, you said once that most of the time is spent in
libgccjit functions, which I find strange, since those are basically
parts of GCC code, and I don't think I ever saw such slow compilation
times from GCC.  So I guess there's more here than meets the eye, and
I think we should work on getting a clear idea where the time is
spent, so that we could improve it.  For example, if indeed libgccjit
is the main sink, we should ask the respective GCC developers to speed
it up.

Thanks.



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-04-23 13:46 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-04-23  7:10 Profiling native-compilation Eli Zaretskii
2021-04-23  8:45 ` Andrea Corallo via Emacs development discussions.
2021-04-23  8:57   ` Andrea Corallo via Emacs development discussions.
2021-04-23 10:48     ` Eli Zaretskii
2021-04-23 10:52       ` Eli Zaretskii
2021-04-23 10:47   ` Eli Zaretskii
2021-04-23 13:46     ` Andrea Corallo via Emacs development discussions.

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.