-
-
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: 2538b8ffbfe2^
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: fc4bcb53150d
Could not load branches
Nothing to show
Loading
Could not load tags
Nothing to show
{{ refName }}
default
Loading
- 8 commits
- 17 files changed
- 1 contributor
Commits on Jan 11, 2016
-
Configuration menu - View commit details
-
Copy full SHA for 2538b8f - Browse repository at this point
Copy the full SHA 2538b8fView 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 a0dd89c - Browse repository at this point
Copy the full SHA a0dd89cView commit details
Commits on Jan 12, 2016
-
Configuration menu - View commit details
-
Copy full SHA for 3ffd526 - Browse repository at this point
Copy the full SHA 3ffd526View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8b16a72 - Browse repository at this point
Copy the full SHA 8b16a72View commit details -
Configuration menu - View commit details
-
Copy full SHA for e4ff00b - Browse repository at this point
Copy the full SHA e4ff00bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 00fe248 - Browse repository at this point
Copy the full SHA 00fe248View 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 318136e - Browse repository at this point
Copy the full SHA 318136eView commit details -
Configuration menu - View commit details
-
Copy full SHA for fc4bcb5 - Browse repository at this point
Copy the full SHA fc4bcb5View commit details
There are no files selected for viewing