// Get the size of the arguments for a native call. inline size_t GetNativeOutArgsSize(size_t num_args, size_t num_long_or_double_args) {
size_t num_arg_words = num_args + num_long_or_double_args; return num_arg_words * static_cast<size_t>(kX86PointerSize);
}
// Get stack args size for @CriticalNative method calls. inline size_t GetCriticalNativeCallArgsSize(std::string_view shorty) {
size_t num_long_or_double_args =
std::count_if(shorty.begin() + 1, shorty.end(), [](char c) { return c == 'J' || c == 'D'; });
// Get the frame size for @CriticalNative method stub. // This must match the size of the frame emitted by the JNI compiler at the native call site. inline size_t GetCriticalNativeStubFrameSize(std::string_view shorty) { // The size of outgoing arguments.
size_t size = GetCriticalNativeCallArgsSize(shorty);
// We can make a tail call if there are no stack args and the return type is not // FP type (needs moving from ST0 to MMX0) and we do not need to extend the result. bool return_type_ok = shorty[0] == 'I' || shorty[0] == 'J' || shorty[0] == 'V'; if (return_type_ok && size == 0u) { return0u;
}
// Get the frame size for direct call to a @CriticalNative method. // This must match the size of the extra frame emitted by the compiler at the native call site. inline size_t GetCriticalNativeDirectCallFrameSize(std::string_view shorty) { // The size of outgoing arguments.
size_t size = GetCriticalNativeCallArgsSize(shorty);
// No return PC to save, zero- and sign-extension and FP value moves are handled by the caller. return RoundUp(size, kNativeStackAlignment);
}
} // namespace x86
} // namespace art
#endif// ART_RUNTIME_ARCH_X86_JNI_FRAME_X86_H_
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.17 Sekunden
(vorverarbeitet am 2026-06-29)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.