RFR: 8351661: NMT: VMATree should support separate call-stacks for reserve and commit operations [v8]

Gerard Ziemski gziemski at openjdk.org
Mon Apr 7 20:32:12 UTC 2025


On Mon, 7 Apr 2025 12:37:30 GMT, Afshin Zafari <azafari at openjdk.org> wrote:

>> In NMT detail mode, we need to have separate call-stacks for Reserve and Commit operations.
>> This PR adds a second stack to every node that will be used when committing (and uncommitting) the start node of a reserved region.
>
> Afshin Zafari has updated the pull request incrementally with one additional commit since the last revision:
> 
>   fixes. New check_tree impl and visualization.

test/hotspot/gtest/nmt/test_vmatree.cpp line 1005:

> 1003:                            {-1    , -1    , si_2  , -1    , si_2  , -1    , -1    }};
> 1004:     check_tree(tree, et2, __LINE__);
> 1005:   }

If I add this operation here, instead of an expected NOP, I get `SIGSEGV`:


    tree.uncommit_mapping(20, 30, call_stack_2);
    // Pre:  .........0-----5*****10----------------30********40-------100.........
    // Post: .........0-----5*****10-----------------------------------100.........
    //        mtNone    mtTest   mtTest    mtTest    mtTest    mtTest    mtNone
    //        Rl        Rs       C         Rs        C         Rs        Rl
    //        -         si_1     si_1      si_1      si_1      si_1      -
    //        -         -        si_2      -         si_2      -         -
    ExpectedTree<6> et3 = {{     0,     5,      10,    100        },
                           {mtNone, mtTest, mtTest, mtTest, mtNone},
                           {Rl    , Rs    , C     , Rs    , Rl    },
                           {-1    , si_1  , si_1  , si_1  , -1    },
                           {-1    , -1    , si_2  , -1    , -1    }};
    check_tree(tree, et3, __LINE__);




signaled: SIGSEGV
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x000000010548f42c, pid=7015, tid=259
#
# JRE version: OpenJDK Runtime Environment (25.0) (build 25-internal-adhoc.gerard.jdk)
# Java VM: OpenJDK 64-Bit Server VM (25-internal-adhoc.gerard.jdk, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, bsd-aarch64)
# Problematic frame:
# V  [libjvm.dylib+0x2ab42c]  void check_tree<6>(VMATree&, ExpectedTree<6> const&, int)+0x558

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/24028#discussion_r2031963006


More information about the hotspot-runtime-dev mailing list