Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(931)

Issue 282090043: i#1114 JIT optimization: thread handling

Can't Edit
Can't Publish+Mail
Start Review
Created:
8 years, 3 months ago by Byron
Modified:
8 years, 3 months ago
Reviewers:
bruening
CC:
dynamorio-devs_googlegroups.com
Visibility:
Public.

Description

Commit log for first patchset: --------------- i#1114 JIT optimization: thread handling Implements thread handling for the JIT optimization, including waiting for linking threads, notifying threads during JIT fragment unlinking (NYI), and iterating the set of active threads to remove fragments (NYI). ---------------

Patch Set 1 #

Total comments: 6

Patch Set 2 : Locking adjustments in fragment removal loop. #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+248 lines, -30 lines) Patch
M core/arch/interp.c View 1 chunk +1 line, -1 line 0 comments Download
M core/dynamo.c View 6 chunks +15 lines, -1 line 0 comments Download
M core/globals.h View 2 chunks +2 lines, -0 lines 0 comments Download
M core/jit_opt.h View 2 chunks +12 lines, -2 lines 0 comments Download
M core/jit_opt.c View 1 14 chunks +208 lines, -20 lines 4 comments Download
M core/monitor.c View 2 chunks +4 lines, -0 lines 0 comments Download
M core/utils.h View 1 chunk +1 line, -1 line 0 comments Download
M core/vmareas.c View 4 chunks +5 lines, -5 lines 0 comments Download

Messages

Total messages: 7
Byron
8 years, 3 months ago (2016-01-08 03:12:19 UTC) #1
Byron
This CL covers all thread handling for the optimization. If the CL is too big, ...
8 years, 3 months ago (2016-01-08 03:23:03 UTC) #2
Byron
Commit log for latest patchset: --------------- i#1114 JIT optimization: thread handling Implements thread handling for ...
8 years, 3 months ago (2016-01-08 21:31:16 UTC) #3
Byron
Making some minor changes to the thread negotiation blocks around the fragment removal loop (no ...
8 years, 3 months ago (2016-01-08 21:38:04 UTC) #4
bruening
DR already has thread coordination for flushing and for suspension. Could you write a paragraph ...
8 years, 3 months ago (2016-01-14 19:42:34 UTC) #5
Byron
On 2016/01/14 19:42:34, bruening wrote: > DR already has thread coordination for flushing and for ...
8 years, 3 months ago (2016-01-15 01:56:14 UTC) #6
bruening
8 years, 3 months ago (2016-01-15 15:40:17 UTC) #7
On Thu, Jan 14, 2016 at 8:56 PM, <byron.c.hawkins@gmail.com> wrote:

> On 2016/01/14 19:42:34, bruening wrote:
>
>> DR already has thread coordination for flushing and for suspension.
>>
> Could you
>
>> write a paragraph (in a comment in the code might be best) describing
>>
> why we
>
>> need to add this new thread synch scheme?
>>
>
> It may be possible to share thread handling code with the existing flush
> mechanism. During the JIT project I didn't understand the code well
> enough to even try it (though I considered it), but now I could probably
> work through an attempt in an hour or two. This would also avoid
> duplicating special cases, like the Windows-only conditions for flushing
> fragments from a thread that is at a syscall (which the optimization
> doesn't handle, since we only implemented on Linux).
>
> The current problem with code sharing is that the threadwise unlink API
> {flush_fragments_synch_unlink_priv(), flush_fragments_unlink_shared(),
> flush_fragments_end_synch()} directly calls vm_area_unlink_fragments()
> to remove the whole vmarea. The solution might be as simple as
> splitting:
>
>     flush_fragments_synch_unlink_priv()
>
> into two functions:
>
>     flush_fragments_synch_priv()        /* usher all threads outside of
> linking state */
>     flush_fragments_synch_unlink_priv() /* delegate to
> flush_fragments_synch_priv(), then remove vmarea */
>
> The JIT flush would just call flush_fragments_synch_priv(), then remove
> fragments in its own way (subpage granularity), and finally
> flush_fragments_end_synch(). Let me know if that's the preferable
> approach.
>

That sounds good to me, leveraging the existing mechanisms rather than
adding a separate parallel scheme.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b