No big deal, but we decided a while ago that if you have accessors, it
should be:


    int _foo;

    int foo() const { return _foo; }
    void foo(int val) { _foo = val; }

instead of:

    int foo;

    int getFoo() const { return foo; }
    void setFoo(int val) { foo = val; }

On Mon, Jul 20, 2009 at 12:48 AM, Gabe Black<[email protected]> wrote:
> changeset a71fd8e252b7 in /z/repo/m5
> details: http://repo.m5sim.org/m5?cmd=changeset;node=a71fd8e252b7
> description:
>        Tracing: Add accessors so tracers can get at data in trace records.
>
> diffstat:
>
> 1 file changed, 22 insertions(+)
> src/sim/insttracer.hh |   22 ++++++++++++++++++++++
>
> diffs (32 lines):
>
> diff -r a17979b4e1ea -r a71fd8e252b7 src/sim/insttracer.hh
> --- a/src/sim/insttracer.hh     Sun Jul 19 23:51:47 2009 -0700
> +++ b/src/sim/insttracer.hh     Sun Jul 19 23:54:31 2009 -0700
> @@ -129,6 +129,28 @@
>     { cp_seq = seq; cp_seq_valid = true; }
>
>     virtual void dump() = 0;
> +
> +  public:
> +    Tick getWhen() { return when; }
> +    ThreadContext *getThread() { return thread; }
> +    StaticInstPtr getStaticInst() { return staticInst; }
> +    Addr getPC() { return PC; }
> +    StaticInstPtr getMacroStaticInst() { return macroStaticInst; }
> +    MicroPC getUPC() { return upc; }
> +    bool getMisspeculating() { return misspeculating; }
> +
> +    Addr getAddr() { return addr; }
> +    bool getAddrValid() { return addr_valid; }
> +
> +    uint64_t getIntData() { return data.as_int; }
> +    double getFloatData() { return data.as_double; }
> +    int getDataStatus() { return data_status; }
> +
> +    InstSeqNum getFetchSeq() { return fetch_seq; }
> +    bool getFetchSeqValid() { return fetch_seq_valid; }
> +
> +    InstSeqNum getCpSeq() { return cp_seq; }
> +    bool getCpSeqValid() { return cp_seq_valid; }
>  };
>
>  class InstTracer : public SimObject
> _______________________________________________
> m5-dev mailing list
> [email protected]
> http://m5sim.org/mailman/listinfo/m5-dev
>
>
_______________________________________________
m5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/m5-dev

Reply via email to