Skip to content

Conversation

@JornVernee
Copy link

@JornVernee JornVernee commented Nov 12, 2020

Coleen's comment:

  • Add missing ResourceMark

Vlad's comments:

  • Removing code for vectors from universalNativeInvoker* and universalUpcallHandler*, since it was unused.
  • Remove TypeTuple::make_func, and instead rely on TypeTuple::fields directly
  • Simplify graphKit, and CallNativeNode::match code to not handle multiple returns (unused)
  • Embed native stubs/native invokers inside nmehtod data.
    • Renamed all occurrences to ''native invoker" for consistency.
    • Added a GrowableArrayView::EMPTY singleton value which can be used as a default parameter value for empty arrays.
  • Improve CallNativeNode/GrowableArray print output. Now it's something like:
 4  CallNativeDirect  ===  6  0  8  9  0  10  0  21  0  0  0  0  0  0  0  0  0  0  0  [[ 5  3  14  20 ]] native_call _arg_regs: Growable Array 0x00007fff5c94b648: length 2 (_max 2) { rax, BAD!, }
_ret_regs: Growable Array 0x00007fff5c94b680: length 0 (_max 0) { }
# void ( long, half ) 0x0000000801011000::invoke @ bci:18 0x0000000801013400::invoke @ bci:27 0x0000000801012000::invokeExact_MT @ bci:18 Main::payload @ bci:3 !jvms: 0x0000000801011000::invoke @ bci:18 0x0000000801013400::invoke @ bci:27 0x0000000801012000::invokeExact_MT @ bci:18 Main::payload @ bci:3

(This adds an extension point, namely Print::print_on in print.hpp, which can be used to define printing output for GrowableArray elements).

  • Added printing code for printing native invokers to nmethod.
    • Now we are propagating BufferBlob* instead of address as the type of a native invoker for better debug output. (This could be replaced by a custom CodeBlob type in the future maybe).
  • Misc. smaller cleanups as requested.

@JornVernee
Copy link
Author

I've simplified the printing code. Didn't tackle printing an annotated signature, since that seems like a bit of a rabbit whole. Current format looks like this:

 4  CallNativeDirect  ===  6  0  8  9  0  10  0  21  0  0  0  0  0  0  0  0  0  0  0  [[ 5  3  14  20 ]] native_call _arg_regs: { rax, BAD! } _ret_regs: {  } # void ( long, half ) 0x0000000801011000::invoke @ bci:18 0x0000000801013400::invoke @ bci:27 0x0000000801012000::invokeExact_MT @ bci:18 Main::payload @ bci:3 !jvms: 0x0000000801011000::invoke @ bci:18 0x0000000801013400::invoke @ bci:27 0x0000000801012000::invokeExact_MT @ bci:18 Main::payload @ bci:3

…there are none.

- Use memcpy to copy native stubs to nmethod data
@mcimadamore mcimadamore merged commit 739c792 into mcimadamore:8254231_linker Nov 13, 2020
@JornVernee JornVernee deleted the Vlad_Comments branch December 5, 2022 20:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants