Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8311570

Large pass-by-value arguments

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • 22
    • hotspot
    • gc

      CodeQL (https://github.com/github/codeql-action) reported a number of functions that take large (64+ bytes) pass-by-value arguments. Passing them by reference could reduce the cost of calling these functions.

      vframeStreamCommon::vframeStreamCommon(RegisterMap reg_map)
      > RegisterMap is 4728 bytes

      ZGenerationYoung::select_tenuring_threshold(ZRelocationSetSelectorStats stats, bool promote_all)
      ZGenerationYoung::select_tenuring_threshold(ZRelocationSetSelectorStats stats, bool promote_all)
      > ZRelocationSetSelectorStats is 2312 bytes

      static double gc_time(ZDirectorGenerationStats generation_stats)
      > ZDirectorGenerationStats is 192 bytes

      MacroAssembler::movptr(ArrayAddress dst, Register src, Register rscratch)
      MacroAssembler::movptr(Register dst, ArrayAddress src)
      MacroAssembler::incrementl(ArrayAddress dst, Register rscratch)
      Address Address::make_array(ArrayAddress adr)
      > ArrayAddress is 120 bytes

      TableStatistics::TableStatistics(NumberSeq summary, size_t literal_bytes, size_t bucket_bytes, size_t node_bytes)
      TableStatistics::TableStatistics(TableRateStatistics& rate_stats, NumberSeq summary, size_t literal_bytes, size_t bucket_bytes, size_t node_bytes)
      > NumberSeq is 72 bytes

      template <typename VALUE_SIZE_FUNC> TableStatistics statistics_get(Thread* thread, VALUE_SIZE_FUNC& vs_f, TableStatistics old)
      template<typename EVENT> static void emit_table_statistics(TableStatistics statistics)
      > TableStatistics is 96 bytes

            Unassigned Unassigned
            djelinski Daniel Jelinski
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: