-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviews.m5sim.org/r/27/#review53
-----------------------------------------------------------



src/python/m5/SimObject.py
<http://reviews.m5sim.org/r/27/#comment180>

    I wonder if Children doesn't quite describe it right since children doesn't 
obviously imply recursion.  iterDescendants?  (I don't have strong feelings 
here.)



src/python/m5/SimObject.py
<http://reviews.m5sim.org/r/27/#comment181>

    Not sure if it is worth it, but we could add the following to 
__getattr__(self, attr):
    
    try:
        return getattr(self._ccObject, attr)
    except AttributeError:
        pass
    
    There are two failures, _ccObject doesn't exist yet, and attr is not found. 
 I think both are handled by AttributeError.  Anyway it's just an idea since 
the code looks repetitive.  Could also do:
    if attr in ('init', 'regStats' .....):
       return getattr(self._ccObject, attr)
    
    Just less code and I know that you like less code :)



src/python/m5/stats.py
<http://reviews.m5sim.org/r/27/#comment183>

    Not sure if it matters at all, but you've changed the order of reset.  
Currently, we reset stats and then reset objects.  I hope that nothing depends 
on this order, but I thought I'd mention it.



src/sim/sim_object.cc
<http://reviews.m5sim.org/r/27/#comment182>

    I don't care much, but do we want to create these as DPRINTFs in the Python 
code?  Could help in stats debugging.


- Nathan


On 2010-06-27 23:41:59, Steve Reinhardt wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviews.m5sim.org/r/27/
> -----------------------------------------------------------
> 
> (Updated 2010-06-27 23:41:59)
> 
> 
> Review request for Default.
> 
> 
> Summary
> -------
> 
> sim: move iterating over SimObjects into Python.
> 
> 
> Diffs
> -----
> 
>   src/python/m5/SimObject.py 5044bb906d5a 
>   src/python/m5/core.py 5044bb906d5a 
>   src/python/m5/simulate.py 5044bb906d5a 
>   src/python/m5/stats.py 5044bb906d5a 
>   src/python/swig/core.i 5044bb906d5a 
>   src/python/swig/pyobject.hh 5044bb906d5a 
>   src/python/swig/sim_object.i 5044bb906d5a 
>   src/sim/sim_object.hh 5044bb906d5a 
>   src/sim/sim_object.cc 5044bb906d5a 
> 
> Diff: http://reviews.m5sim.org/r/27/diff
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Steve
> 
>

_______________________________________________
m5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/m5-dev

Reply via email to