From: Tom Tromey <tromey@redhat.com>
To: Paolo Bonzini <bonzini@gnu.org>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [incremental] Patch: FYI: initial threading in gcc
Date: Fri, 12 Oct 2007 16:05:00 -0000 [thread overview]
Message-ID: <m3zlyocpdp.fsf@fleche.redhat.com> (raw)
In-Reply-To: <470F36E6.4090703@gnu.org> (Paolo Bonzini's message of "Fri\, 12 Oct 2007 10\:57\:10 +0200")
>>>>> "Paolo" == Paolo Bonzini <bonzini@gnu.org> writes:
>> There are some limitations in the current patch. First, it assumes
>> pthreads and the existence of __thread. Fixing this is just some
>> boring configury, or perhaps figuring out how to re-use gthr* on the
>> host. (If __thread is not available, I plan to have the server fall
>> back to single-threaded mode.) Second, I haven't implemented PCH
>> support for thread-locals.
Paolo> 1) moving all globals to the heap or to GGC memory, so that they are
Paolo> at least in a shared address space
Paolo> I fear that the above might also mean implementing pointer-swizzling
Paolo> on PCH load, because you might need the same PCH in different threads.
I think this would only be an issue if we have an object on the heap
that contains the address of a thread-local variable. I don't know
whether that happens, but I doubt that it does.
So, I don't think we'll need to do full pointer swizzling on PCH load.
But, we'll have to arrange for the thread-locals to get their correct
values at startup. I haven't looked into this but I don't think it
should be very hard or very expensive.
I'm not planning to allow creating a PCH when there are multiple
threads running. That should simplify things a bit.
Tom
prev parent reply other threads:[~2007-10-12 16:05 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-11 20:34 Tom Tromey
2007-10-12 8:57 ` Paolo Bonzini
2007-10-12 16:05 ` Tom Tromey [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m3zlyocpdp.fsf@fleche.redhat.com \
--to=tromey@redhat.com \
--cc=bonzini@gnu.org \
--cc=gcc-patches@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).