From: "Gerd Möllmann" <gerd.moellmann@gmail.com>
To: Helmut Eller <eller.helmut@gmail.com>
Cc: Eli Zaretskii <eliz@gnu.org>, emacs-devel@gnu.org
Subject: Re: MPS codegen
Date: Thu, 13 Jun 2024 20:31:37 +0200 [thread overview]
Message-ID: <m2wmms3d9y.fsf@pro2.fritz.box> (raw)
In-Reply-To: <m234pg1z0o.fsf@pro2.fritz.box> ("Gerd Möllmann"'s message of "Thu, 13 Jun 2024 20:24:55 +0200")
Gerd Möllmann <gerd.moellmann@gmail.com> writes:
> Helmut Eller <eller.helmut@gmail.com> writes:
>
>>> I think the thing I don't like is that I believe there should be only
>>> one description of an object's layout. Be it C (struct), or be it
>>> somethings else, from which C is generated.
>>
>> Sure, but that's easier said than done.
>
> Yeah :-). Too bad that GCC doesn't have something like Clang's Python
> API. Somehow I don't really believe in tree-sitter for this specific
> purpose. But what do I know...
>
>> BTW, the MPS documentation says that mps_reserve allocates a block. In
>> MPS, a block is not necessarily a single object. One possible
>> interpretation of this could be that mps_reserve can be used to allocate
>> a block that contains many objects. Perhaps we could use a single block
>> for the entire dump? E.g. implement a version of dump_mmap_contiguous
>> that uses mps_reserve. What's your interpretation?
>
> The same. I think I've read somewhere that anything goes in such a block
> as long as the object format can cope with it.
>
> OTOH, on my machine, the whole copying of the dump to MPS, mirroring and
> redirecting roots takes ca. 38ms ATM. Where the copying and mirroring
> are the two main contributors and take about the same time. Maybe
> there's not much to win.
Here's what it prints, times can vary a bit
/Users/gerd/emacs/github/igc % IGC_MIRROR_STATS=1 src/emacs -Q
--------------------------------------------------
Type N Bytes
--------------------------------------------------
IGC_OBJ_INVALID 0 0
IGC_OBJ_PAD 0 0
IGC_OBJ_FWD 0 0
IGC_OBJ_CONS 285532 6852768
IGC_OBJ_SYMBOL 16268 911008
IGC_OBJ_INTERVAL 31 1984
IGC_OBJ_STRING 62964 2518560
IGC_OBJ_STRING_DATA 62964 2237944
IGC_OBJ_VECTOR 41660 6023960
IGC_OBJ_VECTOR_WEAK 5 208
IGC_OBJ_ITREE_TREE 0 0
IGC_OBJ_ITREE_NODE 4 352
IGC_OBJ_IMAGE 0 0
IGC_OBJ_IMAGE_CACHE 0 0
IGC_OBJ_FACE 0 0
IGC_OBJ_FACE_CACHE 0 0
IGC_OBJ_FLOAT 169 4056
IGC_OBJ_BLV 164 7872
IGC_OBJ_PTR_VEC 0 0
IGC_OBJ_OBJ_VEC 0 0
IGC_OBJ_HASH_VEC 528 376528
IGC_OBJ_HANDLER 0 0
IGC_OBJ_BYTES 0 0
IGC_OBJ_BUILTIN_SYMBOL 0 0
IGC_OBJ_BUILTIN_THREAD 0 0
IGC_OBJ_BUILTIN_SUBR 0 0
--------------------------------------------------
Type N Bytes
--------------------------------------------------
PVEC_NORMAL_VECTOR 29569 1588104
PVEC_FREE 0 0
PVEC_BIGNUM 0 0
PVEC_MARKER 18 864
PVEC_OVERLAY 4 160
PVEC_FINALIZER 0 0
PVEC_SYMBOL_WITH_POS 0 0
PVEC_MISC_PTR 0 0
PVEC_USER_PTR 0 0
PVEC_PROCESS 0 0
PVEC_FRAME 1 592
PVEC_WINDOW 2 1088
PVEC_BOOL_VECTOR 340 13600
PVEC_BUFFER 6 6000
PVEC_HASH_TABLE 322 28336
PVEC_TERMINAL 0 0
PVEC_WINDOW_CONFIGURATION 0 0
PVEC_SUBR 0 0
PVEC_PACKAGE 24 1728
PVEC_OTHER 0 0
PVEC_XWIDGET 0 0
PVEC_XWIDGET_VIEW 0 0
PVEC_THREAD 0 0
PVEC_MUTEX 0 0
PVEC_CONDVAR 0 0
PVEC_MODULE_FUNCTION 0 0
PVEC_MODULE_GLOBAL_REFERENCE 0 0
PVEC_NATIVE_COMP_UNIT 0 0
PVEC_TS_PARSER 0 0
PVEC_TS_NODE 0 0
PVEC_TS_COMPILED_QUERY 0 0
PVEC_SQLITE 0 0
PVEC_CLOSURE 6585 372048
PVEC_CHAR_TABLE 80 45864
PVEC_SUB_CHAR_TABLE 4305 3941400
PVEC_RECORD 402 23936
PVEC_FONT 2 240
--------------------------------------------------
Total 470289 18935240
--------------------------------------------------
Copy objects to MPS 0.0197s
Mirror references 0.0152s
Redirect roots 0.0001s
Total time 0.0351s
next prev parent reply other threads:[~2024-06-13 18:31 UTC|newest]
Thread overview: 62+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-10 13:39 MPS: Update Gerd Möllmann
2024-06-10 16:17 ` Andrea Corallo
2024-06-10 16:26 ` Gerd Möllmann
2024-06-10 16:44 ` Gerd Möllmann
2024-06-10 20:58 ` Andrea Corallo
2024-06-11 3:12 ` Gerd Möllmann
2024-06-11 20:35 ` Helmut Eller
2024-06-12 4:45 ` Gerd Möllmann
2024-06-12 7:54 ` Eli Zaretskii
2024-06-12 8:00 ` Gerd Möllmann
2024-06-13 9:07 ` MPS codegen (was: MPS: Update) Helmut Eller
2024-06-13 12:33 ` MPS codegen Gerd Möllmann
2024-06-13 17:48 ` Helmut Eller
2024-06-13 18:24 ` Gerd Möllmann
2024-06-13 18:31 ` Gerd Möllmann [this message]
2024-06-13 18:38 ` Helmut Eller
2024-06-13 18:54 ` Gerd Möllmann
2024-06-13 19:15 ` Helmut Eller
2024-06-13 19:37 ` Gerd Möllmann
2024-06-14 6:37 ` Eli Zaretskii
2024-06-14 7:30 ` Gerd Möllmann
2024-06-14 7:56 ` Gerd Möllmann
2024-06-14 10:52 ` Eli Zaretskii
2024-06-14 10:46 ` Eli Zaretskii
2024-06-13 23:09 ` Andrea Corallo
2024-06-14 6:08 ` Gerd Möllmann
2024-06-14 7:45 ` Helmut Eller
2024-06-14 7:59 ` Gerd Möllmann
2024-06-14 8:28 ` Gerd Möllmann
2024-06-14 8:51 ` Helmut Eller
2024-06-14 11:32 ` Eli Zaretskii
2024-06-14 12:43 ` Gerd Möllmann
2024-06-14 13:04 ` Eli Zaretskii
2024-06-14 13:17 ` Gerd Möllmann
2024-06-14 13:46 ` Eli Zaretskii
2024-06-14 14:05 ` Gerd Möllmann
2024-06-14 14:33 ` Eli Zaretskii
2024-06-14 14:46 ` Gerd Möllmann
2024-06-14 16:30 ` Helmut Eller
2024-06-14 18:28 ` Eli Zaretskii
2024-06-14 19:03 ` Eli Zaretskii
2024-06-14 19:26 ` Helmut Eller
2024-06-14 19:50 ` Gerd Möllmann
2024-06-15 6:26 ` Eli Zaretskii
2024-06-15 7:10 ` Gerd Möllmann
2024-06-15 7:34 ` Eli Zaretskii
2024-06-15 8:22 ` Gerd Möllmann
2024-06-15 6:11 ` Eli Zaretskii
2024-06-15 7:25 ` Gerd Möllmann
2024-06-15 7:46 ` Eli Zaretskii
2024-06-15 8:14 ` Gerd Möllmann
2024-06-15 8:38 ` Gerd Möllmann
2024-06-15 8:44 ` Helmut Eller
2024-06-15 8:56 ` Gerd Möllmann
2024-06-15 9:07 ` Helmut Eller
2024-06-15 9:27 ` Gerd Möllmann
2024-06-15 12:33 ` Gerd Möllmann
2024-06-16 6:16 ` Gerd Möllmann
2024-06-16 7:53 ` Eli Zaretskii
2024-06-16 8:19 ` Gerd Möllmann
2024-06-16 8:40 ` Helmut Eller
2024-06-16 8:49 ` Gerd Möllmann
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m2wmms3d9y.fsf@pro2.fritz.box \
--to=gerd.moellmann@gmail.com \
--cc=eliz@gnu.org \
--cc=eller.helmut@gmail.com \
--cc=emacs-devel@gnu.org \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
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).