diff options
author | Dam Sunwoo <dam.sunwoo@arm.com> | 2012-11-02 11:32:01 -0500 |
---|---|---|
committer | Dam Sunwoo <dam.sunwoo@arm.com> | 2012-11-02 11:32:01 -0500 |
commit | 81406018b0688e956452cd3e00c1ab9aeb9af764 (patch) | |
tree | a25309e3a443f1c41a33585c3e7d1a55c2213c49 /src/mem | |
parent | 322daba74c122c4ba8c89b73ca8107be02990e5c (diff) | |
download | gem5-81406018b0688e956452cd3e00c1ab9aeb9af764.tar.xz |
ARM: dump stats and process info on context switches
This patch enables dumping statistics and Linux process information on
context switch boundaries (__switch_to() calls) that are used for
Streamline integration (a graphical statistics viewer from ARM).
Diffstat (limited to 'src/mem')
-rw-r--r-- | src/mem/request.hh | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/src/mem/request.hh b/src/mem/request.hh index f6406e2c5..11f1c74b3 100644 --- a/src/mem/request.hh +++ b/src/mem/request.hh @@ -1,4 +1,16 @@ /* + * Copyright (c) 2012 ARM Limited + * All rights reserved + * + * The license below extends only to copyright in the software and shall + * not be construed as granting a license to any other intellectual + * property including but not limited to intellectual property relating + * to a hardware implementation of the functionality of the software + * licensed hereunder. You may use the software subject to the license + * terms below provided that you ensure that this notice is replicated + * unmodified and in its entirety in all distributions of the software, + * modified or unmodified, in source code or in binary form. + * * Copyright (c) 2002-2005 The Regents of The University of Michigan * All rights reserved. * @@ -47,6 +59,24 @@ #include "base/types.hh" #include "sim/core.hh" +/** + * Special TaskIds that are used for per-context-switch stats dumps + * and Cache Occupancy. Having too many tasks seems to be a problem + * with vector stats. 1024 seems to be a reasonable number that + * doesn't cause a problem with stats and is large enough to realistic + * benchmarks (Linux/Android boot, BBench, etc.) + */ + +namespace ContextSwitchTaskId { + enum TaskId { + MaxNormalTaskId = 1021, /* Maximum number of normal tasks */ + Prefetcher = 1022, /* For cache lines brought in by prefetcher */ + DMA = 1023, /* Mostly Table Walker */ + Unknown = 1024, + NumTaskId + }; +} + class Request; typedef Request* RequestPtr; @@ -117,6 +147,10 @@ class Request static const MasterID invldMasterId = USHRT_MAX; /** @} */ + /** Invalid or unknown Pid. Possible when operating system is not present + * or has not assigned a pid yet */ + static const uint32_t invldPid = UINT_MAX; + private: typedef uint8_t PrivateFlagsType; typedef ::Flags<PrivateFlagsType> PrivateFlags; |