1. 13 1月, 2013 1 次提交
  2. 19 12月, 2012 1 次提交
  3. 17 8月, 2012 1 次提交
    • M
      json-parser: don't replicate tokens at each level of recursion · 65c0f1e9
      Michael Roth 提交于
      Currently, when parsing a stream of tokens we make a copy of the token
      list at the beginning of each level of recursion so that we do not
      modify the original list in cases where we need to fall back to an
      earlier state.
      
      In the worst case, we will only read 1 or 2 tokens off the list before
      recursing again, which means an upper bound of roughly N^2 token allocations.
      
      For a "reasonably" sized QMP request (in this a QMP representation of
      cirrus_vga's device state, generated via QIDL, being passed in via
      qom-set), this caused my 16GB's of memory to be exhausted before any
      noticeable progress was made by the parser.
      
      This patch works around the issue by using single copy of the token list
      in the form of an indexable array so that we can save/restore state by
      manipulating indices.
      
      A subsequent commit adds a "large_dict" test case which exhibits the
      same behavior as above. With this patch applied the test case successfully
      completes in under a second.
      
      Tested with valgrind, make check, and QMP.
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Signed-off-by: NMichael Roth <mdroth@linux.vnet.ibm.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      65c0f1e9
  4. 08 6月, 2011 3 次提交
  5. 03 10月, 2010 1 次提交
  6. 14 6月, 2010 1 次提交
  7. 12 6月, 2010 1 次提交
  8. 27 3月, 2010 1 次提交
  9. 07 3月, 2010 1 次提交
  10. 11 2月, 2010 1 次提交
    • R
      json: fix PRId64 on Win32 · 2c0d4b36
      Roy Tam 提交于
      OK we are fooled by the json lexer and parser. As we use %I64d to
      print 'long long' variables in Win32, but lexer and parser only deal
      with %lld but not %I64d, this patch add support for %I64d and solve
      'info pci', 'powser_reset' and 'power_powerdown' assert failure in
      Win32.
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      2c0d4b36
  11. 14 1月, 2010 1 次提交
  12. 17 11月, 2009 1 次提交