1. 19 11月, 2013 1 次提交
  2. 14 10月, 2013 1 次提交
  3. 31 8月, 2013 2 次提交
  4. 17 8月, 2013 1 次提交
  5. 10 7月, 2013 1 次提交
  6. 04 7月, 2013 1 次提交
  7. 22 5月, 2013 1 次提交
  8. 14 5月, 2013 1 次提交
    • A
      qom: aggressively optimize qom casting · 03587328
      Anthony Liguori 提交于
      This patch adds a small typename cache to ObjectClass.  This allows
      caching positive casts within each ObjectClass.  Benchmarking a
      PPC workload provided by Aurelien, this patch eliminates every
      single g_hash_table_lookup() happening during the benchmark (which
      was about 2 million per-second).
      
      With this patch applied, I get exactly the same performance (within
      the margin of error) as with --disable-qom-cast-debug.
      
      N.B. it's safe to cache typenames only from the _assert() macros
      because they are always called with string literals.
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      03587328
  9. 13 5月, 2013 5 次提交
  10. 30 4月, 2013 2 次提交
  11. 17 4月, 2013 1 次提交
  12. 27 3月, 2013 1 次提交
  13. 26 3月, 2013 1 次提交
  14. 22 2月, 2013 2 次提交
    • P
      qom/object.c: Allow itf cast with num_itfs = 0 · 00e2ceae
      Peter Crosthwaite 提交于
      num_interfaces only tells you how many interfaces the concrete child class has
      (as defined in the TypeInfo). This means if you have a child class which defines
      no interfaces of its own, but its parent has interfaces you cannot cast to those
      parent interfaces.
      
      Fixed changing the guard to check the class->interfaces list instead (which is
      a complete flattened list of implemented interfaces).
      Signed-off-by: NPeter Crosthwaite <peter.crosthwaite@xilinx.com>
      Message-id: a8c2db3b9b1f3c4bb81aca352b69e33260f36545.1361246206.git.peter.crosthwaite@xilinx.com
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      00e2ceae
    • P
      qom/object.c: Reset interface list on inheritance · 3e407de4
      Peter Crosthwaite 提交于
      The QOM framework will attempt the recreate a classes interface list from
      scratch for each class. This means that a child class should zero out the
      list of interfaces when cloned from the parent class.
      
      Currently the list is memcpy()d from the parent to the child. As the interface
      list is just a pointer to a list, this means the parent and child will share
      the same list of interfaces. When the child inits, it will append its own
      interfaces to the parents list. This is incorrect as the parent should not pick
      up its childs interfaces.
      
      This actually causes an infinite loop at class init time, as the child will
      iterate through the parent interface list adding each itf to its own list(in
      type_initialize()). As the list is (erroneously) shared, the new interface
      instances for the child are appended to the parent, and the iterator never hits
      the tail and loops forever.
      Signed-off-by: NPeter Crosthwaite <peter.crosthwaite@xilinx.com>
      Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com>
      Message-id: 1f58d2b629d82865dbb2fd5ba8445854049c4382.1361246206.git.peter.crosthwaite@xilinx.com
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      3e407de4
  15. 02 2月, 2013 2 次提交
  16. 28 1月, 2013 1 次提交
  17. 15 1月, 2013 1 次提交
  18. 19 12月, 2012 3 次提交
  19. 27 11月, 2012 4 次提交
  20. 26 11月, 2012 1 次提交
  21. 16 11月, 2012 1 次提交
  22. 24 8月, 2012 1 次提交
    • P
      qom: object_delete should unparent the object first · da5a44e8
      Paolo Bonzini 提交于
      object_deinit is only called when the reference count goes to zero,
      and yet tries to do an object_unparent.  Now, object_unparent
      either does nothing or it will decrease the reference count.
      Because we know the reference count is zero, the object_unparent
      call in object_deinit is useless.
      
      Instead, we need to disconnect the object from its parent just
      before we remove the last reference apart from the parent's.  This
      happens in object_delete.  Once we do this, all calls to
      object_unparent peppered through QEMU can go away.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      da5a44e8
  23. 13 8月, 2012 1 次提交
    • A
      qom: Reimplement Interfaces · 33e95c63
      Anthony Liguori 提交于
      The current implementation of Interfaces is poorly designed.  Each interface
      that an object implements ends up being an object that's tracked by the
      implementing object.  There's all sorts of gymnastics to deal with casting
      between these objects.
      
      But an interface shouldn't be associated with an Object.  Interfaces are global
      to a class.  This patch moves all Interface knowledge to ObjectClass eliminating
      the relationship between Object and Interfaces.
      
      Interfaces are now abstract (as they should be) but this is okay.  Interfaces
      essentially act as additional parents for the classes and are treated as such.
      
      With this new implementation, we should fully support derived interfaces
      including reimplementing an inherited interface.
      
      PC: Rebased against qom-next merge Jun-2012.
      
      PC: Removed replication of cast logic for interfaces, i.e. there is only
      one cast function - object_dynamic_cast() (and object_dynamic_cast_assert())
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      Signed-off-by: NPeter A. G. Crosthwaite <peter.crosthwaite@petalogix.com>
      Acked-by: NPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: NEdgar E. Iglesias <edgar.iglesias@gmail.com>
      33e95c63
  24. 18 6月, 2012 4 次提交