-
-
Notifications
You must be signed in to change notification settings - Fork 925
Permalink
Choose a base ref
{{ refName }}
default
Choose a head ref
{{ refName }}
default
Comparing changes
Choose two branches to see what’s changed or to start a new pull request.
If you need to, you can also or
learn more about diff comparisons.
Open a pull request
Create a new pull request by comparing changes across two branches. If you need to, you can also .
Learn more about diff comparisons here.
base repository: jruby/jruby
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 58ee2601b5ac
Could not load branches
Nothing to show
Loading
Could not load tags
Nothing to show
{{ refName }}
default
Loading
...
head repository: jruby/jruby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: cb8f537d74e7
Could not load branches
Nothing to show
Loading
Could not load tags
Nothing to show
{{ refName }}
default
Loading
- 7 commits
- 16 files changed
- 1 contributor
Commits on Jan 12, 2016
-
Configuration menu - View commit details
-
Copy full SHA for 1a64a4d - Browse repository at this point
Copy the full SHA 1a64a4dView commit details -
Add a separate type of JavaMethodDescriptor for compile time.
MethodDescriptor is the common base class and calculates most fields based on overridden functions in the specialized types. ExecutableElementDescriptor is the version used at compile time against the javac model. JavaMethodDescriptor is the version used at runtime against reflected method objects.
Configuration menu - View commit details
-
Copy full SHA for e084dea - Browse repository at this point
Copy the full SHA e084deaView commit details -
Configuration menu - View commit details
-
Copy full SHA for ce8a84f - Browse repository at this point
Copy the full SHA ce8a84fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 58a4688 - Browse repository at this point
Copy the full SHA 58a4688View commit details -
Configuration menu - View commit details
-
Copy full SHA for 63c31bd - Browse repository at this point
Copy the full SHA 63c31bdView commit details -
Configuration menu - View commit details
-
Copy full SHA for 415365d - Browse repository at this point
Copy the full SHA 415365dView commit details -
Add an offline indy-based invoker generator.
HandleMethod has existed for a while, allowing us to have Ruby core methods implemented in Java bound without using bytecode- generated invoker classes. However the cost of building all the method handles necessary makes the indy approach slower than the generated code. Part of this is due to the reflective walking of all classes done at every boot to bind their methods. This commit fixes that by adding a new offline (annotation-processing) code generator that spins a new version of our "populator" classes for indy binding. These classes just contain method construction and binding calls, avoiding reflective class and method walking. They also contain all direct method handles for the core methods as constant pool entries, avoiding the checks required to acquire those at runtime. This was not enough to beat the generated invokers for boot time, because the direct handles still needed to be adapted for different arities, heap framing, and argument casting and reordering. In order to reduce those costs, HandleMethod will now defer that adaptation on a per-arity basis until the adapted handle is actually needed. This reduces boot costs of the handle- based methods to equivalent or less than the generated invokers. Caveats: * This is not yet passing all tests. In particular there's some bit-rotted indy binding code for HandleMethod that appears to need some work. * Boot time was tested with "-e 1" (about the same speed) and "gem list" (a bit faster with handles). Other cases may vary. * For an application that forces many handles to get adapted, this could lead to slower boot time. However, most applications only ever call a fraction of the methods defined in the system. * There appear to be significant memory improvements when running in this mode. Base memory for a "-e sleep" process dropped from 125MB to 95MB and the number of loaded classes dropped from 6600 to around 4400. Heap utilization was slightly lower at 11MB versus 12-15MB. I will push a separate PR that enables fully handle-based mode on a separate branch for experimentation, discussion, and fixes.
Configuration menu - View commit details
-
Copy full SHA for cb8f537 - Browse repository at this point
Copy the full SHA cb8f537View commit details
There are no files selected for viewing