This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA] Suspend counting for JDWP


Keith Seitz wrote:
So now all the pieces are in place to implement _Jv_ThreadDebug*. The attached patch does this for POSIX threads only. Win32 and whatever threading system supported by gij will need implementing eventually.

Keith

ChangeLog
2006-06-26  Keith Seitz  <keiths@redhat.com>

        * include/posix-threads.h (_Jv_Thread_t): Add mutex and
        count for JDWP suspend counting.
        * posix-threads.cc (_Jv_ThreadInitData): Initialize suspend
        couont mutex and initial count.
        (_Jv_ThreadDestroyData): Destroy suspend count mutex.
        (_Jv_ThreadDebugResume): Implement.
        (_Jv_ThreadDebugSuspendCount): Likewise.
        (_Jv_ThreadDebugSuspend): Likewise.


I wonder if it is worthwhile to maintain a suspend_count_mutex for every thread, particularly when it will only be needed during debugging sessions. Perhaps a single, global mutex is sufficient?

Are we likely to need to associate other JVMTI/JDWP debugging data with a thread? If so then it might be wise to put these in a _Jv_ThreadDebugInfo (or some such) struct which would be initialized only when JDWP is in use.

If we had that, these suspend functions could be made "generic" - put in a jvmti.cc or some such, and we'd only need a _Jv_GetThreadDebugInfo in posix-threads.h/win32-threads.h.

Does this sound reasonable?

Bryce


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]