annotate agent/test/jdi/README.jjh @ 17716:cdb71841f4bc

6498581: ThreadInterruptTest3 produces wrong output on Windows Summary: There is race condition between os::interrupt and os::is_interrupted on Windows. In JVM_Sleep(Thread.sleep), check if thread gets interrupted, it may see interrupted but not really interrupted so cause spurious waking up (early return from sleep). Fix by checking if interrupt event really gets set thus prevent false return. For intrinsic of _isInterrupted, on Windows, go fastpath only on bit not set. Reviewed-by: acorn, kvn Contributed-by: david.holmes@oracle.com, yumin.qi@oracle.com
author minqi
date Wed, 26 Feb 2014 15:20:41 -0800
parents a61af66fc99e
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
a61af66fc99e Initial load
duke
parents:
diff changeset
1
a61af66fc99e Initial load
duke
parents:
diff changeset
2 This dir contains a test for the JDI-SA implementation.
a61af66fc99e Initial load
duke
parents:
diff changeset
3
a61af66fc99e Initial load
duke
parents:
diff changeset
4 sagtest.java, sagtarg.java are a normal JDI regression test
a61af66fc99e Initial load
duke
parents:
diff changeset
5 that uses TargetAdapter.java, TargetListener.java, TestScaffold.java,
a61af66fc99e Initial load
duke
parents:
diff changeset
6 and VMConnection.java.
a61af66fc99e Initial load
duke
parents:
diff changeset
7
a61af66fc99e Initial load
duke
parents:
diff changeset
8 This test starts the debuggee, sagtarg.java, which just does a wait.
a61af66fc99e Initial load
duke
parents:
diff changeset
9 The test then calls sagdoit.java which calls all the JDJI interface
a61af66fc99e Initial load
duke
parents:
diff changeset
10 functions. Well, it doesn't call them all yet, but that is the plan.
a61af66fc99e Initial load
duke
parents:
diff changeset
11 At least all that are interesting to the JDI-SA client. The result of
a61af66fc99e Initial load
duke
parents:
diff changeset
12 each call is sent to stdout
a61af66fc99e Initial load
duke
parents:
diff changeset
13
a61af66fc99e Initial load
duke
parents:
diff changeset
14 The script runjpda.sh runs this test. It then runs the targ part of
a61af66fc99e Initial load
duke
parents:
diff changeset
15 the test and calls gcore on it to get a core dump into file sagcore.
a61af66fc99e Initial load
duke
parents:
diff changeset
16 Do
a61af66fc99e Initial load
duke
parents:
diff changeset
17 runjpda.sh >& kk
a61af66fc99e Initial load
duke
parents:
diff changeset
18
a61af66fc99e Initial load
duke
parents:
diff changeset
19 to run this.
a61af66fc99e Initial load
duke
parents:
diff changeset
20
a61af66fc99e Initial load
duke
parents:
diff changeset
21 NOTE that this produces 1000s of lines of output
a61af66fc99e Initial load
duke
parents:
diff changeset
22 so be sure to redirect to a file.
a61af66fc99e Initial load
duke
parents:
diff changeset
23
a61af66fc99e Initial load
duke
parents:
diff changeset
24 File sagclient.java is a test program that uses the JDI-SA
a61af66fc99e Initial load
duke
parents:
diff changeset
25 client to connect to a core file or pid and then calls sagdoit
a61af66fc99e Initial load
duke
parents:
diff changeset
26 which calls the JDI methods.
a61af66fc99e Initial load
duke
parents:
diff changeset
27
a61af66fc99e Initial load
duke
parents:
diff changeset
28 The script runsa.sh can be used to run sagclient on sagcore:
a61af66fc99e Initial load
duke
parents:
diff changeset
29 runsa.sh sagcore >& kk1
a61af66fc99e Initial load
duke
parents:
diff changeset
30
a61af66fc99e Initial load
duke
parents:
diff changeset
31 You can then look at the differences between the runjpda.sh
a61af66fc99e Initial load
duke
parents:
diff changeset
32 and the runsa.sh run to see if there are bugs. Note that the
a61af66fc99e Initial load
duke
parents:
diff changeset
33 order of things might be different.
a61af66fc99e Initial load
duke
parents:
diff changeset
34
a61af66fc99e Initial load
duke
parents:
diff changeset
35
a61af66fc99e Initial load
duke
parents:
diff changeset
36 -----------------------------------------
a61af66fc99e Initial load
duke
parents:
diff changeset
37
a61af66fc99e Initial load
duke
parents:
diff changeset
38 runjdb.sh contains a script that will run jdb on a core file
a61af66fc99e Initial load
duke
parents:
diff changeset
39 using the JDI-sa binding.