DCmd framework unnecessarily creates a DCmd instance on registration

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P4
    • 21
    • Affects Version/s: 21
    • Component/s: hotspot
    • b15

      The DCmd factory instances are created and registered at VM startup via management_init(). Creation does:

      template <class DCmdClass> class DCmdFactoryImpl : public DCmdFactory {
      public:
        DCmdFactoryImpl(uint32_t flags, bool enabled, bool hidden) :
          DCmdFactory(get_num_arguments<DCmdClass>(), flags, enabled, hidden) { }

      where get_num_arguments() instantiates the given DCmd to dynamically determine the number of arguments (args and options) that it takes. This should be determined statically as the value is statically known.

      Dropping all the unnecessary DCmd creation and cleanup should improve startup.

            Assignee:
            David Holmes
            Reporter:
            David Holmes
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: