StateMachine.py (9630:a3525ee464b8) StateMachine.py (9692:67d9da312ef0)
1# Copyright (c) 1999-2008 Mark D. Hill and David A. Wood
2# Copyright (c) 2009 The Hewlett-Packard Development Company
3# All rights reserved.
4#
5# Redistribution and use in source and binary forms, with or without
6# modification, are permitted provided that the following conditions are
7# met: redistributions of source code must retain the above copyright
8# notice, this list of conditions and the following disclaimer;

--- 754 unchanged lines hidden (view full) ---

763$c_ident::printStats(ostream& out) const
764{
765''')
766 #
767 # Cache and Memory Controllers have specific profilers associated with
768 # them. Print out these stats before dumping state transition stats.
769 #
770 for param in self.config_parameters:
1# Copyright (c) 1999-2008 Mark D. Hill and David A. Wood
2# Copyright (c) 2009 The Hewlett-Packard Development Company
3# All rights reserved.
4#
5# Redistribution and use in source and binary forms, with or without
6# modification, are permitted provided that the following conditions are
7# met: redistributions of source code must retain the above copyright
8# notice, this list of conditions and the following disclaimer;

--- 754 unchanged lines hidden (view full) ---

763$c_ident::printStats(ostream& out) const
764{
765''')
766 #
767 # Cache and Memory Controllers have specific profilers associated with
768 # them. Print out these stats before dumping state transition stats.
769 #
770 for param in self.config_parameters:
771 if param.type_ast.type.ident == "CacheMemory" or \
772 param.type_ast.type.ident == "DirectoryMemory" or \
771 if param.type_ast.type.ident == "DirectoryMemory" or \
773 param.type_ast.type.ident == "MemoryControl":
774 assert(param.pointer)
775 code(' m_${{param.ident}}_ptr->printStats(out);')
776
777 code('''
778 if (m_version == 0) {
779 s_profileDumper.dumpStats(out);
780 }
781}
782
783void $c_ident::clearStats() {
784''')
785 #
786 # Cache and Memory Controllers have specific profilers associated with
787 # them. These stats must be cleared too.
788 #
789 for param in self.config_parameters:
772 param.type_ast.type.ident == "MemoryControl":
773 assert(param.pointer)
774 code(' m_${{param.ident}}_ptr->printStats(out);')
775
776 code('''
777 if (m_version == 0) {
778 s_profileDumper.dumpStats(out);
779 }
780}
781
782void $c_ident::clearStats() {
783''')
784 #
785 # Cache and Memory Controllers have specific profilers associated with
786 # them. These stats must be cleared too.
787 #
788 for param in self.config_parameters:
790 if param.type_ast.type.ident == "CacheMemory" or \
791 param.type_ast.type.ident == "MemoryControl":
789 if param.type_ast.type.ident == "MemoryControl":
792 assert(param.pointer)
793 code(' m_${{param.ident}}_ptr->clearStats();')
794
795 code('''
796 m_profiler.clearStats();
797 AbstractController::clearStats();
798}
799''')

--- 903 unchanged lines hidden ---
790 assert(param.pointer)
791 code(' m_${{param.ident}}_ptr->clearStats();')
792
793 code('''
794 m_profiler.clearStats();
795 AbstractController::clearStats();
796}
797''')

--- 903 unchanged lines hidden ---