deadlock detection
Andrew Haley
aph@redhat.com
Wed Sep 24 23:48:00 GMT 2003
Jacob Gladish writes:
> I've been trolling through the entire gcc code, and can't seem to find
> generic containers anywhere.
Well, there's some in libstdc++, but it was things like
java.util.LinkedList that I was thinking of.
> I also haven't seen anything that refers to what is and what isn't
> suitable to use as far as external libraries or code. So with that
> said, is it ok to use the stl when hacking on the runtime?
No, please don't. Please use Java libraries in libgcj. No libstdc++
dependencies, please.
> I guess for my personal enjoyment it's fine, but I'd like to
> actually contribute a patch at some point.
>
> My current approach would to be instrument the _Jv_MutexLock
> routine in posix-threads.h. Since we can tell from the _Jv_Mutex_t
> structure whether we are going to go into a wait state before
> calling pthread_mutex_lock. At this point, if we know a wait state
> is about to occurr, an edge would be added to the wait-for-graph
> And then removed once the call returns.
This seems reasonable, but it would restrict all this stuff to
POSIX-only platforms. That suits me well enough, but others might
disagree... ;-)
Andrew.
More information about the Java-patches
mailing list