What I mean is, I do a "make hotspot", and the resulting change doesn't seem to be recognized when I run the code--doing a "java -XX:+PrintTedMessage -version" yields the "Unrecognized flag" error. (I added a simple fprintf() to part of the JVM startup code to print out the message, just to prove the flag was recognized and parsed.) Does that make more sense? I'm not trying to use the new VM as part of the build process--just add a flag to a VM that I can trigger when I run "java -version".
I would've thought that "make hotspot" would compile the flag into the libjvm.so, and then drop the newly-built libjvm into the image directory, so that I wouldn't have to do a full build. Presumably, then, "make images" checks dependencies and doesn't build stuff that isn't affected by the change? (Otherwise, that would seem like a TON of build time for a fairly minimal change.) Ted Neward Author, Speaker, Mentor http://www.newardassociates.com t: @tedneward | m: (425) 647-4526 On 12/21/17, 4:20 AM, "David Holmes" <david.hol...@oracle.com> wrote: On 21/12/2017 8:15 PM, Erik Joelsson wrote: > Adding hotspot-dev. > > /Erik > > > On 2017-12-21 10:43, Ted Neward wrote: >> What’s the steps necessary to add a new -XX flag? I’d assumed >> (naively) that all that was required was to add it to the list of >> macro’ed flags in hotspot/share/runtime/globals.hpp, but my new flag Yes that should suffice. >> (“PrintTedMessage”) isn’t recognized when I “make hotspot”; it gets >> kicked back out with the “Unrecognized flag; did you mean…?” error. Why would "make hotspot" be using your new flag? Are you trying to apply your flag to the newly built VM during the build process? I'm not even sure if "make hotspot" would use the new VM. I always do a full build: make images David >> >> >> Is there something I’m missing? Does the flag need to be registered >> someplace else as well? >> >> >> Ted Neward >> >> Author, Speaker, Mentor >> >> http://www.newardassociates.com >> >> t: @tedneward | m: (425) 647-4526 >> >