Mercurial > hg > graal-compiler
diff src/share/vm/services/nmtDCmd.hpp @ 20360:833b0f92429a
8046598: Scalable Native memory tracking development
Summary: Enhance scalability of native memory tracking
Reviewed-by: coleenp, ctornqvi, gtriantafill
author | zgu |
---|---|
date | Wed, 27 Aug 2014 08:19:12 -0400 |
parents | 31a4e55f8c9d |
children |
line wrap: on
line diff
--- a/src/share/vm/services/nmtDCmd.hpp Wed Aug 27 09:36:55 2014 +0200 +++ b/src/share/vm/services/nmtDCmd.hpp Wed Aug 27 08:19:12 2014 -0400 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,8 +25,12 @@ #ifndef SHARE_VM_SERVICES_NMT_DCMD_HPP #define SHARE_VM_SERVICES_NMT_DCMD_HPP +#if INCLUDE_NMT + #include "services/diagnosticArgument.hpp" #include "services/diagnosticFramework.hpp" +#include "services/memBaseline.hpp" +#include "services/mallocTracker.hpp" /** * Native memory tracking DCmd implementation @@ -39,10 +43,7 @@ DCmdArgument<bool> _summary_diff; DCmdArgument<bool> _detail_diff; DCmdArgument<bool> _shutdown; - DCmdArgument<bool> _auto_shutdown; -#ifndef PRODUCT - DCmdArgument<bool> _debug; -#endif + DCmdArgument<bool> _statistics; DCmdArgument<char*> _scale; public: @@ -61,6 +62,17 @@ } static int num_arguments(); virtual void execute(DCmdSource source, TRAPS); + + private: + void report(bool summaryOnly, size_t scale); + void report_diff(bool summaryOnly, size_t scale); + + size_t get_scale(const char* scale) const; + + // check if NMT running at detail tracking level + bool check_detail_tracking_level(outputStream* out); }; +#endif // INCLUDE_NMT + #endif // SHARE_VM_SERVICES_NMT_DCMD_HPP