-
Notifications
You must be signed in to change notification settings - Fork 138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Optimize GC write barriers in the pmc's #1069
Labels
Comments
rurban
changed the title
Optimize GC write barriers in the pmc
Optimize GC write barriers in the pmc's
Apr 22, 2014
rurban
pushed a commit
that referenced
this issue
May 23, 2014
Start of GSOC 2014 work. Task 1: improve GC write barriers. See GH issue #1069
rurban
pushed a commit
that referenced
this issue
May 27, 2014
Start of GSOC 2014 work. Task 1: improve GC write barriers. See GH issue #1069
rurban
pushed a commit
that referenced
this issue
May 29, 2014
Start of GSOC 2014 work. Task 1: improve GC write barriers. See GH issue #1069
rurban
pushed a commit
that referenced
this issue
May 30, 2014
Start of GSOC 2014 work. Task 1: improve GC write barriers. See GH issue #1069
rurban
pushed a commit
that referenced
this issue
May 30, 2014
:manual_wb on VTABLE method calls on SELF which to a WB (avoid duplicates). See new description at #1069
rurban
pushed a commit
that referenced
this issue
May 30, 2014
:no_wb on non-writers, :manual_wb on VTABLE method calls on SELF which to a WB (avoid duplicates). See new description at #1069 Some UNUSED missing. Still the same 2 regressions: t/op/gc.t (Wstat: 11 Tests: 19 Failed: 0) Non-zero wait status: 11 Parse errors: No plan found in TAP output t/pmc/namespace-old.t (Wstat: 1024 Tests: 38 Failed: 4) Failed tests: 27-30 Non-zero exit status: 4
rurban
pushed a commit
that referenced
this issue
Jun 5, 2014
Start of GSOC 2014 work. Task 1: improve GC write barriers. See GH issue #1069
rurban
pushed a commit
that referenced
this issue
Jun 5, 2014
:manual_wb on VTABLE method calls on SELF which to a WB (avoid duplicates). See new description at #1069
rurban
pushed a commit
that referenced
this issue
Jun 5, 2014
:no_wb on non-writers, :manual_wb on VTABLE method calls on SELF which to a WB (avoid duplicates). See new description at #1069 Some UNUSED missing. Still the same 2 regressions: t/op/gc.t (Wstat: 11 Tests: 19 Failed: 0) Non-zero wait status: 11 Parse errors: No plan found in TAP output t/pmc/namespace-old.t (Wstat: 1024 Tests: 38 Failed: 4) Failed tests: 27-30 Non-zero exit status: 4
rurban
pushed a commit
that referenced
this issue
Jun 9, 2014
Start of GSOC 2014 work. Task 1: improve GC write barriers. See GH issue #1069
rurban
pushed a commit
that referenced
this issue
Jun 9, 2014
:manual_wb on VTABLE method calls on SELF which to a WB (avoid duplicates). See new description at #1069
rurban
pushed a commit
that referenced
this issue
Jun 9, 2014
:no_wb on non-writers, :manual_wb on VTABLE method calls on SELF which to a WB (avoid duplicates). See new description at #1069 Some UNUSED missing. Still the same 2 regressions: t/op/gc.t (Wstat: 11 Tests: 19 Failed: 0) Non-zero wait status: 11 Parse errors: No plan found in TAP output t/pmc/namespace-old.t (Wstat: 1024 Tests: 38 Failed: 4) Failed tests: 27-30 Non-zero exit status: 4
Merged with
|
rakudo and nqp tested fine. For nqp I've pushed an optimized version to nqp branch |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
GSOC task 1 for ZYROz (i.e. Chirag):
Starting from branch
rurban/pmc2_orig
which removes the nested pmc calls to add aPARROT_GC_WRITE_BARRIER(interp, _self); before every return from a PMC VTABLE
method call, we want to mark needed or unneeded WB ("write barriers") in each method for SELF.
A PMC write barrier adds the PMC to the root_objects list for mandatory next collecting.
When to WB SELF in pmc methods
src/vtable.tbl
for the:write
annotation.How to annotate WBs for VTABLE methods
mark a method as :manual_wb if you added a WB manually, if in the body after all SELF changes were done, or in an inlined macro or in an included function.
Or if the last method is a vtable method on SELF, which does the WB then. We don't need to WB SELF twice per method call.
mark a method as :no_wb if no WB is needed. See above. Only writers need a WB.
check
src/vtable.tbl
for the:write
annotation.all other methods will get WB added automatically by pmc2c. pmc2c can only do that if there's no or only one return statement. Otherwise you need use a RETURN(decl variable) statement instead as with PCCMETHODs. Note that
return call_function(SELF, ...);
is not allowed. This must be converted to:retdecl ret = call_function(SELF);
RETURN(retdecl ret);
so that pmc2c can add the WB line before the return. SELF is the pmc here that was not created by the method.
e.g. capture.pmc:
CAPTURE_array_CREATE already write barriers SELF.
and pmc2c will not add the WB before the call. Better annotate it with
:manual_wb.
If there's no such comment add the WB before the return,
if the return call does not use self.
Otherwise use an intermediate return value. But in this case it would be easier to manually add the WB. See e.g.
class.pmc
which already added all needed WB manually.manually:
i.e. OrderedHashIterator_shift_string:
=>
The expected performance gain is 2-3%, see https://github.com/parrot/parrot-bench
The text was updated successfully, but these errors were encountered: