Commit Graph

16 Commits

Author SHA1 Message Date
Siva Annamalai b40775549f Fix for issue 25236
- Ensure that no new OSThreads are created once the VM is in shutdown mode
- Do not query thread_list_head_ without a lock (this leads to the race which causes two threads to delete the lock and TLS at the same time)

BUG=25236
R=zra@google.com

Review URL: https://codereview.chromium.org/1537543002 .
2015-12-18 10:16:28 -08:00
Florian Schneider 59fd6c8397 VM: Small clean up and const-ness fix for Thread/OSThread constants.
BUG=
R=srdjan@google.com

Review URL: https://codereview.chromium.org/1482243006 .
2015-12-02 12:30:12 +01:00
John McCutchan aaf37ad035 Landing patch set 7 from https://codereview.chromium.org/1450113003/
Review URL: https://codereview.chromium.org/1466523002 .
2015-11-19 14:18:52 -08:00
Siva Annamalai 9e19d236ca - Add an OSThread structure which is the generic TLS structure for all C++
fields in a thread (i.e fields that are not Dart VM related)
- Split the Thread structure to be a pure Dart per thread structure and add
  a pointer to os_thread which points to the OSThread structure
- Change Schedule/UnSchedule to set the Dart Thread structure as the TLS of
  the thread when it is inside the Dart world and reset the TLS back to the
  OSThread strcuture when is exits the Dart World.
- Moved the stack_base and few stack size related functions to OSThread from Isolate

R=johnmccutchan@google.com, zra@google.com

Review URL: https://codereview.chromium.org/1439483003 .
2015-11-19 13:45:10 -08:00
John McCutchan 28e416b1f4 Revert "Avoid strerror_r portability issues"
This reverts commit ca81c1732b.
2015-11-17 16:34:25 -08:00
John McCutchan ca81c1732b Avoid strerror_r portability issues
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/1450113003 .
2015-11-17 15:23:47 -08:00
Siva Annamalai 1a038d5030 Add lock owner information for class Monitor and add assertions for wait/notify/notifyall.
R=johnmccutchan@google.com, srdjan@google.com

Review URL: https://codereview.chromium.org/1426743002 .
2015-10-27 13:47:10 -07:00
John McCutchan 6fc0af49dd Build fixes for fnl/musl
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/1406253005 .
2015-10-21 09:17:55 -07:00
Zachary Anderson cc0a9c3e7e Fix calls to pthread_join
BUG=
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/1412343002 .
2015-10-19 15:10:46 -07:00
John McCutchan 8685d2ebf5 Add OSThread::GetCurrentThreadTraceId and use it in the timeline implementation
- This ensures our trace-event thread ids match the thread ids used in Chromium's base.

R=rmacnak@google.com

Review URL: https://codereview.chromium.org//1368793002 .
2015-09-24 14:57:30 -07:00
Zachary Anderson 7093f2996b VM thread shutdown.
BUG=
R=iposva@google.com, turnidge@google.com

Review URL: https://codereview.chromium.org//1275353005 .
2015-09-15 12:49:52 -07:00
John McCutchan 0ae89cf980 Fix MacOS build
BUG=

Review URL: https://codereview.chromium.org//1286093005 .
2015-08-12 15:01:21 -07:00
Daniel Andersson 868d2c6c3e The sweeper must not be running during isolate shutdown.
In release mode, there seems to be nothing to prevent this.
In debug mode, the "Verify" call waits for the sweeper, but there is still a race between the task count update and the ExitIsolateAsHelper call, which could cause problems.

Fix both of these, and add more assertions and verbose error messages.

- make sweeper task cleanly exit isolate *before* notifying
- wait for sweeper before shutting down isolate
- verbose pthread failures

BUG=
R=asiva@google.com

Review URL: https://codereview.chromium.org//1233563004 .
2015-07-13 17:49:49 -07:00
koda@google.com 1e3b00d72e Automatic thread cleanup on non-Windows platforms.
Issue 23474 is tracking Windows support (use Chromium's method).

BUG=23474
R=iposva@google.com

Review URL: https://codereview.chromium.org//1134003005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45817 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-15 17:30:33 +00:00
koda@google.com b1634f7c30 Isolate -> Thread for tracking owner of mutex and simulator's exclusive access.
Prepares for multiple threads referencing the same isolate (in particular, the mutator and sweeper).

R=asiva@google.com

Review URL: https://codereview.chromium.org//999983004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44762 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-27 20:33:36 +00:00
koda@google.com c7e9e048ed Rename Thread -> OSThread.
It's a collection of static utility methods for primitive operations on OS threads.

Make room in the namespace for upcoming class that will represent all the complex state of a VM thread.

Review URL: https://codereview.chromium.org//796063006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42895 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-15 02:30:07 +00:00