all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Daniel Colascione" <dancol@dancol.org>
To: "Stefan Monnier" <monnier@IRO.UMontreal.CA>
Cc: Daniel Colascione <dancol@dancol.org>, emacs-devel@gnu.org
Subject: Re: pdumper's performance
Date: Wed, 29 Aug 2018 15:10:24 -0700	[thread overview]
Message-ID: <b6e2b55afe3c266eddad51a230c1da52.squirrel@dancol.org> (raw)
In-Reply-To: <jwvpny1exrn.fsf-monnier+emacs@gnu.org>

> I was looking at the pdumper and one thing I was wondering is how to use
> of all the <foo>_marked_p and set_<foo>_marked functions impacts GC (and
> hence) runtime performance.
>
> I mean the fact that they're functions is perfectly fine, but the fact
> that they need to test pdumper_object_p might have a measurable impact,
> since I believe these operations are performed very many times per GC.

The cache line that holds that the dump region bounds ends up being very
hot, so testing it isn't really that expensive.

You can see for yourself whether there's an impact. Compile an Emacs with
support for both pdumper and unexec, dump it with unexec, and compare its
GC performance to Emacs built without support for pdumper and also dumped
with unexec.

As I recall, the difference is minimal.

Besides, you get performance back at the end: the dump region's mark bits
are stored contiguously and we can clear them very quickly at the end of
GC.

> Also I don't quite understand why this is needed: IIUC the markbits of
> pdump'd objects are stored elsewhere, but I don't understand why that
> needs to be the case.

Because we don't store dumped objects in blocks and so the calculations of
the normal locations of their mark bits would be wrong.




  reply	other threads:[~2018-08-29 22:10 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-29 20:29 pdumper's performance Stefan Monnier
2018-08-29 22:10 ` Daniel Colascione [this message]
2018-08-30  2:14   ` Stefan Monnier
2018-08-30  5:19     ` Daniel Colascione
2018-09-04 16:26       ` Stefan Monnier
2018-09-04 16:42         ` Daniel Colascione
2018-09-04 19:30           ` Stefan Monnier
2018-09-04 19:35             ` Daniel Colascione
2018-09-04 20:58               ` Stefan Monnier
2018-09-04 21:20                 ` Daniel Colascione
2018-09-04 21:49                   ` Stefan Monnier
2018-09-04 21:33                 ` Stefan Monnier

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=b6e2b55afe3c266eddad51a230c1da52.squirrel@dancol.org \
    --to=dancol@dancol.org \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@IRO.UMontreal.CA \
    /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.
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.