* bug#74805: 30.0.92; Trying to build scratch/igc on Cygwin
@ 2024-12-11 22:50 Ken Brown
2024-12-11 23:47 ` Pip Cet via Bug reports for GNU Emacs, the Swiss army knife of text editors
` (3 more replies)
0 siblings, 4 replies; 22+ messages in thread
From: Ken Brown @ 2024-12-11 22:50 UTC (permalink / raw)
To: 74805
I've made a first attempt to port mps to Cygwin. If anyone else is
interested in seeing this or helping, you can find my work at
https://github.com/kbrow1i/mps-cygwin
This is a fork of the mps git repo with two commits on top.
With the current attempt, I can build the scratch/igc branch, but there
are many test failures. For example, when I run the process-tests, I
get 19 failures and 8 skipped tests. But on the master branch I get no
failures and only 3 skipped.
This probably means that my current attempt to port mps is no good, and
I have to go back to the drawing board. Before I do that, however, I'd
like to check and see if test failures on scratch/igc are to be
expected. Are people testing other platforms seeing this too?
Thanks.
Ken
^ permalink raw reply [flat|nested] 22+ messages in thread
* bug#74805: 30.0.92; Trying to build scratch/igc on Cygwin
2024-12-11 22:50 bug#74805: 30.0.92; Trying to build scratch/igc on Cygwin Ken Brown
@ 2024-12-11 23:47 ` Pip Cet via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-12-12 18:14 ` Ken Brown
2024-12-11 23:57 ` Andrea Corallo
` (2 subsequent siblings)
3 siblings, 1 reply; 22+ messages in thread
From: Pip Cet via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-12-11 23:47 UTC (permalink / raw)
To: Ken Brown; +Cc: 74805
"Ken Brown" <kbrown@cornell.edu> writes:
> I've made a first attempt to port mps to Cygwin. If anyone else is
> interested in seeing this or helping, you can find my work at
>
> https://github.com/kbrow1i/mps-cygwin
>
> This is a fork of the mps git repo with two commits on top.
>
> With the current attempt, I can build the scratch/igc branch, but there
> are many test failures. For example, when I run the process-tests, I
But the Emacs binary "works", to some extent? Is there anything in the
process-tests.log file which hints at what kind of problem it might be?
Does it work interactively, or crash right away?
> get 19 failures and 8 skipped tests. But on the master branch I get no
> failures and only 3 skipped.
That sounds like a "minor" GC problem; a word size mismatch or alignment
problem would probably lead to a hard crash, so it's more likely to be a
problem in scanning the stack.
I'm a bit confused about the role of prmccyi6.c; it's included in the
cyi6gc.mk fragment, but it's not included by mps.c directly. How are you
building MPS?
I see that you have defined (in prmccyi6.c)
Addr MutatorContextSP(MutatorContext context)
{
AVERT(MutatorContext, context);
return (Addr)context->ucontext->uc_mcontext.rsp; /* .sp */
}
using the MutatorContextStruct from prmcix.h, which uses an ucontext.
However, you also include prmcw3.c, which uses a different definition of
MutatorContextStruct. I don't think those two are compatible, so it's
possible that's the problem, depending on how you build mps.
> This probably means that my current attempt to port mps is no good, and
> I have to go back to the drawing board. Before I do that, however, I'd
> like to check and see if test failures on scratch/igc are to be
> expected. Are people testing other platforms seeing this too?
I see a few test failures on Windows, but nothing as catastrophic as
what you describe.
Do you have a usable debugger/gdb on your platform? That would
be one approach to diagnosing crashes (if the problem is indeed that
Emacs crashes). Another approach would be to run the test suite
included in MPS.
Pip
^ permalink raw reply [flat|nested] 22+ messages in thread
* bug#74805: 30.0.92; Trying to build scratch/igc on Cygwin
2024-12-11 22:50 bug#74805: 30.0.92; Trying to build scratch/igc on Cygwin Ken Brown
2024-12-11 23:47 ` Pip Cet via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2024-12-11 23:57 ` Andrea Corallo
2024-12-12 6:09 ` Eli Zaretskii
2024-12-12 11:05 ` Stefan Kangas
3 siblings, 0 replies; 22+ messages in thread
From: Andrea Corallo @ 2024-12-11 23:57 UTC (permalink / raw)
To: Ken Brown; +Cc: 74805
Ken Brown <kbrown@cornell.edu> writes:
> I've made a first attempt to port mps to Cygwin. If anyone else is
> interested in seeing this or helping, you can find my work at
>
> https://github.com/kbrow1i/mps-cygwin
>
> This is a fork of the mps git repo with two commits on top.
>
> With the current attempt, I can build the scratch/igc branch, but there
> are many test failures. For example, when I run the process-tests, I
> get 19 failures and 8 skipped tests. But on the master branch I get no
> failures and only 3 skipped.
Is the testsuite supposed to be clean on igc on supported platforms?
Last time I asked Gerd explained me it was still not the case but maybe
things evolved.
Andrea
^ permalink raw reply [flat|nested] 22+ messages in thread
* bug#74805: 30.0.92; Trying to build scratch/igc on Cygwin
2024-12-11 22:50 bug#74805: 30.0.92; Trying to build scratch/igc on Cygwin Ken Brown
2024-12-11 23:47 ` Pip Cet via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-12-11 23:57 ` Andrea Corallo
@ 2024-12-12 6:09 ` Eli Zaretskii
2024-12-12 18:12 ` Ken Brown
2024-12-20 23:48 ` Ken Brown
2024-12-12 11:05 ` Stefan Kangas
3 siblings, 2 replies; 22+ messages in thread
From: Eli Zaretskii @ 2024-12-12 6:09 UTC (permalink / raw)
To: Ken Brown; +Cc: 74805
> Date: Wed, 11 Dec 2024 17:50:40 -0500
> From: Ken Brown <kbrown@cornell.edu>
>
> I've made a first attempt to port mps to Cygwin. If anyone else is
> interested in seeing this or helping, you can find my work at
>
> https://github.com/kbrow1i/mps-cygwin
>
> This is a fork of the mps git repo with two commits on top.
Thanks, good news! Could you please post the patches here, so that
they are recorded in our bug tracker?
> With the current attempt, I can build the scratch/igc branch, but there
> are many test failures. For example, when I run the process-tests, I
> get 19 failures and 8 skipped tests. But on the master branch I get no
> failures and only 3 skipped.
>
> This probably means that my current attempt to port mps is no good, and
> I have to go back to the drawing board.
Did you run the MPS test suite, and if you did, were there any
failures? My suggestion is to make sure the MPS test suite passes
cleanly, including in several consecutive runs (when I ported MPS to
32-bit MinGW, I had intermittent failures which only happened once in
several runs, until I fixed that).
^ permalink raw reply [flat|nested] 22+ messages in thread
* bug#74805: 30.0.92; Trying to build scratch/igc on Cygwin
2024-12-11 22:50 bug#74805: 30.0.92; Trying to build scratch/igc on Cygwin Ken Brown
` (2 preceding siblings ...)
2024-12-12 6:09 ` Eli Zaretskii
@ 2024-12-12 11:05 ` Stefan Kangas
2024-12-12 11:30 ` Eli Zaretskii
3 siblings, 1 reply; 22+ messages in thread
From: Stefan Kangas @ 2024-12-12 11:05 UTC (permalink / raw)
To: Ken Brown, 74805
Ken Brown <kbrown@cornell.edu> writes:
> I've made a first attempt to port mps to Cygwin. If anyone else is
> interested in seeing this or helping, you can find my work at
>
> https://github.com/kbrow1i/mps-cygwin
>
> This is a fork of the mps git repo with two commits on top.
>
> With the current attempt, I can build the scratch/igc branch, but there
> are many test failures. For example, when I run the process-tests, I
> get 19 failures and 8 skipped tests. But on the master branch I get no
> failures and only 3 skipped.
>
> This probably means that my current attempt to port mps is no good, and
> I have to go back to the drawing board. Before I do that, however, I'd
> like to check and see if test failures on scratch/igc are to be
> expected. Are people testing other platforms seeing this too?
Do we expect upstream to be amenable to eventually taking these patches?
I see that they officially only support "Windows Vista or later, on
IA-32 and x86-64, using Microsoft Visual C/C++".
^ permalink raw reply [flat|nested] 22+ messages in thread
* bug#74805: 30.0.92; Trying to build scratch/igc on Cygwin
2024-12-12 11:05 ` Stefan Kangas
@ 2024-12-12 11:30 ` Eli Zaretskii
2024-12-12 12:06 ` Gerd Möllmann
0 siblings, 1 reply; 22+ messages in thread
From: Eli Zaretskii @ 2024-12-12 11:30 UTC (permalink / raw)
To: Stefan Kangas, Gerd Möllmann; +Cc: 74805, kbrown
> From: Stefan Kangas <stefankangas@gmail.com>
> Date: Thu, 12 Dec 2024 03:05:58 -0800
>
> Ken Brown <kbrown@cornell.edu> writes:
>
> > I've made a first attempt to port mps to Cygwin. If anyone else is
> > interested in seeing this or helping, you can find my work at
> >
> > https://github.com/kbrow1i/mps-cygwin
> >
> > This is a fork of the mps git repo with two commits on top.
> >
> > With the current attempt, I can build the scratch/igc branch, but there
> > are many test failures. For example, when I run the process-tests, I
> > get 19 failures and 8 skipped tests. But on the master branch I get no
> > failures and only 3 skipped.
> >
> > This probably means that my current attempt to port mps is no good, and
> > I have to go back to the drawing board. Before I do that, however, I'd
> > like to check and see if test failures on scratch/igc are to be
> > expected. Are people testing other platforms seeing this too?
>
> Do we expect upstream to be amenable to eventually taking these patches?
I don't think we've asked them. Maybe Gerd knows?
> I see that they officially only support "Windows Vista or later, on
> IA-32 and x86-64, using Microsoft Visual C/C++".
Yes.
^ permalink raw reply [flat|nested] 22+ messages in thread
* bug#74805: 30.0.92; Trying to build scratch/igc on Cygwin
2024-12-12 11:30 ` Eli Zaretskii
@ 2024-12-12 12:06 ` Gerd Möllmann
2024-12-12 14:38 ` Eli Zaretskii
0 siblings, 1 reply; 22+ messages in thread
From: Gerd Möllmann @ 2024-12-12 12:06 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 74805, Stefan Kangas, kbrown
Eli Zaretskii <eliz@gnu.org> writes:
>> From: Stefan Kangas <stefankangas@gmail.com>
>> Date: Thu, 12 Dec 2024 03:05:58 -0800
>>
>> Ken Brown <kbrown@cornell.edu> writes:
>>
>> > I've made a first attempt to port mps to Cygwin. If anyone else is
>> > interested in seeing this or helping, you can find my work at
>> >
>> > https://github.com/kbrow1i/mps-cygwin
>> >
>> > This is a fork of the mps git repo with two commits on top.
>> >
>> > With the current attempt, I can build the scratch/igc branch, but there
>> > are many test failures. For example, when I run the process-tests, I
>> > get 19 failures and 8 skipped tests. But on the master branch I get no
>> > failures and only 3 skipped.
>> >
>> > This probably means that my current attempt to port mps is no good, and
>> > I have to go back to the drawing board. Before I do that, however, I'd
>> > like to check and see if test failures on scratch/igc are to be
>> > expected. Are people testing other platforms seeing this too?
>>
>> Do we expect upstream to be amenable to eventually taking these patches?
>
> I don't think we've asked them. Maybe Gerd knows?
I haven't done anything like that. I've only submitted some minor Github
issue when I was playing with MPS, and I've sent them a mail to let them
know what's going on when I made what I had public here on emacs-devel.
^ permalink raw reply [flat|nested] 22+ messages in thread
* bug#74805: 30.0.92; Trying to build scratch/igc on Cygwin
2024-12-12 12:06 ` Gerd Möllmann
@ 2024-12-12 14:38 ` Eli Zaretskii
2024-12-12 15:01 ` Gerd Möllmann
0 siblings, 1 reply; 22+ messages in thread
From: Eli Zaretskii @ 2024-12-12 14:38 UTC (permalink / raw)
To: Gerd Möllmann; +Cc: 74805, stefankangas, kbrown
> From: Gerd Möllmann <gerd.moellmann@gmail.com>
> Cc: Stefan Kangas <stefankangas@gmail.com>, kbrown@cornell.edu,
> 74805@debbugs.gnu.org
> Date: Thu, 12 Dec 2024 13:06:41 +0100
>
> Eli Zaretskii <eliz@gnu.org> writes:
>
> >> From: Stefan Kangas <stefankangas@gmail.com>
> >> Date: Thu, 12 Dec 2024 03:05:58 -0800
> >>
> >> Ken Brown <kbrown@cornell.edu> writes:
> >>
> >> > I've made a first attempt to port mps to Cygwin. If anyone else is
> >> > interested in seeing this or helping, you can find my work at
> >> >
> >> > https://github.com/kbrow1i/mps-cygwin
> >> >
> >> > This is a fork of the mps git repo with two commits on top.
> >> >
> >> > With the current attempt, I can build the scratch/igc branch, but there
> >> > are many test failures. For example, when I run the process-tests, I
> >> > get 19 failures and 8 skipped tests. But on the master branch I get no
> >> > failures and only 3 skipped.
> >> >
> >> > This probably means that my current attempt to port mps is no good, and
> >> > I have to go back to the drawing board. Before I do that, however, I'd
> >> > like to check and see if test failures on scratch/igc are to be
> >> > expected. Are people testing other platforms seeing this too?
> >>
> >> Do we expect upstream to be amenable to eventually taking these patches?
> >
> > I don't think we've asked them. Maybe Gerd knows?
>
> I haven't done anything like that. I've only submitted some minor Github
> issue when I was playing with MPS, and I've sent them a mail to let them
> know what's going on when I made what I had public here on emacs-devel.
So maybe we should ask them. It could be a factor in our decision
whether we want to fork MPS and maintain our own fork.
^ permalink raw reply [flat|nested] 22+ messages in thread
* bug#74805: 30.0.92; Trying to build scratch/igc on Cygwin
2024-12-12 14:38 ` Eli Zaretskii
@ 2024-12-12 15:01 ` Gerd Möllmann
0 siblings, 0 replies; 22+ messages in thread
From: Gerd Möllmann @ 2024-12-12 15:01 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 74805, stefankangas, kbrown
Eli Zaretskii <eliz@gnu.org> writes:
>> I haven't done anything like that. I've only submitted some minor Github
>> issue when I was playing with MPS, and I've sent them a mail to let them
>> know what's going on when I made what I had public here on emacs-devel.
>
> So maybe we should ask them. It could be a factor in our decision
> whether we want to fork MPS and maintain our own fork.
Yes, I think something "official" from the maintainers would be a good
thing. The email I used back then to inform them of what's
going on was info@ravenbrook.com. Couldn't find something better.
^ permalink raw reply [flat|nested] 22+ messages in thread
* bug#74805: 30.0.92; Trying to build scratch/igc on Cygwin
2024-12-12 6:09 ` Eli Zaretskii
@ 2024-12-12 18:12 ` Ken Brown
2024-12-12 19:25 ` Eli Zaretskii
2024-12-20 23:48 ` Ken Brown
1 sibling, 1 reply; 22+ messages in thread
From: Ken Brown @ 2024-12-12 18:12 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 74805
[-- Attachment #1: Type: text/plain, Size: 1648 bytes --]
On 12/12/2024 1:09 AM, Eli Zaretskii wrote:
>> Date: Wed, 11 Dec 2024 17:50:40 -0500
>> From: Ken Brown <kbrown@cornell.edu>
>>
>> I've made a first attempt to port mps to Cygwin. If anyone else is
>> interested in seeing this or helping, you can find my work at
>>
>> https://github.com/kbrow1i/mps-cygwin
>>
>> This is a fork of the mps git repo with two commits on top.
>
> Thanks, good news! Could you please post the patches here, so that
> they are recorded in our bug tracker?
Unfortunately, the approach I tried, which was suggested by one of the
MPS developers, fails badly. I already mentioned the test failures, but
now I've tried to run Emacs interactively, and I can't even get a
directory listing. For the record, I'm attaching the patches I've
accumulated so far, but I'll have to try a completely different
approach. This will probably take me a while.
>
>> With the current attempt, I can build the scratch/igc branch, but there
>> are many test failures. For example, when I run the process-tests, I
>> get 19 failures and 8 skipped tests. But on the master branch I get no
>> failures and only 3 skipped.
>>
>> This probably means that my current attempt to port mps is no good, and
>> I have to go back to the drawing board.
>
> Did you run the MPS test suite, and if you did, were there any
> failures? My suggestion is to make sure the MPS test suite passes
> cleanly, including in several consecutive runs (when I ported MPS to
> 32-bit MinGW, I had intermittent failures which only happened once in
> several runs, until I fixed that).
There are lots of test failures. Back to the drawing board.
Ken
[-- Attachment #2: 0001-Porting-to-Cygwin-first-attempt.patch --]
[-- Type: text/plain, Size: 11640 bytes --]
From 30976ef9d2407092b44f2f6126dcddef717252ca Mon Sep 17 00:00:00 2001
From: Ken Brown <kbrown@cornell.edu>
Date: Mon, 9 Dec 2024 13:29:04 -0500
Subject: [PATCH 1/4] Porting to Cygwin, first attempt
Add Cygwin as a recognized platform. Mostly copy the FreeBSD case.
This builds but fails to work properly because of an mmap problem on
Cygwin: You can't remap without first unmapping. See
https://cygwin.com/pipermail/cygwin/2018-February/236044.html
It's probably possible to work around this by replacing mmap and
friends by direct calls to VirtualAlloc and friends.
---
code/config.h | 4 ++--
code/cyi6gc.gmk | 55 ++++++++++++++++++++++++++++++++++++++++++++++
code/lockix.c | 5 +++--
code/mps.c | 15 +++++++++++++
code/mpstd.h | 19 ++++++++++++++++
code/prmccyi6.c | 58 +++++++++++++++++++++++++++++++++++++++++++++++++
code/prmcix.c | 4 ++--
code/protix.c | 5 +++--
code/protsgix.c | 4 ++--
code/pthrdext.c | 4 ++--
code/testthr.h | 3 ++-
code/thix.c | 4 ++--
code/vmix.c | 5 +++--
13 files changed, 168 insertions(+), 17 deletions(-)
create mode 100644 code/cyi6gc.gmk
create mode 100644 code/prmccyi6.c
diff --git a/code/config.h b/code/config.h
index 02d335efec6f..5abf6c982596 100644
--- a/code/config.h
+++ b/code/config.h
@@ -543,7 +543,7 @@
* <https://www.gnu.org/software/libc/manual/html_node/Feature-Test-Macros.html>
*/
-#if defined(MPS_OS_LI)
+#if defined(MPS_OS_LI) || defined(MPS_OS_CY)
#if defined(_XOPEN_SOURCE) && _XOPEN_SOURCE < 500
#undef _XOPEN_SOURCE
@@ -616,7 +616,7 @@
/* POSIX thread extensions configuration -- see <code/pthrdext.c> */
-#if defined(MPS_OS_LI) || defined(MPS_OS_FR)
+#if defined(MPS_OS_LI) || defined(MPS_OS_FR) || defined(MPS_OS_CY)
/* PTHREADEXT_SIGSUSPEND -- signal used to suspend a thread
* <design/pthreadext#.impl.signals>
diff --git a/code/cyi6gc.gmk b/code/cyi6gc.gmk
new file mode 100644
index 000000000000..98b863274bac
--- /dev/null
+++ b/code/cyi6gc.gmk
@@ -0,0 +1,55 @@
+# -*- makefile -*-
+#
+# cyi6gc.gmk: BUILD FOR CYGWIN/x64/GCC PLATFORM
+#
+# $Id$
+# Copyright (c) 2001-2020 Ravenbrook Limited. See end of file for license.
+
+PFM = cyi6gc
+
+MPMPF = \
+ lockix.c \
+ prmcanan.c \
+ prmccyi6.c \
+ prmci6.c \
+ protix.c \
+ protsgix.c \
+ pthrdext.c \
+ span.c \
+ thix.c \
+ vmix.c
+
+LIBS = -lm -lpthread
+
+include gc.gmk
+include comm.gmk
+
+
+# C. COPYRIGHT AND LICENSE
+#
+# Copyright (C) 2001-2020 Ravenbrook Limited <https://www.ravenbrook.com/>.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the
+# distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
diff --git a/code/lockix.c b/code/lockix.c
index a6555f5bb360..3c4e1939c739 100644
--- a/code/lockix.c
+++ b/code/lockix.c
@@ -31,8 +31,9 @@
#include "mpm.h"
-#if !defined(MPS_OS_FR) && !defined(MPS_OS_LI) && !defined(MPS_OS_XC)
-#error "lockix.c is specific to MPS_OS_FR, MPS_OS_LI or MPS_OS_XC"
+#if !defined(MPS_OS_FR) && !defined(MPS_OS_LI) && !defined(MPS_OS_XC) \
+ && !defined(MPS_OS_CY)
+#error "lockix.c is specific to MPS_OS_FR, MPS_OS_LI, MPS_OS_XC, or MPS_OS_CY"
#endif
#include "lock.h"
diff --git a/code/mps.c b/code/mps.c
index e7872b3c14a0..a2bb7f003f5d 100644
--- a/code/mps.c
+++ b/code/mps.c
@@ -256,6 +256,21 @@
#include "spw3i6.c" /* Windows on x86-64 stack probe */
#include "mpsiw3.c" /* Windows interface layer extras */
+/* Cygwin on x86-64 built with GCC */
+
+#elif defined(MPS_PF_CYI6GC)
+
+#include "lockix.c" /* Posix locks */
+#include "thix.c" /* Posix threading */
+#include "pthrdext.c" /* Posix thread extensions */
+#include "vmix.c" /* Posix virtual memory */
+#include "protix.c" /* Posix protection */
+#include "protsgix.c" /* Posix signal handling */
+#include "prmcanan.c" /* generic architecture mutator context */
+#include "prmcix.c" /* Posix mutator context */
+#include "prmccyi6.c" /* x86-64 for Cygwin mutator context */
+#include "span.c" /* generic stack probe */
+
#else
#error "Unknown platform -- can't determine platform specific parts."
diff --git a/code/mpstd.h b/code/mpstd.h
index 7df1c2a12f6d..d2c21d263064 100644
--- a/code/mpstd.h
+++ b/code/mpstd.h
@@ -392,6 +392,25 @@
#define MPS_PF_ALIGN 8
+/* GCC 12.4.0, gcc -E -dM */
+
+#elif defined(__CYGWIN__) && defined(__x86_64__) && defined(__GNUC__) \
+ && !defined(__clang__)
+#if defined(CONFIG_PF_STRING) && ! defined(CONFIG_PF_CYI6GC)
+#error "specified CONFIG_PF_... inconsistent with detected cyi6gc"
+#endif
+#define MPS_PF_CYI6GC
+#define MPS_PF_STRING "cyi6gc"
+#define MPS_OS_CY
+#define MPS_ARCH_I6
+#define MPS_BUILD_GC
+#define MPS_T_WORD unsigned long
+#define MPS_T_ULONGEST unsigned long
+#define MPS_WORD_WIDTH 64
+#define MPS_WORD_SHIFT 6
+#define MPS_PF_ALIGN 8
+
+
#else
#error "The MPS Kit does not have a configuration for this platform out of the box; see manual/build.txt"
#endif
diff --git a/code/prmccyi6.c b/code/prmccyi6.c
new file mode 100644
index 000000000000..e5085185b369
--- /dev/null
+++ b/code/prmccyi6.c
@@ -0,0 +1,58 @@
+/* prmccyi6.c: MUTATOR CONTEXT x64 (CYGWIN)
+ *
+ * $Id$
+ * Copyright (c) 2001-2020 Ravenbrook Limited. See end of file for license.
+ *
+ * .purpose: Implement the mutator context module. <design/prmc>.
+ *
+ *
+ * ASSUMPTIONS
+ *
+ * .sp: The stack pointer in the context is RSP.
+ */
+
+#include "prmcix.h"
+#include "prmci6.h"
+
+SRCID(prmcfri6, "$Id$");
+
+#if !defined(MPS_OS_CY) || !defined(MPS_ARCH_I6)
+#error "prmccyi6.c is specific to MPS_OS_CY and MPS_ARCH_I6"
+#endif
+
+
+Addr MutatorContextSP(MutatorContext context)
+{
+ AVERT(MutatorContext, context);
+ return (Addr)context->ucontext->uc_mcontext.rsp; /* .sp */
+}
+
+
+/* C. COPYRIGHT AND LICENSE
+ *
+ * Copyright (C) 2001-2020 Ravenbrook Limited <https://www.ravenbrook.com/>.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+ * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
diff --git a/code/prmcix.c b/code/prmcix.c
index 8529405ae9c7..0af391eb45c7 100644
--- a/code/prmcix.c
+++ b/code/prmcix.c
@@ -14,8 +14,8 @@
#include "mpm.h"
-#if !defined(MPS_OS_FR) && !defined(MPS_OS_LI)
-#error "prmcix.c is specific to MPS_OS_FR or MPS_OS_LI"
+#if !defined(MPS_OS_FR) && !defined(MPS_OS_LI) && !defined(MPS_OS_CY)
+#error "prmcix.c is specific to MPS_OS_FR, MPS_OS_LI, or MPS_OS_CY"
#endif
#include "prmcix.h"
diff --git a/code/protix.c b/code/protix.c
index fa6541913b71..18f29430e07d 100644
--- a/code/protix.c
+++ b/code/protix.c
@@ -35,8 +35,9 @@
#include "mpm.h"
-#if !defined(MPS_OS_FR) && !defined(MPS_OS_LI) && !defined(MPS_OS_XC)
-#error "protix.c is specific to MPS_OS_FR, MPS_OS_LI or MPS_OS_XC"
+#if !defined(MPS_OS_FR) && !defined(MPS_OS_LI) && !defined(MPS_OS_XC) \
+ && !defined(MPS_OS_CY)
+#error "protix.c is specific to MPS_OS_FR, MPS_OS_LI, MPS_OS_XC, or MPS_OS_CY"
#endif
#include "vm.h"
diff --git a/code/protsgix.c b/code/protsgix.c
index 966569c92934..9540908300d8 100644
--- a/code/protsgix.c
+++ b/code/protsgix.c
@@ -22,8 +22,8 @@
#include "mpm.h"
-#if !defined(MPS_OS_FR) && !defined(MPS_OS_LI)
-#error "protsgix.c is specific to MPS_OS_FR or MPS_OS_LI"
+#if !defined(MPS_OS_FR) && !defined(MPS_OS_LI) && !defined(MPS_OS_CY)
+#error "protsgix.c is specific to MPS_OS_FR, MPS_OS_LI, or MPS_OS_CY"
#endif
#include "prmcix.h"
diff --git a/code/pthrdext.c b/code/pthrdext.c
index 7619468a1872..c143b5cf4db2 100644
--- a/code/pthrdext.c
+++ b/code/pthrdext.c
@@ -16,8 +16,8 @@
#include "mpm.h"
-#if !defined(MPS_OS_FR) && !defined(MPS_OS_LI)
-#error "pthrdext.c is specific to MPS_OS_FR or MPS_OS_LI"
+#if !defined(MPS_OS_FR) && !defined(MPS_OS_LI) && !defined(MPS_OS_CY)
+#error "pthrdext.c is specific to MPS_OS_FR, MPS_OS_LI, or MPS_OS_CY"
#endif
#include "pthrdext.h"
diff --git a/code/testthr.h b/code/testthr.h
index a50dad1e5d09..13dcb3fc8924 100644
--- a/code/testthr.h
+++ b/code/testthr.h
@@ -45,7 +45,8 @@ typedef struct testthr_t {
void *result; /* result returned from start */
} testthr_t;
-#elif defined(MPS_OS_FR) || defined(MPS_OS_LI) || defined(MPS_OS_XC)
+#elif defined(MPS_OS_FR) || defined(MPS_OS_LI) || defined(MPS_OS_XC) \
+ || defined(MPS_OS_CY)
#include <pthread.h>
diff --git a/code/thix.c b/code/thix.c
index c47f82ad3b87..b89a6b4f43ab 100644
--- a/code/thix.c
+++ b/code/thix.c
@@ -34,8 +34,8 @@
#include "mpm.h"
-#if !defined(MPS_OS_FR) && !defined(MPS_OS_LI)
-#error "thix.c is specific to MPS_OS_FR or MPS_OS_LI"
+#if !defined(MPS_OS_FR) && !defined(MPS_OS_LI) && !defined(MPS_OS_CY)
+#error "thix.c is specific to MPS_OS_FR, MPS_OS_LI, or MPS_OS_CY"
#endif
#include "prmcix.h"
diff --git a/code/vmix.c b/code/vmix.c
index 4bdd0caefadc..8fce9389e742 100644
--- a/code/vmix.c
+++ b/code/vmix.c
@@ -40,8 +40,9 @@
#include "mpm.h"
-#if !defined(MPS_OS_FR) && !defined(MPS_OS_LI) && !defined(MPS_OS_XC)
-#error "vmix.c is specific to MPS_OS_FR, MPS_OS_LI or MPS_OS_XC"
+#if !defined(MPS_OS_FR) && !defined(MPS_OS_LI) && !defined(MPS_OS_XC) \
+ && !defined(MPS_OS_CY)
+#error "vmix.c is specific to MPS_OS_FR, MPS_OS_LI, MPS_OS_XC, or MPS_OS_CY"
#endif
#include "vm.h"
--
2.45.1
[-- Attachment #3: 0002-Porting-to-Cygwin-second-attempt.patch --]
[-- Type: text/plain, Size: 9559 bytes --]
From 0c8c2d6f3168a56474b222c919b051641948b3bf Mon Sep 17 00:00:00 2001
From: Ken Brown <kbrown@cornell.edu>
Date: Mon, 9 Dec 2024 17:41:47 -0500
Subject: [PATCH 2/4] Porting to Cygwin, second attempt
Use GCC with the Windows interface. The MPS builds, but I don't know
yet if it works well in Emacs.
---
code/config.h | 2 +-
code/lockix.c | 5 ++---
code/mps.c | 32 ++++++++++++++++++++++----------
code/mpstd.h | 22 ++++++++++++++++++++--
code/prmcix.c | 4 ++--
code/protix.c | 5 ++---
code/protsgix.c | 4 ++--
code/pthrdext.c | 4 ++--
code/spw3i6.c | 5 +++++
code/testlib.h | 2 +-
code/testthr.h | 3 +--
code/th.h | 6 ++++++
code/thix.c | 4 ++--
code/vmix.c | 5 ++---
14 files changed, 70 insertions(+), 33 deletions(-)
diff --git a/code/config.h b/code/config.h
index 5abf6c982596..0201094a0e15 100644
--- a/code/config.h
+++ b/code/config.h
@@ -616,7 +616,7 @@
/* POSIX thread extensions configuration -- see <code/pthrdext.c> */
-#if defined(MPS_OS_LI) || defined(MPS_OS_FR) || defined(MPS_OS_CY)
+#if defined(MPS_OS_LI) || defined(MPS_OS_FR)
/* PTHREADEXT_SIGSUSPEND -- signal used to suspend a thread
* <design/pthreadext#.impl.signals>
diff --git a/code/lockix.c b/code/lockix.c
index 3c4e1939c739..a6555f5bb360 100644
--- a/code/lockix.c
+++ b/code/lockix.c
@@ -31,9 +31,8 @@
#include "mpm.h"
-#if !defined(MPS_OS_FR) && !defined(MPS_OS_LI) && !defined(MPS_OS_XC) \
- && !defined(MPS_OS_CY)
-#error "lockix.c is specific to MPS_OS_FR, MPS_OS_LI, MPS_OS_XC, or MPS_OS_CY"
+#if !defined(MPS_OS_FR) && !defined(MPS_OS_LI) && !defined(MPS_OS_XC)
+#error "lockix.c is specific to MPS_OS_FR, MPS_OS_LI or MPS_OS_XC"
#endif
#include "lock.h"
diff --git a/code/mps.c b/code/mps.c
index a2bb7f003f5d..2b4f13885001 100644
--- a/code/mps.c
+++ b/code/mps.c
@@ -260,16 +260,28 @@
#elif defined(MPS_PF_CYI6GC)
-#include "lockix.c" /* Posix locks */
-#include "thix.c" /* Posix threading */
-#include "pthrdext.c" /* Posix thread extensions */
-#include "vmix.c" /* Posix virtual memory */
-#include "protix.c" /* Posix protection */
-#include "protsgix.c" /* Posix signal handling */
-#include "prmcanan.c" /* generic architecture mutator context */
-#include "prmcix.c" /* Posix mutator context */
-#include "prmccyi6.c" /* x86-64 for Cygwin mutator context */
-#include "span.c" /* generic stack probe */
+/* #include "lockix.c" /\* Posix locks *\/ */
+/* #include "thix.c" /\* Posix threading *\/ */
+/* #include "pthrdext.c" /\* Posix thread extensions *\/ */
+/* #include "vmix.c" /\* Posix virtual memory *\/ */
+/* #include "protix.c" /\* Posix protection *\/ */
+/* #include "protsgix.c" /\* Posix signal handling *\/ */
+/* #include "prmcanan.c" /\* generic architecture mutator context *\/ */
+/* #include "prmcix.c" /\* Posix mutator context *\/ */
+/* #include "prmccyi6.c" /\* x86-64 for Cygwin mutator context *\/ */
+/* #include "span.c" /\* generic stack probe *\/ */
+
+/* Use the Windows interface. */
+
+#include "lockw3.c" /* Windows locks */
+#include "thw3.c" /* Windows threading */
+#include "vmw3.c" /* Windows virtual memory */
+#include "protw3.c" /* Windows protection */
+#include "prmci6.c" /* x86-64 mutator context */
+#include "prmcw3.c" /* Windows mutator context */
+#include "prmcw3i6.c" /* Windows on x86-64 mutator context */
+#include "spw3i6.c" /* Windows on x86-64 stack probe */
+#include "mpsiw3.c" /* Windows interface layer extras */
#else
diff --git a/code/mpstd.h b/code/mpstd.h
index d2c21d263064..8730282abeb9 100644
--- a/code/mpstd.h
+++ b/code/mpstd.h
@@ -394,6 +394,24 @@
/* GCC 12.4.0, gcc -E -dM */
+/* #elif defined(__CYGWIN__) && defined(__x86_64__) && defined(__GNUC__) \ */
+/* && !defined(__clang__) */
+/* #if defined(CONFIG_PF_STRING) && ! defined(CONFIG_PF_CYI6GC) */
+/* #error "specified CONFIG_PF_... inconsistent with detected cyi6gc" */
+/* #endif */
+/* #define MPS_PF_CYI6GC */
+/* #define MPS_PF_STRING "cyi6gc" */
+/* #define MPS_OS_CY */
+/* #define MPS_ARCH_I6 */
+/* #define MPS_BUILD_GC */
+/* #define MPS_T_WORD unsigned long */
+/* #define MPS_T_ULONGEST unsigned long */
+/* #define MPS_WORD_WIDTH 64 */
+/* #define MPS_WORD_SHIFT 6 */
+/* #define MPS_PF_ALIGN 8 */
+
+/* Use Cygwin GCC on Windows interface. */
+
#elif defined(__CYGWIN__) && defined(__x86_64__) && defined(__GNUC__) \
&& !defined(__clang__)
#if defined(CONFIG_PF_STRING) && ! defined(CONFIG_PF_CYI6GC)
@@ -402,14 +420,14 @@
#define MPS_PF_CYI6GC
#define MPS_PF_STRING "cyi6gc"
#define MPS_OS_CY
+#define MPS_OS_W3
#define MPS_ARCH_I6
#define MPS_BUILD_GC
#define MPS_T_WORD unsigned long
#define MPS_T_ULONGEST unsigned long
#define MPS_WORD_WIDTH 64
#define MPS_WORD_SHIFT 6
-#define MPS_PF_ALIGN 8
-
+#define MPS_PF_ALIGN 16
#else
#error "The MPS Kit does not have a configuration for this platform out of the box; see manual/build.txt"
diff --git a/code/prmcix.c b/code/prmcix.c
index 0af391eb45c7..8529405ae9c7 100644
--- a/code/prmcix.c
+++ b/code/prmcix.c
@@ -14,8 +14,8 @@
#include "mpm.h"
-#if !defined(MPS_OS_FR) && !defined(MPS_OS_LI) && !defined(MPS_OS_CY)
-#error "prmcix.c is specific to MPS_OS_FR, MPS_OS_LI, or MPS_OS_CY"
+#if !defined(MPS_OS_FR) && !defined(MPS_OS_LI)
+#error "prmcix.c is specific to MPS_OS_FR or MPS_OS_LI"
#endif
#include "prmcix.h"
diff --git a/code/protix.c b/code/protix.c
index 18f29430e07d..fa6541913b71 100644
--- a/code/protix.c
+++ b/code/protix.c
@@ -35,9 +35,8 @@
#include "mpm.h"
-#if !defined(MPS_OS_FR) && !defined(MPS_OS_LI) && !defined(MPS_OS_XC) \
- && !defined(MPS_OS_CY)
-#error "protix.c is specific to MPS_OS_FR, MPS_OS_LI, MPS_OS_XC, or MPS_OS_CY"
+#if !defined(MPS_OS_FR) && !defined(MPS_OS_LI) && !defined(MPS_OS_XC)
+#error "protix.c is specific to MPS_OS_FR, MPS_OS_LI or MPS_OS_XC"
#endif
#include "vm.h"
diff --git a/code/protsgix.c b/code/protsgix.c
index 9540908300d8..966569c92934 100644
--- a/code/protsgix.c
+++ b/code/protsgix.c
@@ -22,8 +22,8 @@
#include "mpm.h"
-#if !defined(MPS_OS_FR) && !defined(MPS_OS_LI) && !defined(MPS_OS_CY)
-#error "protsgix.c is specific to MPS_OS_FR, MPS_OS_LI, or MPS_OS_CY"
+#if !defined(MPS_OS_FR) && !defined(MPS_OS_LI)
+#error "protsgix.c is specific to MPS_OS_FR or MPS_OS_LI"
#endif
#include "prmcix.h"
diff --git a/code/pthrdext.c b/code/pthrdext.c
index c143b5cf4db2..7619468a1872 100644
--- a/code/pthrdext.c
+++ b/code/pthrdext.c
@@ -16,8 +16,8 @@
#include "mpm.h"
-#if !defined(MPS_OS_FR) && !defined(MPS_OS_LI) && !defined(MPS_OS_CY)
-#error "pthrdext.c is specific to MPS_OS_FR, MPS_OS_LI, or MPS_OS_CY"
+#if !defined(MPS_OS_FR) && !defined(MPS_OS_LI)
+#error "pthrdext.c is specific to MPS_OS_FR or MPS_OS_LI"
#endif
#include "pthrdext.h"
diff --git a/code/spw3i6.c b/code/spw3i6.c
index d06b4afcab03..ef2e49fb2a38 100644
--- a/code/spw3i6.c
+++ b/code/spw3i6.c
@@ -16,7 +16,12 @@
#error "spw3i6.c is specific to MPS_OS_W3"
#endif
+#ifndef MPS_OS_CY
#include <stdlib.h> /* _alloca */
+#else
+#include <alloca.h>
+#define _alloca alloca
+#endif
void StackProbe(Size depth)
diff --git a/code/testlib.h b/code/testlib.h
index 9a414f2b5dd0..085681e033ea 100644
--- a/code/testlib.h
+++ b/code/testlib.h
@@ -71,7 +71,7 @@
* <https://docs.microsoft.com/en-gb/cpp/c-runtime-library/reference/alloca>
*/
-#if defined(MPS_OS_W3)
+#if defined(MPS_OS_W3) && !defined(MPS_OS_CY)
#define alloca _alloca
diff --git a/code/testthr.h b/code/testthr.h
index 13dcb3fc8924..a50dad1e5d09 100644
--- a/code/testthr.h
+++ b/code/testthr.h
@@ -45,8 +45,7 @@ typedef struct testthr_t {
void *result; /* result returned from start */
} testthr_t;
-#elif defined(MPS_OS_FR) || defined(MPS_OS_LI) || defined(MPS_OS_XC) \
- || defined(MPS_OS_CY)
+#elif defined(MPS_OS_FR) || defined(MPS_OS_LI) || defined(MPS_OS_XC)
#include <pthread.h>
diff --git a/code/th.h b/code/th.h
index 08e01d6cc3d3..c939e371bc39 100644
--- a/code/th.h
+++ b/code/th.h
@@ -68,9 +68,15 @@ extern Thread ThreadRingThread(Ring threadRing);
extern Arena ThreadArena(Thread thread);
+#ifdef MP_OS_W3
extern Res ThreadScan(ScanState ss, Thread thread, void *stackCold,
mps_area_scan_t scan_area,
void *closure);
+#else
+extern Res ThreadScan(ScanState ss, Thread thread, Word *stackCold,
+ mps_area_scan_t scan_area,
+ void *closure);
+#endif
extern void ThreadSetup(void);
diff --git a/code/thix.c b/code/thix.c
index b89a6b4f43ab..c47f82ad3b87 100644
--- a/code/thix.c
+++ b/code/thix.c
@@ -34,8 +34,8 @@
#include "mpm.h"
-#if !defined(MPS_OS_FR) && !defined(MPS_OS_LI) && !defined(MPS_OS_CY)
-#error "thix.c is specific to MPS_OS_FR, MPS_OS_LI, or MPS_OS_CY"
+#if !defined(MPS_OS_FR) && !defined(MPS_OS_LI)
+#error "thix.c is specific to MPS_OS_FR or MPS_OS_LI"
#endif
#include "prmcix.h"
diff --git a/code/vmix.c b/code/vmix.c
index 8fce9389e742..4bdd0caefadc 100644
--- a/code/vmix.c
+++ b/code/vmix.c
@@ -40,9 +40,8 @@
#include "mpm.h"
-#if !defined(MPS_OS_FR) && !defined(MPS_OS_LI) && !defined(MPS_OS_XC) \
- && !defined(MPS_OS_CY)
-#error "vmix.c is specific to MPS_OS_FR, MPS_OS_LI, MPS_OS_XC, or MPS_OS_CY"
+#if !defined(MPS_OS_FR) && !defined(MPS_OS_LI) && !defined(MPS_OS_XC)
+#error "vmix.c is specific to MPS_OS_FR, MPS_OS_LI or MPS_OS_XC"
#endif
#include "vm.h"
--
2.45.1
[-- Attachment #4: 0003-Update-Cygwin-Makefile.patch --]
[-- Type: text/plain, Size: 993 bytes --]
From 14e2acf82387429bc05896c57d5114edea916479 Mon Sep 17 00:00:00 2001
From: Ken Brown <kbrown@cornell.edu>
Date: Wed, 11 Dec 2024 15:51:45 -0500
Subject: [PATCH 3/4] Update Cygwin Makefile
---
code/cyi6gc.gmk | 29 ++++++++++++++++++++---------
1 file changed, 20 insertions(+), 9 deletions(-)
diff --git a/code/cyi6gc.gmk b/code/cyi6gc.gmk
index 98b863274bac..7e707a291dc6 100644
--- a/code/cyi6gc.gmk
+++ b/code/cyi6gc.gmk
@@ -7,17 +7,28 @@
PFM = cyi6gc
+# MPMPF = \
+# lockix.c \
+# prmcanan.c \
+# prmccyi6.c \
+# prmci6.c \
+# protix.c \
+# protsgix.c \
+# pthrdext.c \
+# span.c \
+# thix.c \
+# vmix.c
+
MPMPF = \
- lockix.c \
- prmcanan.c \
- prmccyi6.c \
+ lockw3.c \
+ thw3.c \
+ vmw3.c \
+ protw3.c \
prmci6.c \
- protix.c \
- protsgix.c \
- pthrdext.c \
- span.c \
- thix.c \
- vmix.c
+ prmcw3.c \
+ prmcw3i6.c \
+ spw3i6.c \
+ mpsiw3.c
LIBS = -lm -lpthread
--
2.45.1
[-- Attachment #5: 0004-Pacifying-testsuite-don-t-use-long-long.patch --]
[-- Type: text/plain, Size: 689 bytes --]
From 6c6fae9c920e3db08219a3c8086a49f32056e96c Mon Sep 17 00:00:00 2001
From: Ken Brown <kbrown@cornell.edu>
Date: Wed, 11 Dec 2024 16:06:02 -0500
Subject: [PATCH 4/4] Pacifying testsuite: don't use long long
---
code/testlib.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/code/testlib.h b/code/testlib.h
index 085681e033ea..b2983d501490 100644
--- a/code/testlib.h
+++ b/code/testlib.h
@@ -112,7 +112,7 @@
#error "How many beans make five?"
#endif
-#if defined(MPS_OS_W3) && defined(MPS_ARCH_I6)
+#if defined(MPS_OS_W3) && defined(MPS_ARCH_I6) && !defined(MPS_OS_CY)
#define PRIuLONGEST "llu"
#define PRIdLONGEST "lld"
#define SCNuLONGEST "llu"
--
2.45.1
^ permalink raw reply related [flat|nested] 22+ messages in thread
* bug#74805: 30.0.92; Trying to build scratch/igc on Cygwin
2024-12-11 23:47 ` Pip Cet via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2024-12-12 18:14 ` Ken Brown
0 siblings, 0 replies; 22+ messages in thread
From: Ken Brown @ 2024-12-12 18:14 UTC (permalink / raw)
To: Pip Cet; +Cc: 74805
On 12/11/2024 6:47 PM, Pip Cet wrote:
> "Ken Brown" <kbrown@cornell.edu> writes:
>
>> I've made a first attempt to port mps to Cygwin. If anyone else is
>> interested in seeing this or helping, you can find my work at
>>
>> https://github.com/kbrow1i/mps-cygwin
>>
>> This is a fork of the mps git repo with two commits on top.
>>
>> With the current attempt, I can build the scratch/igc branch, but there
>> are many test failures. For example, when I run the process-tests, I
>
> But the Emacs binary "works", to some extent? Is there anything in the
> process-tests.log file which hints at what kind of problem it might be?
>
> Does it work interactively, or crash right away?
>
>> get 19 failures and 8 skipped tests. But on the master branch I get no
>> failures and only 3 skipped.
>
> That sounds like a "minor" GC problem; a word size mismatch or alignment
> problem would probably lead to a hard crash, so it's more likely to be a
> problem in scanning the stack.
>
> I'm a bit confused about the role of prmccyi6.c; it's included in the
> cyi6gc.mk fragment, but it's not included by mps.c directly. How are you
> building MPS?
>
> I see that you have defined (in prmccyi6.c)
>
> Addr MutatorContextSP(MutatorContext context)
> {
> AVERT(MutatorContext, context);
> return (Addr)context->ucontext->uc_mcontext.rsp; /* .sp */
> }
>
> using the MutatorContextStruct from prmcix.h, which uses an ucontext.
> However, you also include prmcw3.c, which uses a different definition of
> MutatorContextStruct. I don't think those two are compatible, so it's
> possible that's the problem, depending on how you build mps.
>
>> This probably means that my current attempt to port mps is no good, and
>> I have to go back to the drawing board. Before I do that, however, I'd
>> like to check and see if test failures on scratch/igc are to be
>> expected. Are people testing other platforms seeing this too?
>
> I see a few test failures on Windows, but nothing as catastrophic as
> what you describe.
>
> Do you have a usable debugger/gdb on your platform? That would
> be one approach to diagnosing crashes (if the problem is indeed that
> Emacs crashes). Another approach would be to run the test suite
> included in MPS.
Thanks for the reply and suggestions. See my response to Ely.
Ken
^ permalink raw reply [flat|nested] 22+ messages in thread
* bug#74805: 30.0.92; Trying to build scratch/igc on Cygwin
2024-12-12 18:12 ` Ken Brown
@ 2024-12-12 19:25 ` Eli Zaretskii
2024-12-12 23:17 ` Stefan Kangas
0 siblings, 1 reply; 22+ messages in thread
From: Eli Zaretskii @ 2024-12-12 19:25 UTC (permalink / raw)
To: Ken Brown; +Cc: 74805
> Date: Thu, 12 Dec 2024 13:12:46 -0500
> Cc: 74805@debbugs.gnu.org
> From: Ken Brown <kbrown@cornell.edu>
>
> >> https://github.com/kbrow1i/mps-cygwin
> >>
> >> This is a fork of the mps git repo with two commits on top.
> >
> > Thanks, good news! Could you please post the patches here, so that
> > they are recorded in our bug tracker?
>
> Unfortunately, the approach I tried, which was suggested by one of the
> MPS developers, fails badly. I already mentioned the test failures, but
> now I've tried to run Emacs interactively, and I can't even get a
> directory listing. For the record, I'm attaching the patches I've
> accumulated so far, but I'll have to try a completely different
> approach. This will probably take me a while.
> >
> >> With the current attempt, I can build the scratch/igc branch, but there
> >> are many test failures. For example, when I run the process-tests, I
> >> get 19 failures and 8 skipped tests. But on the master branch I get no
> >> failures and only 3 skipped.
> >>
> >> This probably means that my current attempt to port mps is no good, and
> >> I have to go back to the drawing board.
> >
> > Did you run the MPS test suite, and if you did, were there any
> > failures? My suggestion is to make sure the MPS test suite passes
> > cleanly, including in several consecutive runs (when I ported MPS to
> > 32-bit MinGW, I had intermittent failures which only happened once in
> > several runs, until I fixed that).
>
> There are lots of test failures. Back to the drawing board.
OK, thanks.
FTR, I built the official released version of MPS, not their latest
code in the repository. So maybe try that as well at some point,
perhaps the development version has new bugs.
What I did was to take the MSVC makefiles they provide and produce
equivalent MinGW makefiles (for GNU Make) instead, using the same
source files. The rest was just to resolve any compilation warnings
or errors. HTH.
^ permalink raw reply [flat|nested] 22+ messages in thread
* bug#74805: 30.0.92; Trying to build scratch/igc on Cygwin
2024-12-12 19:25 ` Eli Zaretskii
@ 2024-12-12 23:17 ` Stefan Kangas
2024-12-13 7:51 ` Eli Zaretskii
0 siblings, 1 reply; 22+ messages in thread
From: Stefan Kangas @ 2024-12-12 23:17 UTC (permalink / raw)
To: Eli Zaretskii, Ken Brown; +Cc: 74805
Eli Zaretskii <eliz@gnu.org> writes:
> What I did was to take the MSVC makefiles they provide and produce
> equivalent MinGW makefiles (for GNU Make) instead, using the same
> source files. The rest was just to resolve any compilation warnings
> or errors. HTH.
Was any of that work upstreamed? Maybe it doesn't make sense to do
that, but I thought I'd ask anyways.
Would it make sense to document which ports are supported in README-IGC?
^ permalink raw reply [flat|nested] 22+ messages in thread
* bug#74805: 30.0.92; Trying to build scratch/igc on Cygwin
2024-12-12 23:17 ` Stefan Kangas
@ 2024-12-13 7:51 ` Eli Zaretskii
0 siblings, 0 replies; 22+ messages in thread
From: Eli Zaretskii @ 2024-12-13 7:51 UTC (permalink / raw)
To: Stefan Kangas; +Cc: 74805, kbrown
> From: Stefan Kangas <stefankangas@gmail.com>
> Date: Thu, 12 Dec 2024 15:17:03 -0800
> Cc: 74805@debbugs.gnu.org
>
> Eli Zaretskii <eliz@gnu.org> writes:
>
> > What I did was to take the MSVC makefiles they provide and produce
> > equivalent MinGW makefiles (for GNU Make) instead, using the same
> > source files. The rest was just to resolve any compilation warnings
> > or errors. HTH.
>
> Was any of that work upstreamed? Maybe it doesn't make sense to do
> that, but I thought I'd ask anyways.
I didn't upstream, but then no one asked me for the patches, which for
me is a clear sign that the 32-bit port of MPS to Windows/MinGW is not
too popular, to put it mildly.
> Would it make sense to document which ports are supported in README-IGC?
It cannot do any harm, although I also don't see how it will help. If
the instructions there already don't produce a working library, then
the instructions should be amended, and perhaps subdivided to
system-specific ones; otherwise saying on which systems the library
works can only make sense if you want to avert people from trying the
branch on systems where we never tried to compile the library.
^ permalink raw reply [flat|nested] 22+ messages in thread
* bug#74805: 30.0.92; Trying to build scratch/igc on Cygwin
2024-12-12 6:09 ` Eli Zaretskii
2024-12-12 18:12 ` Ken Brown
@ 2024-12-20 23:48 ` Ken Brown
2024-12-21 7:24 ` Eli Zaretskii
1 sibling, 1 reply; 22+ messages in thread
From: Ken Brown @ 2024-12-20 23:48 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 74805, Richard Brooksby
On 12/12/2024 1:09 AM, Eli Zaretskii wrote:
>> Date: Wed, 11 Dec 2024 17:50:40 -0500
>> From: Ken Brown <kbrown@cornell.edu>
>>
>> I've made a first attempt to port mps to Cygwin. If anyone else is
>> interested in seeing this or helping, you can find my work at
>>
>> https://github.com/kbrow1i/mps-cygwin
>>
>> This is a fork of the mps git repo with two commits on top.
>
> Thanks, good news! Could you please post the patches here, so that
> they are recorded in our bug tracker?
>
>> With the current attempt, I can build the scratch/igc branch, but there
>> are many test failures. For example, when I run the process-tests, I
>> get 19 failures and 8 skipped tests. But on the master branch I get no
>> failures and only 3 skipped.
>>
>> This probably means that my current attempt to port mps is no good, and
>> I have to go back to the drawing board.
>
> Did you run the MPS test suite, and if you did, were there any
> failures? My suggestion is to make sure the MPS test suite passes
> cleanly, including in several consecutive runs (when I ported MPS to
> 32-bit MinGW, I had intermittent failures which only happened once in
> several runs, until I fixed that).
This is an update on my attempts to port the MPS to Cygwin and build the
scratch/igc branch. The GitHub repo that I cited above now consists of
4 branches:
1. The "master" branch is an MPS fork with README.Cygwin added. This
file explains in detail what I'm summarizing here.
2. The "w3" branch attempts to use the Windows interface on Cygwin. For
example, it uses direct calls to VirtualAlloc instead of Cygwin's mmap.
This attempt fails because it's not compatible with Cygwin's fork.
3. The "mmap" branch is a straightforward port, mostly imitating the
FreeBSD port. It currently (with Cygwin 3.5.5) fails because of a
limitation of Cygwin's mmap. But I have a simple patch to Cygwin in the
works that removes that limitation. With that patch, 37 of the 38 MPS
tests pass. I still need to debug the failing test. I'm cautiously
optimistic that I can get this approach to work. Either way, I expect
the Cygwin patch to soon be available in a test release of Cygwin 3.6.0
so that other Cygwin users can try it.
4. The "generic" branch uses generic implementations of some of the MPS
features. For example, it uses malloc instead of mmap. This passes all
of the MPS tests, and Emacs seems to work well so far in limited
testing. I suspect that there may be some performance problems, but I
haven't seen them yet.
Once I've determined whether or not the mmap approach will work, I'll
post the MPS patches here either for the mmap branch or the generic branch.
Ken
^ permalink raw reply [flat|nested] 22+ messages in thread
* bug#74805: 30.0.92; Trying to build scratch/igc on Cygwin
2024-12-20 23:48 ` Ken Brown
@ 2024-12-21 7:24 ` Eli Zaretskii
2024-12-21 16:56 ` Ken Brown
0 siblings, 1 reply; 22+ messages in thread
From: Eli Zaretskii @ 2024-12-21 7:24 UTC (permalink / raw)
To: Ken Brown; +Cc: 74805, rb
> Date: Fri, 20 Dec 2024 18:48:37 -0500
> Cc: 74805@debbugs.gnu.org, Richard Brooksby <rb@ravenbrook.com>
> From: Ken Brown <kbrown@cornell.edu>
>
> This is an update on my attempts to port the MPS to Cygwin and build the
> scratch/igc branch. The GitHub repo that I cited above now consists of
> 4 branches:
>
> 1. The "master" branch is an MPS fork with README.Cygwin added. This
> file explains in detail what I'm summarizing here.
>
> 2. The "w3" branch attempts to use the Windows interface on Cygwin. For
> example, it uses direct calls to VirtualAlloc instead of Cygwin's mmap.
> This attempt fails because it's not compatible with Cygwin's fork.
>
> 3. The "mmap" branch is a straightforward port, mostly imitating the
> FreeBSD port. It currently (with Cygwin 3.5.5) fails because of a
> limitation of Cygwin's mmap. But I have a simple patch to Cygwin in the
> works that removes that limitation. With that patch, 37 of the 38 MPS
> tests pass. I still need to debug the failing test. I'm cautiously
> optimistic that I can get this approach to work. Either way, I expect
> the Cygwin patch to soon be available in a test release of Cygwin 3.6.0
> so that other Cygwin users can try it.
>
> 4. The "generic" branch uses generic implementations of some of the MPS
> features. For example, it uses malloc instead of mmap. This passes all
> of the MPS tests, and Emacs seems to work well so far in limited
> testing. I suspect that there may be some performance problems, but I
> haven't seen them yet.
>
> Once I've determined whether or not the mmap approach will work, I'll
> post the MPS patches here either for the mmap branch or the generic branch.
Thanks for the update, I think this is very good news.
^ permalink raw reply [flat|nested] 22+ messages in thread
* bug#74805: 30.0.92; Trying to build scratch/igc on Cygwin
2024-12-21 7:24 ` Eli Zaretskii
@ 2024-12-21 16:56 ` Ken Brown
2024-12-21 17:21 ` Gerd Möllmann
2024-12-22 8:24 ` Richard Brooksby
0 siblings, 2 replies; 22+ messages in thread
From: Ken Brown @ 2024-12-21 16:56 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: Gerd Möllmann, 74805, Pip Cet, rb
[-- Attachment #1: Type: text/plain, Size: 1150 bytes --]
On 12/21/2024 2:24 AM, Eli Zaretskii wrote:
>> Date: Fri, 20 Dec 2024 18:48:37 -0500
>> Cc: 74805@debbugs.gnu.org, Richard Brooksby <rb@ravenbrook.com>
>> From: Ken Brown <kbrown@cornell.edu>
>> 3. The "mmap" branch is a straightforward port, mostly imitating the
>> FreeBSD port. It currently (with Cygwin 3.5.5) fails because of a
>> limitation of Cygwin's mmap. But I have a simple patch to Cygwin in the
>> works that removes that limitation. With that patch, 37 of the 38 MPS
>> tests pass. I still need to debug the failing test. I'm cautiously
>> optimistic that I can get this approach to work. Either way, I expect
>> the Cygwin patch to soon be available in a test release of Cygwin 3.6.0
>> so that other Cygwin users can try it.
>
> Thanks for the update, I think this is very good news.
I could use some help from the MPS experts in debugging the failing
test, which is arenacv. I ran the test under strace and didn't see any
mmap or munmap failures. I'm attaching the test log, which doesn't mean
a thing to me. I also built an unoptimized arenacv and can run it under
gdb if someone tells me what to look for.
TIA.
Ken
[-- Attachment #2: 9-arenacv --]
[-- Type: text/plain, Size: 30112 bytes --]
cyi6gc/cool/arenacv: randomize(): choosing initial state (v3): 293582182.
2730 tracts per page in the page table.
VMArena 00006FFFFFFF0000
controlPool 00006FFFFFFF00B8
reserved 0000000885BD0000
committed 0000000000BA0000
commitLimit FFFFFFFFFFFFFFFF
spareCommitted 0000000000200000
spare 0.75
zoneShift 20
grainSize 0000000000010000
lastTract 0000000000000000
lastTractBase 0000000000000000
primary 00006FFFFBFF0000
hasFreeLand YES
freeZones 0000000000000000000000000000000000000000000000000000000000000000
zoned YES
droppedMessages 0
Globals
mpsVersion @(#)Ravenbrook MPS, product.mps, release/1.118.0, platform.cyi6gc, variety.assertastic.logtastic.stats, compiled on Dec 21 2024 10:18:21
lock 00006FFFFE000110
pollThreshold 0
outside poll
released
fillMutatorSize 29112
emptyMutatorSize 0
allocMutatorSize 0
fillInternalSize 0
emptyInternalSize 0
poolSerial 6
rootSerial 0
formatSerial 0
threadSerial 0
busyTraces 0000000000000000000000000000000000000000000000000000000000000000
flippedTraces 0000000000000000000000000000000000000000000000000000000000000000
History 00006FFFFFFF0D10 {
epoch = 0
prehistory = 0000000000000000000000000000000000000000000000000000000000000000
history {
[note: indices are raw, not rotated]
[0] = 0000000000000000000000000000000000000000000000000000000000000000
[1] = 0000000000000000000000000000000000000000000000000000000000000000
[2] = 0000000000000000000000000000000000000000000000000000000000000000
[3] = 0000000000000000000000000000000000000000000000000000000000000000
}
} History 00006FFFFFFF0D10
Shield 00006FFFFFFF0700 {
inside shield
suspended NO
depth 0
next 0
length 0
unsynced 0
holds 0
} Shield 00006FFFFFFF0700
MFSPool 00006FFFFFFF0490
serial 0
arena 00006FFFFFFF0000 (0)
alignment 0000000000000008
alignShift 0000000000000003
unroundedUnitSize 0000000000000030
extendBy 0000000000010000
extendSelf NO
unitSize 0000000000000030
freeList 00006FFFFC011630
total 000000000000FFF0
free 000000000000E9D0
MFSPool 00006FFFFFFF0DC0
serial 1
arena 00006FFFFFFF0000 (0)
alignment 0000000000000008
alignShift 0000000000000003
unroundedUnitSize 0000000000000020
extendBy 0000000000010000
extendSelf NO
unitSize 0000000000000020
freeList 00006FFFF1540450
total 000000000000FFF0
free 000000000000FBF0
MVFFPool 00006FFFFFFF00B8
serial 2
arena 00006FFFFFFF0000 (0)
alignment 0000000000000008
alignShift 0000000000000003
extendBy 0000000000010000
avgSize 0000000000000020
firstFit 1
slotHigh 0
spare 0.75
LocusPref 00006FFFFFFF0128 {
high NO
zones 1111111111111111111111111111111100000000000000000000000000000000
avoid 0000000000000000000000000000000000000000000000000000000000000000
} LocusPref 00006FFFFFFF0128
CBSFast 00006FFFFFFF0220
class 00000001004804A0 ("CBSFast")
arena 00006FFFFFFF0000
align 8
inLand NO
blockPool 00006FFFFFFF0160
ownPool 0
treeSize: 1
meter "size of tree" {count: 2, total 0, max 0, min 0, mean 0, meanSquared 0}
Splay 00006FFFFFFF0248 {
compare 7A1C430001000000
nodeKey 031D430001000000
updateNode B7EA400001000000
tree ( [00006FFFFE000000,00006FFFFE010000) {65536} )
} Splay 00006FFFFFFF0248
CBSFast 00006FFFFFFF02D0
class 00000001004804A0 ("CBSFast")
arena 00006FFFFFFF0000
align 8
inLand NO
blockPool 00006FFFFFFF0160
ownPool 0
treeSize: 1
meter "size of tree" {count: 441, total 636, max 2, min 0, mean 1.4421768707483, meanSquared 2.340136054421773}
Splay 00006FFFFFFF02F8 {
compare 7A1C430001000000
nodeKey 031D430001000000
updateNode B7EA400001000000
tree ( [00006FFFFE0005A8,00006FFFFE010000) {64088} )
} Splay 00006FFFFFFF02F8
Freelist 00006FFFFFFF0380
class 00000001004890A0 ("Freelist")
arena 00006FFFFFFF0000
align 8
inLand NO
listSize 0
size 0
MFSPool 00006FFFFFFF0160
serial 3
arena 00006FFFFFFF0000 (0)
alignment 0000000000000008
alignShift 0000000000000003
unroundedUnitSize 0000000000000028
extendBy 0000000000010000
extendSelf YES
unitSize 0000000000000028
freeList 00006FFFFE010060
total 000000000000FFF0
free 000000000000FFA0
MVFFPool 00006FFFFE000248
serial 4
arena 00006FFFFFFF0000 (0)
alignment 0000000000000008
alignShift 0000000000000003
extendBy 0000000000010000
avgSize 0000000000000020
firstFit 1
slotHigh 0
spare 0.75
LocusPref 00006FFFFE0002B8 {
high NO
zones 1111111111111111111111111111111100000000000000000000000000000000
avoid 0000000000000000000000000000000000000000000000000000000000000000
} LocusPref 00006FFFFE0002B8
CBSFast 00006FFFFE0003B0
class 00000001004804A0 ("CBSFast")
arena 00006FFFFFFF0000
align 8
inLand NO
blockPool 00006FFFFE0002F0
ownPool 0
treeSize: 0
meter "size of tree" {count: 0}
Splay 00006FFFFE0003D8 {
compare 7A1C430001000000
nodeKey 031D430001000000
updateNode B7EA400001000000
} Splay 00006FFFFE0003D8
CBSFast 00006FFFFE000460
class 00000001004804A0 ("CBSFast")
arena 00006FFFFFFF0000
align 8
inLand NO
blockPool 00006FFFFE0002F0
ownPool 0
treeSize: 0
meter "size of tree" {count: 0}
Splay 00006FFFFE000488 {
compare 7A1C430001000000
nodeKey 031D430001000000
updateNode B7EA400001000000
} Splay 00006FFFFE000488
Freelist 00006FFFFE000510
class 00000001004890A0 ("Freelist")
arena 00006FFFFFFF0000
align 8
inLand NO
listSize 0
size 0
MFSPool 00006FFFFE0002F0
serial 5
arena 00006FFFFFFF0000 (0)
alignment 0000000000000008
alignShift 0000000000000003
unroundedUnitSize 0000000000000028
extendBy 0000000000010000
extendSelf YES
unitSize 0000000000000028
freeList 0000000000000000
total 0000000000000000
free 0000000000000000
Chain 00006FFFFE000128 {
arena 00006FFFFFFF0000
GenDesc 00006FFFFE000158 {
zones 0000000000000000000000000000000000000000000000000000000000000000
capacity 8388608
mortality 0.85
activeTraces 0000000000000000000000000000000000000000000000000000000000000000
trace 0 {
condemned 0
forwarded 0
preservedInPlace 0
}
} GenDesc 00006FFFFE000158
GenDesc 00006FFFFE0001D0 {
zones 0000000000000000000000000000000000000000000000000000000000000000
capacity 37748736
mortality 0.45
activeTraces 0000000000000000000000000000000000000000000000000000000000000000
trace 0 {
condemned 0
forwarded 0
preservedInPlace 0
}
} GenDesc 00006FFFFE0001D0
} Chain 00006FFFFE000128
extendBy: 67108864
extendMin: 0
CBS 00006FFFFFFF0E80
class 00000001004805A0 ("CBS")
arena 00006FFFFFFF0000
align 65536
inLand NO
blockPool 00006FFFFFFF0DC0
ownPool 0
treeSize: 32
meter "size of tree" {count: 485, total 9748, max 38, min 0, mean 20.09896907216495, meanSquared 499.8020618556704}
Splay 00006FFFFFFF0EA8 {
compare 7A1C430001000000
nodeKey 031D430001000000
updateNode B519440001000000
tree ( ( ( ( ( [00006FF83C100000,00006FF83C110000) ) / [00006FF8F0100000,00006FF8F0110000) \ ( [00006FF930100000,00006FF930110000) ) ) / [00006FF950100000,00006FF950110000) \ ( ( [00006FF970100000,00006FF970110000) ) / [00006FF988100000,00006FF988110000) \ ( [00006FF990100000,00006FF990110000) ) ) ) / [00006FF99C100000,00006FF99C110000) \ ( ( ( [00006FFA5ADD0000,00006FFA5ADE0000) ) / [00006FFB12000000,00006FFB12010000) \ ( [00006FFB52000000,00006FFB52010000) ) ) / [00006FFB72000000,00006FFB72010000) \ ( ( [00006FFB92000000,00006FFB92010000) ) / [00006FFBA6000000,00006FFBA6010000) \ ( [00006FFBB2000000,00006FFBB2010000) ) ) ) ) / [00006FFBBB260000,00006FFBBB270000) \ ( ( ( ( [00006FFC7C100000,00006FFC7C110000) ) / [00006FFD34100000,00006FFD34110000) \ ( [00006FFD74100000,00006FFD74110000) ) ) / [00006FFD94100000,00006FFD94110000) \ ( ( [00006FFDB4100000,00006FFDB4110000) ) / [00006FFDC8100000,00006FFDC8110000) \ ( [00006FFDD4100000,00006FFDD4110000) ) ) ) / [00006FFDDC100000,00006FFDDC110000) \ ( ( ( [00006FFE9BBB0000,00006FFE9BBC0000) ) / [00006FFF52000000,00006FFF52010000) \ ( [00006FFF92000000,00006FFF92010000) ) ) / [00006FFFB2000000,00006FFFB2010000) \ ( ( [00006FFFD2000000,00006FFFD2010000) ) / [00006FFFE6A60000,00006FFFE6A70000) \ ( [00006FFFF2000000,00006FFFF2010000) \ ( [00006FFFFE020000,00006FFFFE030000) ) ) ) ) ) )
} Splay 00006FFFFFFF0EA8
Chunk [00006FFFFBFF0000, 00006FFFFFFF0000) (0) {
[00006FFFFC010000, 00006FFFFC020000) 00006FFFFFFF0490 0 (MFSPool)
[00006FFFFE000000, 00006FFFFE010000) 00006FFFFFFF00B8 2 (MVFFPool)
[00006FFFFE010000, 00006FFFFE020000) 00006FFFFFFF0160 3 (MFSPool)
} Chunk [00006FFFFBFF0000, 00006FFFFFFF0000)
Chunk [00006FFFF1510000, 00006FFFFBFF0000) (1) {
[00006FFFF1540000, 00006FFFF1550000) 00006FFFFFFF0DC0 1 (MFSPool)
} Chunk [00006FFFF1510000, 00006FFFFBFF0000)
Chunk [00006FFFE6A30000, 00006FFFF1510000) (2) {
} Chunk [00006FFFE6A30000, 00006FFFF1510000)
Chunk [00006FFFD1490000, 00006FFFE6A30000) (3) {
} Chunk [00006FFFD1490000, 00006FFFE6A30000)
Chunk [00006FFFC69B0000, 00006FFFD1490000) (4) {
} Chunk [00006FFFC69B0000, 00006FFFD1490000)
Chunk [00006FFFB1420000, 00006FFFC69B0000) (5) {
} Chunk [00006FFFB1420000, 00006FFFC69B0000)
Chunk [00006FFF913C0000, 00006FFFB1420000) (6) {
} Chunk [00006FFF913C0000, 00006FFFB1420000)
Chunk [00006FFF868E0000, 00006FFF913C0000) (7) {
} Chunk [00006FFF868E0000, 00006FFF913C0000)
Chunk [00006FFF71350000, 00006FFF868E0000) (8) {
} Chunk [00006FFF71350000, 00006FFF868E0000)
Chunk [00006FFF51310000, 00006FFF71350000) (9) {
} Chunk [00006FFF51310000, 00006FFF71350000)
Chunk [00006FFF46840000, 00006FFF51310000) (10) {
} Chunk [00006FFF46840000, 00006FFF51310000)
Chunk [00006FFF3BD60000, 00006FFF46840000) (11) {
} Chunk [00006FFF3BD60000, 00006FFF46840000)
Chunk [00006FFF31280000, 00006FFF3BD60000) (12) {
} Chunk [00006FFF31280000, 00006FFF3BD60000)
Chunk [00006FFF1BCE0000, 00006FFF31280000) (13) {
} Chunk [00006FFF1BCE0000, 00006FFF31280000)
Chunk [00006FFF11200000, 00006FFF1BCE0000) (14) {
} Chunk [00006FFF11200000, 00006FFF1BCE0000)
Chunk [00006FFEFBC70000, 00006FFF11200000) (15) {
} Chunk [00006FFEFBC70000, 00006FFF11200000)
Chunk [00006FFEDBC10000, 00006FFEFBC70000) (16) {
} Chunk [00006FFEDBC10000, 00006FFEFBC70000)
Chunk [00006FFED1130000, 00006FFEDBC10000) (17) {
} Chunk [00006FFED1130000, 00006FFEDBC10000)
Chunk [00006FFEBBBA0000, 00006FFED1130000) (18) {
} Chunk [00006FFEBBBA0000, 00006FFED1130000)
Chunk [00006FFE9BB60000, 00006FFEBBBA0000) (19) {
} Chunk [00006FFE9BB60000, 00006FFEBBBA0000)
Chunk [00006FFE865E0000, 00006FFE9BB60000) (20) {
} Chunk [00006FFE865E0000, 00006FFE9BB60000)
Chunk [00006FFE7BB00000, 00006FFE865E0000) (21) {
} Chunk [00006FFE7BB00000, 00006FFE865E0000)
Chunk [00006FFE71020000, 00006FFE7BB00000) (22) {
} Chunk [00006FFE71020000, 00006FFE7BB00000)
Chunk [00006FFE5BA80000, 00006FFE71020000) (23) {
} Chunk [00006FFE5BA80000, 00006FFE71020000)
Chunk [00006FFE50FA0000, 00006FFE5BA80000) (24) {
} Chunk [00006FFE50FA0000, 00006FFE5BA80000)
Chunk [00006FFE3BA10000, 00006FFE50FA0000) (25) {
} Chunk [00006FFE3BA10000, 00006FFE50FA0000)
Chunk [00006FFE1B9B0000, 00006FFE3BA10000) (26) {
} Chunk [00006FFE1B9B0000, 00006FFE3BA10000)
Chunk [00006FFE10ED0000, 00006FFE1B9B0000) (27) {
} Chunk [00006FFE10ED0000, 00006FFE1B9B0000)
Chunk [00006FFDFB940000, 00006FFE10ED0000) (28) {
} Chunk [00006FFDFB940000, 00006FFE10ED0000)
Chunk [00006FFDDB900000, 00006FFDFB940000) (29) {
} Chunk [00006FFDDB900000, 00006FFDFB940000)
Chunk [00006FFDD0E20000, 00006FFDDB900000) (30) {
} Chunk [00006FFDD0E20000, 00006FFDDB900000)
Chunk [00006FFDC6340000, 00006FFDD0E20000) (31) {
} Chunk [00006FFDC6340000, 00006FFDD0E20000)
Chunk [00006FFDB0DA0000, 00006FFDC6340000) (32) {
} Chunk [00006FFDB0DA0000, 00006FFDC6340000)
Chunk [00006FFDA62C0000, 00006FFDB0DA0000) (33) {
} Chunk [00006FFDA62C0000, 00006FFDB0DA0000)
Chunk [00006FFD90D30000, 00006FFDA62C0000) (34) {
} Chunk [00006FFD90D30000, 00006FFDA62C0000)
Chunk [00006FFD70CD0000, 00006FFD90D30000) (35) {
} Chunk [00006FFD70CD0000, 00006FFD90D30000)
Chunk [00006FFD661F0000, 00006FFD70CD0000) (36) {
} Chunk [00006FFD661F0000, 00006FFD70CD0000)
Chunk [00006FFD50C60000, 00006FFD661F0000) (37) {
} Chunk [00006FFD50C60000, 00006FFD661F0000)
Chunk [00006FFD30C20000, 00006FFD50C60000) (38) {
} Chunk [00006FFD30C20000, 00006FFD50C60000)
Chunk [00006FFD26150000, 00006FFD30C20000) (39) {
} Chunk [00006FFD26150000, 00006FFD30C20000)
Chunk [00006FFD1B670000, 00006FFD26150000) (40) {
} Chunk [00006FFD1B670000, 00006FFD26150000)
Chunk [00006FFD10B90000, 00006FFD1B670000) (41) {
} Chunk [00006FFD10B90000, 00006FFD1B670000)
Chunk [00006FFCFB5F0000, 00006FFD10B90000) (42) {
} Chunk [00006FFCFB5F0000, 00006FFD10B90000)
Chunk [00006FFCF0B10000, 00006FFCFB5F0000) (43) {
} Chunk [00006FFCF0B10000, 00006FFCFB5F0000)
Chunk [00006FFCDB580000, 00006FFCF0B10000) (44) {
} Chunk [00006FFCDB580000, 00006FFCF0B10000)
Chunk [00006FFCBB520000, 00006FFCDB580000) (45) {
} Chunk [00006FFCBB520000, 00006FFCDB580000)
Chunk [00006FFCB0A40000, 00006FFCBB520000) (46) {
} Chunk [00006FFCB0A40000, 00006FFCBB520000)
Chunk [00006FFC9B4B0000, 00006FFCB0A40000) (47) {
} Chunk [00006FFC9B4B0000, 00006FFCB0A40000)
Chunk [00006FFC7B470000, 00006FFC9B4B0000) (48) {
} Chunk [00006FFC7B470000, 00006FFC9B4B0000)
Chunk [00006FFC65EF0000, 00006FFC7B470000) (49) {
} Chunk [00006FFC65EF0000, 00006FFC7B470000)
Chunk [00006FFC5B410000, 00006FFC65EF0000) (50) {
} Chunk [00006FFC5B410000, 00006FFC65EF0000)
Chunk [00006FFC50930000, 00006FFC5B410000) (51) {
} Chunk [00006FFC50930000, 00006FFC5B410000)
Chunk [00006FFC3B390000, 00006FFC50930000) (52) {
} Chunk [00006FFC3B390000, 00006FFC50930000)
Chunk [00006FFC308B0000, 00006FFC3B390000) (53) {
} Chunk [00006FFC308B0000, 00006FFC3B390000)
Chunk [00006FFC1B320000, 00006FFC308B0000) (54) {
} Chunk [00006FFC1B320000, 00006FFC308B0000)
Chunk [00006FFBFB2C0000, 00006FFC1B320000) (55) {
} Chunk [00006FFBFB2C0000, 00006FFC1B320000)
Chunk [00006FFBF07E0000, 00006FFBFB2C0000) (56) {
} Chunk [00006FFBF07E0000, 00006FFBFB2C0000)
Chunk [00006FFBDB250000, 00006FFBF07E0000) (57) {
} Chunk [00006FFBDB250000, 00006FFBF07E0000)
Chunk [00006FFBBB210000, 00006FFBDB250000) (58) {
} Chunk [00006FFBBB210000, 00006FFBDB250000)
Chunk [00006FFBB0730000, 00006FFBBB210000) (59) {
} Chunk [00006FFBB0730000, 00006FFBBB210000)
Chunk [00006FFBA5C50000, 00006FFBB0730000) (60) {
} Chunk [00006FFBA5C50000, 00006FFBB0730000)
Chunk [00006FFB906B0000, 00006FFBA5C50000) (61) {
} Chunk [00006FFB906B0000, 00006FFBA5C50000)
Chunk [00006FFB85BD0000, 00006FFB906B0000) (62) {
} Chunk [00006FFB85BD0000, 00006FFB906B0000)
Chunk [00006FFB70640000, 00006FFB85BD0000) (63) {
} Chunk [00006FFB70640000, 00006FFB85BD0000)
Chunk [00006FFB505E0000, 00006FFB70640000) (64) {
} Chunk [00006FFB505E0000, 00006FFB70640000)
Chunk [00006FFB45B00000, 00006FFB505E0000) (65) {
} Chunk [00006FFB45B00000, 00006FFB505E0000)
Chunk [00006FFB30570000, 00006FFB45B00000) (66) {
} Chunk [00006FFB30570000, 00006FFB45B00000)
Chunk [00006FFB10530000, 00006FFB30570000) (67) {
} Chunk [00006FFB10530000, 00006FFB30570000)
Chunk [00006FFB05A60000, 00006FFB10530000) (68) {
} Chunk [00006FFB05A60000, 00006FFB10530000)
Chunk [00006FFAFAF80000, 00006FFB05A60000) (69) {
} Chunk [00006FFAFAF80000, 00006FFB05A60000)
Chunk [00006FFAF04A0000, 00006FFAFAF80000) (70) {
} Chunk [00006FFAF04A0000, 00006FFAFAF80000)
Chunk [00006FFADAF00000, 00006FFAF04A0000) (71) {
} Chunk [00006FFADAF00000, 00006FFAF04A0000)
Chunk [00006FFAD0420000, 00006FFADAF00000) (72) {
} Chunk [00006FFAD0420000, 00006FFADAF00000)
Chunk [00006FFABAE90000, 00006FFAD0420000) (73) {
} Chunk [00006FFABAE90000, 00006FFAD0420000)
Chunk [00006FFA9AE30000, 00006FFABAE90000) (74) {
} Chunk [00006FFA9AE30000, 00006FFABAE90000)
Chunk [00006FFA90350000, 00006FFA9AE30000) (75) {
} Chunk [00006FFA90350000, 00006FFA9AE30000)
Chunk [00006FFA7ADC0000, 00006FFA90350000) (76) {
} Chunk [00006FFA7ADC0000, 00006FFA90350000)
Chunk [00006FFA5AD80000, 00006FFA7ADC0000) (77) {
} Chunk [00006FFA5AD80000, 00006FFA7ADC0000)
Chunk [00006FFA45800000, 00006FFA5AD80000) (78) {
} Chunk [00006FFA45800000, 00006FFA5AD80000)
Chunk [00006FFA3AD20000, 00006FFA45800000) (79) {
} Chunk [00006FFA3AD20000, 00006FFA45800000)
Chunk [00006FFA30240000, 00006FFA3AD20000) (80) {
} Chunk [00006FFA30240000, 00006FFA3AD20000)
Chunk [00006FFA1ACA0000, 00006FFA30240000) (81) {
} Chunk [00006FFA1ACA0000, 00006FFA30240000)
Chunk [00006FFA101C0000, 00006FFA1ACA0000) (82) {
} Chunk [00006FFA101C0000, 00006FFA1ACA0000)
Chunk [00006FF9FAC30000, 00006FFA101C0000) (83) {
} Chunk [00006FF9FAC30000, 00006FFA101C0000)
Chunk [00006FF9DABD0000, 00006FF9FAC30000) (84) {
} Chunk [00006FF9DABD0000, 00006FF9FAC30000)
Chunk [00006FF9D00F0000, 00006FF9DABD0000) (85) {
} Chunk [00006FF9D00F0000, 00006FF9DABD0000)
Chunk [00006FF9BAB60000, 00006FF9D00F0000) (86) {
} Chunk [00006FF9BAB60000, 00006FF9D00F0000)
Chunk [00006FF99AB20000, 00006FF9BAB60000) (87) {
} Chunk [00006FF99AB20000, 00006FF9BAB60000)
Chunk [00006FF990040000, 00006FF99AB20000) (88) {
} Chunk [00006FF990040000, 00006FF99AB20000)
Chunk [00006FF985560000, 00006FF990040000) (89) {
} Chunk [00006FF985560000, 00006FF990040000)
Chunk [00006FF96FFC0000, 00006FF985560000) (90) {
} Chunk [00006FF96FFC0000, 00006FF985560000)
Chunk [00006FF9654E0000, 00006FF96FFC0000) (91) {
} Chunk [00006FF9654E0000, 00006FF96FFC0000)
Chunk [00006FF94FF50000, 00006FF9654E0000) (92) {
} Chunk [00006FF94FF50000, 00006FF9654E0000)
Chunk [00006FF92FEF0000, 00006FF94FF50000) (93) {
} Chunk [00006FF92FEF0000, 00006FF94FF50000)
Chunk [00006FF925410000, 00006FF92FEF0000) (94) {
} Chunk [00006FF925410000, 00006FF92FEF0000)
Chunk [00006FF90FE80000, 00006FF925410000) (95) {
} Chunk [00006FF90FE80000, 00006FF925410000)
Chunk [00006FF8EFE40000, 00006FF90FE80000) (96) {
} Chunk [00006FF8EFE40000, 00006FF90FE80000)
Chunk [00006FF8E5370000, 00006FF8EFE40000) (97) {
} Chunk [00006FF8E5370000, 00006FF8EFE40000)
Chunk [00006FF8DA890000, 00006FF8E5370000) (98) {
} Chunk [00006FF8DA890000, 00006FF8E5370000)
Chunk [00006FF8CFDB0000, 00006FF8DA890000) (99) {
} Chunk [00006FF8CFDB0000, 00006FF8DA890000)
Chunk [00006FF8BA810000, 00006FF8CFDB0000) (100) {
} Chunk [00006FF8BA810000, 00006FF8CFDB0000)
Chunk [00006FF8AFD30000, 00006FF8BA810000) (101) {
} Chunk [00006FF8AFD30000, 00006FF8BA810000)
Chunk [00006FF89A7A0000, 00006FF8AFD30000) (102) {
} Chunk [00006FF89A7A0000, 00006FF8AFD30000)
Chunk [00006FF87A740000, 00006FF89A7A0000) (103) {
} Chunk [00006FF87A740000, 00006FF89A7A0000)
Chunk [00006FF86FC60000, 00006FF87A740000) (104) {
} Chunk [00006FF86FC60000, 00006FF87A740000)
Chunk [00006FF85A6D0000, 00006FF86FC60000) (105) {
} Chunk [00006FF85A6D0000, 00006FF86FC60000)
Chunk [00006FF83A690000, 00006FF85A6D0000) (106) {
} Chunk [00006FF83A690000, 00006FF85A6D0000)
Chunk [00006FF825110000, 00006FF83A690000) (107) {
} Chunk [00006FF825110000, 00006FF83A690000)
Chunk [00006FF81A630000, 00006FF825110000) (108) {
} Chunk [00006FF81A630000, 00006FF825110000)
Chunk [00006FF80FB50000, 00006FF81A630000) (109) {
} Chunk [00006FF80FB50000, 00006FF81A630000)
Chunk [00006FF7FA5B0000, 00006FF80FB50000) (110) {
} Chunk [00006FF7FA5B0000, 00006FF80FB50000)
Chunk [00006FF7EFAD0000, 00006FF7FA5B0000) (111) {
} Chunk [00006FF7EFAD0000, 00006FF7FA5B0000)
Chunk [00006FF7DA540000, 00006FF7EFAD0000) (112) {
} Chunk [00006FF7DA540000, 00006FF7EFAD0000)
Chunk [00006FF7BA4E0000, 00006FF7DA540000) (113) {
} Chunk [00006FF7BA4E0000, 00006FF7DA540000)
Chunk [00006FF7AFA00000, 00006FF7BA4E0000) (114) {
} Chunk [00006FF7AFA00000, 00006FF7BA4E0000)
Chunk [00006FF79A470000, 00006FF7AFA00000) (115) {
} Chunk [00006FF79A470000, 00006FF7AFA00000)
Chunk [00006FF77A430000, 00006FF79A470000) (116) {
} Chunk [00006FF77A430000, 00006FF79A470000)
2730 tracts per page in the page table.
VMArena 00006FFFFFFF0000
controlPool 00006FFFFFFF00B8
reserved 000000006EC30000
committed 0000000000130000
commitLimit FFFFFFFFFFFFFFFF
spareCommitted 0000000000040000
spare 0.75
zoneShift 20
grainSize 0000000000010000
lastTract 0000000000000000
lastTractBase 0000000000000000
primary 00006FFFFBFF0000
hasFreeLand YES
freeZones 0000000000000000000000000000000000000000000000000000000000000000
zoned NO
droppedMessages 0
Globals
mpsVersion @(#)Ravenbrook MPS, product.mps, release/1.118.0, platform.cyi6gc, variety.assertastic.logtastic.stats, compiled on Dec 21 2024 10:18:21
lock 00006FFFFC020110
pollThreshold 0
outside poll
released
fillMutatorSize 15912
emptyMutatorSize 0
allocMutatorSize 0
fillInternalSize 0
emptyInternalSize 0
poolSerial 6
rootSerial 0
formatSerial 0
threadSerial 0
busyTraces 0000000000000000000000000000000000000000000000000000000000000000
flippedTraces 0000000000000000000000000000000000000000000000000000000000000000
History 00006FFFFFFF0D10 {
epoch = 0
prehistory = 0000000000000000000000000000000000000000000000000000000000000000
history {
[note: indices are raw, not rotated]
[0] = 0000000000000000000000000000000000000000000000000000000000000000
[1] = 0000000000000000000000000000000000000000000000000000000000000000
[2] = 0000000000000000000000000000000000000000000000000000000000000000
[3] = 0000000000000000000000000000000000000000000000000000000000000000
}
} History 00006FFFFFFF0D10
Shield 00006FFFFFFF0700 {
inside shield
suspended NO
depth 0
next 0
length 0
unsynced 0
holds 0
} Shield 00006FFFFFFF0700
MFSPool 00006FFFFFFF0490
serial 0
arena 00006FFFFFFF0000 (1)
alignment 0000000000000008
alignShift 0000000000000003
unroundedUnitSize 0000000000000030
extendBy 0000000000010000
extendSelf NO
unitSize 0000000000000030
freeList 00006FFFFC0100D0
total 000000000000FFF0
free 000000000000FED0
MFSPool 00006FFFFFFF0DC0
serial 1
arena 00006FFFFFFF0000 (1)
alignment 0000000000000008
alignShift 0000000000000003
unroundedUnitSize 0000000000000020
extendBy 0000000000010000
extendSelf NO
unitSize 0000000000000020
freeList 00006FFFF1540090
total 000000000000FFF0
free 000000000000FF70
MVFFPool 00006FFFFFFF00B8
serial 2
arena 00006FFFFFFF0000 (1)
alignment 0000000000000008
alignShift 0000000000000003
extendBy 0000000000010000
avgSize 0000000000000020
firstFit 1
slotHigh 0
spare 0.75
LocusPref 00006FFFFFFF0128 {
high NO
zones 1111111111111111111111111111111100000000000000000000000000000000
avoid 0000000000000000000000000000000000000000000000000000000000000000
} LocusPref 00006FFFFFFF0128
CBSFast 00006FFFFFFF0220
class 00000001004804A0 ("CBSFast")
arena 00006FFFFFFF0000
align 8
inLand NO
blockPool 00006FFFFFFF0160
ownPool 0
treeSize: 1
meter "size of tree" {count: 2, total 0, max 0, min 0, mean 0, meanSquared 0}
Splay 00006FFFFFFF0248 {
compare 7A1C430001000000
nodeKey 031D430001000000
updateNode B7EA400001000000
tree ( [00006FFFFC020000,00006FFFFC030000) {65536} )
} Splay 00006FFFFFFF0248
CBSFast 00006FFFFFFF02D0
class 00000001004804A0 ("CBSFast")
arena 00006FFFFFFF0000
align 8
inLand NO
blockPool 00006FFFFFFF0160
ownPool 0
treeSize: 1
meter "size of tree" {count: 441, total 636, max 2, min 0, mean 1.4421768707483, meanSquared 2.340136054421773}
Splay 00006FFFFFFF02F8 {
compare 7A1C430001000000
nodeKey 031D430001000000
updateNode B7EA400001000000
tree ( [00006FFFFC0205A8,00006FFFFC030000) {64088} )
} Splay 00006FFFFFFF02F8
Freelist 00006FFFFFFF0380
class 00000001004890A0 ("Freelist")
arena 00006FFFFFFF0000
align 8
inLand NO
listSize 0
size 0
MFSPool 00006FFFFFFF0160
serial 3
arena 00006FFFFFFF0000 (1)
alignment 0000000000000008
alignShift 0000000000000003
unroundedUnitSize 0000000000000028
extendBy 0000000000010000
extendSelf YES
unitSize 0000000000000028
freeList 00006FFFFC030060
total 000000000000FFF0
free 000000000000FFA0
MVFFPool 00006FFFFC020248
serial 4
arena 00006FFFFFFF0000 (1)
alignment 0000000000000008
alignShift 0000000000000003
extendBy 0000000000010000
avgSize 0000000000000020
firstFit 1
slotHigh 0
spare 0.75
LocusPref 00006FFFFC0202B8 {
high NO
zones 1111111111111111111111111111111100000000000000000000000000000000
avoid 0000000000000000000000000000000000000000000000000000000000000000
} LocusPref 00006FFFFC0202B8
CBSFast 00006FFFFC0203B0
class 00000001004804A0 ("CBSFast")
arena 00006FFFFFFF0000
align 8
inLand NO
blockPool 00006FFFFC0202F0
ownPool 0
treeSize: 0
meter "size of tree" {count: 0}
Splay 00006FFFFC0203D8 {
compare 7A1C430001000000
nodeKey 031D430001000000
updateNode B7EA400001000000
} Splay 00006FFFFC0203D8
CBSFast 00006FFFFC020460
class 00000001004804A0 ("CBSFast")
arena 00006FFFFFFF0000
align 8
inLand NO
blockPool 00006FFFFC0202F0
ownPool 0
treeSize: 0
meter "size of tree" {count: 0}
Splay 00006FFFFC020488 {
compare 7A1C430001000000
nodeKey 031D430001000000
updateNode B7EA400001000000
} Splay 00006FFFFC020488
Freelist 00006FFFFC020510
class 00000001004890A0 ("Freelist")
arena 00006FFFFFFF0000
align 8
inLand NO
listSize 0
size 0
MFSPool 00006FFFFC0202F0
serial 5
arena 00006FFFFFFF0000 (1)
alignment 0000000000000008
alignShift 0000000000000003
unroundedUnitSize 0000000000000028
extendBy 0000000000010000
extendSelf YES
unitSize 0000000000000028
freeList 0000000000000000
total 0000000000000000
free 0000000000000000
Chain 00006FFFFC020128 {
arena 00006FFFFFFF0000
GenDesc 00006FFFFC020158 {
zones 0000000000000000000000000000000000000000000000000000000000000000
capacity 8388608
mortality 0.85
activeTraces 0000000000000000000000000000000000000000000000000000000000000000
trace 0 {
condemned 0
forwarded 0
preservedInPlace 0
}
} GenDesc 00006FFFFC020158
GenDesc 00006FFFFC0201D0 {
zones 0000000000000000000000000000000000000000000000000000000000000000
capacity 37748736
mortality 0.45
activeTraces 0000000000000000000000000000000000000000000000000000000000000000
trace 0 {
condemned 0
forwarded 0
preservedInPlace 0
}
} GenDesc 00006FFFFC0201D0
} Chain 00006FFFFC020128
extendBy: 67108864
extendMin: 0
CBS 00006FFFFFFF0E80
class 00000001004805A0 ("CBS")
arena 00006FFFFFFF0000
align 65536
inLand NO
blockPool 00006FFFFFFF0DC0
ownPool 0
treeSize: 4
meter "size of tree" {count: 518, total 2476, max 6, min 0, mean 4.77992277992278, meanSquared 24.06949806949806}
Splay 00006FFFFFFF0EA8 {
compare 7A1C430001000000
nodeKey 031D430001000000
updateNode B519440001000000
tree ( ( [00006FFFD14D0000,00006FFFD14E0000) ) / [00006FFFE6A60000,00006FFFE6A70000) \ ( [00006FFFF1550000,00006FFFF1560000) \ ( [00006FFFFC040000,00006FFFFC050000) ) ) )
} Splay 00006FFFFFFF0EA8
Chunk [00006FFFFBFF0000, 00006FFFFFFF0000) (0) {
[00006FFFFC010000, 00006FFFFC020000) 00006FFFFFFF0490 0 (MFSPool)
[00006FFFFC020000, 00006FFFFC030000) 00006FFFFFFF00B8 2 (MVFFPool)
[00006FFFFC030000, 00006FFFFC040000) 00006FFFFFFF0160 3 (MFSPool)
} Chunk [00006FFFFBFF0000, 00006FFFFFFF0000)
Chunk [00006FFFF1510000, 00006FFFFBFF0000) (1) {
[00006FFFF1540000, 00006FFFF1550000) 00006FFFFFFF0DC0 1 (MFSPool)
} Chunk [00006FFFF1510000, 00006FFFFBFF0000)
Chunk [00006FFFE6A30000, 00006FFFF1510000) (2) {
} Chunk [00006FFFE6A30000, 00006FFFF1510000)
Chunk [00006FFFD1490000, 00006FFFE6A30000) (3) {
} Chunk [00006FFFD1490000, 00006FFFE6A30000)
Chunk [00006FFFB1430000, 00006FFFD1490000) (4) {
} Chunk [00006FFFB1430000, 00006FFFD1490000)
Chunk [00006FFF913D0000, 00006FFFB1430000) (5) {
} Chunk [00006FFF913D0000, 00006FFFB1430000)
2730 tracts per page in the page table.
gapRegion: RESOURCE: unable to obtain resources
^ permalink raw reply [flat|nested] 22+ messages in thread
* bug#74805: 30.0.92; Trying to build scratch/igc on Cygwin
2024-12-21 16:56 ` Ken Brown
@ 2024-12-21 17:21 ` Gerd Möllmann
2024-12-21 17:34 ` Pip Cet via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-12-22 8:24 ` Richard Brooksby
1 sibling, 1 reply; 22+ messages in thread
From: Gerd Möllmann @ 2024-12-21 17:21 UTC (permalink / raw)
To: Ken Brown; +Cc: 74805, Eli Zaretskii, Pip Cet, rb
Ken Brown <kbrown@cornell.edu> writes:
> On 12/21/2024 2:24 AM, Eli Zaretskii wrote:
>>> Date: Fri, 20 Dec 2024 18:48:37 -0500
>>> Cc: 74805@debbugs.gnu.org, Richard Brooksby <rb@ravenbrook.com>
>>> From: Ken Brown <kbrown@cornell.edu>
>>> 3. The "mmap" branch is a straightforward port, mostly imitating the
>>> FreeBSD port. It currently (with Cygwin 3.5.5) fails because of a
>>> limitation of Cygwin's mmap. But I have a simple patch to Cygwin in the
>>> works that removes that limitation. With that patch, 37 of the 38 MPS
>>> tests pass. I still need to debug the failing test. I'm cautiously
>>> optimistic that I can get this approach to work. Either way, I expect
>>> the Cygwin patch to soon be available in a test release of Cygwin 3.6.0
>>> so that other Cygwin users can try it.
>> Thanks for the update, I think this is very good news.
>
> I could use some help from the MPS experts in debugging the failing
> test, which is arenacv. I ran the test under strace and didn't see
> any mmap or munmap failures. I'm attaching the test log, which
> doesn't mean a thing to me. I also built an unoptimized arenacv and
> can run it under gdb if someone tells me what to look for.
>
> TIA.
>
> Ken
Hi Ken.
I'm not an MPS internals expert, but AFAICT, this likely comes from here
in arenacv.c, but without being able to debug this, I find it hard to
tell what's going on in the allocator->alloc.
static void testAllocAndIterate(Arena arena, Pool pool,
Size pageSize, Count numPerPage,
AllocatorClass allocator)
{
AllocInfoStruct offsetRegion, gapRegion, newRegion, topRegion;
LocusPrefStruct pref;
Count offset, gap, new;
ZoneSet zone = (ZoneSet)2;
int i;
LocusPrefInit(&pref);
/* Testing the behaviour with various sizes of gaps in the page table. */
/* Assume the allocation strategy is first-fit. The idea of the tests is */
/* to allocate a region of memory, then deallocate a gap in the middle, */
/* then allocate a new region that fits in the gap with various amounts */
/* left over. Like this: */
/* |-offsetRegion-||----gapRegion----||-topRegion-| */
/* |-offsetRegion-||-newRegion-| |-topRegion-| */
/* This is done with three different sizes of offsetRegion, in two */
/* different zones to ensure that all page boundary cases are tested. */
for(i = 0; i < 2; ++i) { /* zone loop */
for(offset = 0; offset <= 2*numPerPage; offset += numPerPage) {
if(offset != 0)
die(allocator->alloc(&offsetRegion, &pref, offset * pageSize, pool),
"offsetRegion");
for(gap = numPerPage+1; gap <= 3 * (numPerPage+1);
gap += (numPerPage+1)) {
die(allocator->alloc(&gapRegion, &pref, gap * pageSize, pool),
^^^^^^^^^^^^^^^^
"gapRegion");
^ permalink raw reply [flat|nested] 22+ messages in thread
* bug#74805: 30.0.92; Trying to build scratch/igc on Cygwin
2024-12-21 17:21 ` Gerd Möllmann
@ 2024-12-21 17:34 ` Pip Cet via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-12-21 20:25 ` Ken Brown
0 siblings, 1 reply; 22+ messages in thread
From: Pip Cet via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-12-21 17:34 UTC (permalink / raw)
To: Gerd Möllmann; +Cc: 74805, Eli Zaretskii, Ken Brown, rb
Gerd Möllmann <gerd.moellmann@gmail.com> writes:
> Ken Brown <kbrown@cornell.edu> writes:
>
>> On 12/21/2024 2:24 AM, Eli Zaretskii wrote:
>>>> Date: Fri, 20 Dec 2024 18:48:37 -0500
>>>> Cc: 74805@debbugs.gnu.org, Richard Brooksby <rb@ravenbrook.com>
>>>> From: Ken Brown <kbrown@cornell.edu>
>>>> 3. The "mmap" branch is a straightforward port, mostly imitating the
>>>> FreeBSD port. It currently (with Cygwin 3.5.5) fails because of a
>>>> limitation of Cygwin's mmap. But I have a simple patch to Cygwin in the
>>>> works that removes that limitation. With that patch, 37 of the 38 MPS
>>>> tests pass. I still need to debug the failing test. I'm cautiously
>>>> optimistic that I can get this approach to work. Either way, I expect
>>>> the Cygwin patch to soon be available in a test release of Cygwin 3.6.0
>>>> so that other Cygwin users can try it.
>>> Thanks for the update, I think this is very good news.
>>
>> I could use some help from the MPS experts in debugging the failing
>> test, which is arenacv. I ran the test under strace and didn't see
>> any mmap or munmap failures. I'm attaching the test log, which
What about mprotect, or whatever the equivalent is?
>> doesn't mean a thing to me. I also built an unoptimized arenacv and
>> can run it under gdb if someone tells me what to look for.
>>
>> TIA.
>>
>> Ken
>
> Hi Ken.
>
> I'm not an MPS internals expert, but AFAICT, this likely comes from here
> in arenacv.c, but without being able to debug this, I find it hard to
> tell what's going on in the allocator->alloc.
>
> static void testAllocAndIterate(Arena arena, Pool pool,
> Size pageSize, Count numPerPage,
> AllocatorClass allocator)
Can you check pageSize is correct?
Pip
^ permalink raw reply [flat|nested] 22+ messages in thread
* bug#74805: 30.0.92; Trying to build scratch/igc on Cygwin
2024-12-21 17:34 ` Pip Cet via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2024-12-21 20:25 ` Ken Brown
0 siblings, 0 replies; 22+ messages in thread
From: Ken Brown @ 2024-12-21 20:25 UTC (permalink / raw)
To: Pip Cet, Gerd Möllmann; +Cc: 74805, Eli Zaretskii, rb
On 12/21/2024 12:34 PM, Pip Cet wrote:
> Gerd Möllmann <gerd.moellmann@gmail.com> writes:
>
>> Ken Brown <kbrown@cornell.edu> writes:
>>
>>> On 12/21/2024 2:24 AM, Eli Zaretskii wrote:
>>>>> Date: Fri, 20 Dec 2024 18:48:37 -0500
>>>>> Cc: 74805@debbugs.gnu.org, Richard Brooksby <rb@ravenbrook.com>
>>>>> From: Ken Brown <kbrown@cornell.edu>
>>>>> 3. The "mmap" branch is a straightforward port, mostly imitating the
>>>>> FreeBSD port. It currently (with Cygwin 3.5.5) fails because of a
>>>>> limitation of Cygwin's mmap. But I have a simple patch to Cygwin in the
>>>>> works that removes that limitation. With that patch, 37 of the 38 MPS
>>>>> tests pass. I still need to debug the failing test. I'm cautiously
>>>>> optimistic that I can get this approach to work. Either way, I expect
>>>>> the Cygwin patch to soon be available in a test release of Cygwin 3.6.0
>>>>> so that other Cygwin users can try it.
>>>> Thanks for the update, I think this is very good news.
>>>
>>> I could use some help from the MPS experts in debugging the failing
>>> test, which is arenacv. I ran the test under strace and didn't see
>>> any mmap or munmap failures. I'm attaching the test log, which
>
> What about mprotect, or whatever the equivalent is?
I can't find any calls to mprotect when this test is run.
>>> doesn't mean a thing to me. I also built an unoptimized arenacv and
>>> can run it under gdb if someone tells me what to look for.
>>>
>>> TIA.
>>>
>>> Ken
>>
>> Hi Ken.
>>
>> I'm not an MPS internals expert, but AFAICT, this likely comes from here
>> in arenacv.c, but without being able to debug this, I find it hard to
>> tell what's going on in the allocator->alloc.
>>
>> static void testAllocAndIterate(Arena arena, Pool pool,
>> Size pageSize, Count numPerPage,
>> AllocatorClass allocator)
>
> Can you check pageSize is correct?
pageSize is 65536, which is the Windows allocation granularity. It
should be OK.
Ken
^ permalink raw reply [flat|nested] 22+ messages in thread
* bug#74805: 30.0.92; Trying to build scratch/igc on Cygwin
2024-12-21 16:56 ` Ken Brown
2024-12-21 17:21 ` Gerd Möllmann
@ 2024-12-22 8:24 ` Richard Brooksby
2024-12-22 8:32 ` Richard Brooksby
1 sibling, 1 reply; 22+ messages in thread
From: Richard Brooksby @ 2024-12-22 8:24 UTC (permalink / raw)
To: Ken Brown, Eli Zaretskii; +Cc: Gerd Möllmann, 74805, Pip Cet
On 2024-12-21 16:56, Ken Brown wrote:
> On 12/21/2024 2:24 AM, Eli Zaretskii wrote:
>>> Date: Fri, 20 Dec 2024 18:48:37 -0500
>>> Cc: 74805@debbugs.gnu.org, Richard Brooksby <rb@ravenbrook.com>
>>> From: Ken Brown <kbrown@cornell.edu>
>>> 3. The "mmap" branch is a straightforward port, mostly imitating the
>>> FreeBSD port. It currently (with Cygwin 3.5.5) fails because of a
>>> limitation of Cygwin's mmap. But I have a simple patch to Cygwin in the
>>> works that removes that limitation. With that patch, 37 of the 38 MPS
>>> tests pass. I still need to debug the failing test. I'm cautiously
>>> optimistic that I can get this approach to work. Either way, I expect
>>> the Cygwin patch to soon be available in a test release of Cygwin 3.6.0
>>> so that other Cygwin users can try it.
>>
>> Thanks for the update, I think this is very good news.
>
> I could use some help from the MPS experts in debugging the failing
> test, which is arenacv. I ran the test under strace and didn't see any
> mmap or munmap failures. I'm attaching the test log, which doesn't mean
> a thing to me. I also built an unoptimized arenacv and can run it under
> gdb if someone tells me what to look for.
Hello. I can't offer much direct help just now, but here's where I'd start.
The test is exiting because the MPS is returning code ResRESOURCE from
these lines
https://github.com/Ravenbrook/mps/blob/9fd0577cf1231e61c9801c81499e5d16d0743806/code/arenacv.c#L356-L357
while calling an allocator.
ResRESOURCE only occurs in a few places, and is almost certainly to do
with a lack of available address space. Given that you've had to patch
mmap, that's a smoking gun, but it should be fairly easy to breakpoint
all the lines that raise ResRESOURCE to figure out what's happening.
Sometimes it's difficult to breakpoint the MPS because it runs in weird
signal contexts. We've been known to crash debuggers. I don't know if
it's tricksy in Cygwin. In that case, you can hack around with
_mps_RES_ENUM in mps.h to make ResRESOURCE call a function.
$ grep --color=auto -nH --null -e ResRESOURCE *.c
arena.c:767: return ResRESOURCE;
arena.c:1048: return ResRESOURCE;
arena.c:1227: return ResRESOURCE;
arenacv.c:461: die((res == ResRESOURCE) ? ResOK : res, "right error
code");
arenavm.c:722: res = ResRESOURCE;
fotest.c:55: return ResRESOURCE;
mpm.c:254: return (res == ResMEMORY || res == ResRESOURCE || res ==
ResCOMMIT_LIMIT);
thw3.c:101: return ResRESOURCE;
vman.c:52: return ResRESOURCE;
vman.c:59: return ResRESOURCE;
vmix.c:107: return ResRESOURCE;
vmix.c:110: return ResRESOURCE;
vmix.c:122: return ResRESOURCE;
vmw3.c:117: return ResRESOURCE;
vmw3.c:120: return ResRESOURCE;
vmw3.c:130: return ResRESOURCE;
It's very unlikely that you're actually running out of address space on
a 64-bit system.
^ permalink raw reply [flat|nested] 22+ messages in thread
* bug#74805: 30.0.92; Trying to build scratch/igc on Cygwin
2024-12-22 8:24 ` Richard Brooksby
@ 2024-12-22 8:32 ` Richard Brooksby
0 siblings, 0 replies; 22+ messages in thread
From: Richard Brooksby @ 2024-12-22 8:32 UTC (permalink / raw)
To: Ken Brown, Eli Zaretskii; +Cc: Gerd Möllmann, 74805, Pip Cet
On 2024-12-22 08:24, Richard Brooksby wrote:
> On 2024-12-21 16:56, Ken Brown wrote:
>> On 12/21/2024 2:24 AM, Eli Zaretskii wrote:
>>>> Date: Fri, 20 Dec 2024 18:48:37 -0500
>>>> Cc: 74805@debbugs.gnu.org, Richard Brooksby <rb@ravenbrook.com>
>>>> From: Ken Brown <kbrown@cornell.edu>
>>>> 3. The "mmap" branch is a straightforward port, mostly imitating the
>>>> FreeBSD port. It currently (with Cygwin 3.5.5) fails because of a
>>>> limitation of Cygwin's mmap. But I have a simple patch to Cygwin in
>>>> the
>>>> works that removes that limitation. With that patch, 37 of the 38 MPS
>>>> tests pass. I still need to debug the failing test. I'm cautiously
>>>> optimistic that I can get this approach to work. Either way, I expect
>>>> the Cygwin patch to soon be available in a test release of Cygwin 3.6.0
>>>> so that other Cygwin users can try it.
>>>
>>> Thanks for the update, I think this is very good news.
>>
>> I could use some help from the MPS experts in debugging the failing
>> test, which is arenacv. I ran the test under strace and didn't see
>> any mmap or munmap failures. I'm attaching the test log, which
>> doesn't mean a thing to me. I also built an unoptimized arenacv and
>> can run it under gdb if someone tells me what to look for.
>
> Hello. I can't offer much direct help just now, but here's where I'd
> start.
...
> It's very unlikely that you're actually running out of address space
on a 64-bit system.
I should add that arenacv is a coverage test that is *trying* to provoke
the ResRESOURCE error paths in some circumstances
https://github.com/Ravenbrook/mps/blob/9fd0577cf1231e61c9801c81499e5d16d0743806/code/arenacv.c#L461
but note that this isn't where the test is failing. However, it may be
relevant, perhaps if your munmap doesn't successfully free address space.
^ permalink raw reply [flat|nested] 22+ messages in thread
end of thread, other threads:[~2024-12-22 8:32 UTC | newest]
Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-11 22:50 bug#74805: 30.0.92; Trying to build scratch/igc on Cygwin Ken Brown
2024-12-11 23:47 ` Pip Cet via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-12-12 18:14 ` Ken Brown
2024-12-11 23:57 ` Andrea Corallo
2024-12-12 6:09 ` Eli Zaretskii
2024-12-12 18:12 ` Ken Brown
2024-12-12 19:25 ` Eli Zaretskii
2024-12-12 23:17 ` Stefan Kangas
2024-12-13 7:51 ` Eli Zaretskii
2024-12-20 23:48 ` Ken Brown
2024-12-21 7:24 ` Eli Zaretskii
2024-12-21 16:56 ` Ken Brown
2024-12-21 17:21 ` Gerd Möllmann
2024-12-21 17:34 ` Pip Cet via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-12-21 20:25 ` Ken Brown
2024-12-22 8:24 ` Richard Brooksby
2024-12-22 8:32 ` Richard Brooksby
2024-12-12 11:05 ` Stefan Kangas
2024-12-12 11:30 ` Eli Zaretskii
2024-12-12 12:06 ` Gerd Möllmann
2024-12-12 14:38 ` Eli Zaretskii
2024-12-12 15:01 ` Gerd Möllmann
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.