1. 27 3月, 2012 1 次提交
  2. 24 3月, 2012 2 次提交
    • M
      Support utf8 chars in pod docs · 3179d694
      Michael Tokarev 提交于
      We've at least one UTF8 char in the qemu texi doc:
      
       $ grep Tibor qemu-doc.texi
       by Tibor "TS" Schütz.
       $ man ./qemu.1 | grep Tibor
              by Tibor "TS" SchA~Xtz.
      
      This patch allows utf8 in man/pod docs.
      
      Initially it was split into two parts and sent on 2012-02-02.
      Resending it again (3rd time) now in merged form.  If any
      other generalizations of $(POD2MAN) are needed it can be done
      in a separate patch.  Current form of $(POD2MAN) is choosen
      to be able to easily change it if some implementation does
      not support utf8 or resulting output has issues with local
      man(1) program/macros.
      
      First, add @documentencoding in scripts/texi2pod.pl:
      
      Currently our texi2pod ignores @documentencoding even if it is set
      properly in *.texi files.  This results in a mojibake in documents
      generated from qemu.pod (which is generated from qemu-doc.texi by
      texi2pod), because the rest of the tools assumes ASCII encoding.
      
      This patch recognizes first @documentencoding in input and places
      it at the beginning of output as =encoding directive.
      
      Second, run pod2man with --utf8 option to enable utf8 in manpages:
      
      This option makes no difference for manpages which contains only
      ascii chars.  But for manpages with actual UTF8 characters (qemu
      docs contains these), this change allows to see real characters
      instead of mojibakes or substitutes.
      Signed-off-By: NMichael Tokarev <mjt@tls.msk.ru>
      Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
      3179d694
    • A
      scripts: add gdb support script · 4daa187d
      Avi Kivity 提交于
      Add a script that enhances gdb to be aware of QEMU data structures.
      
      This patch adds a single gdb command, 'qemu mtree'.  The command is
      similar to the monitor's 'info mtree', except that it prints MemoryRegion
      addresses, and except for working from a core dump as well as a live instance.
      Signed-off-by: NAvi Kivity <avi@redhat.com>
      Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
      4daa187d
  3. 12 3月, 2012 3 次提交
  4. 18 1月, 2012 1 次提交
  5. 13 1月, 2012 1 次提交
    • A
      Fix qapi code generation fix · 19bf7c87
      Avi Kivity 提交于
      The fixes to qapi code generation had multiple bugs:
      - the Null class used to drop output was missing some methods
      - in some scripts it was never instantiated, leading to a None return,
        which is missing even more methods
      - the --source and --header options were swapped
      
      Luckily, all those bugs were hidden by a makefile bug which caused the
      old behaviour (with the race) to be invoked.
      Signed-off-by: NAvi Kivity <avi@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      19bf7c87
  6. 27 12月, 2011 1 次提交
    • A
      Fix qapi code generation wrt parallel build · 8d3bc517
      Avi Kivity 提交于
      Make's multiple output syntax
      
        x.c x.h: x.template
             gen < x.template
      
      actually invokes the command once for x.c and once for x.h (with differing $@
      in each invocation).  During a parallel build, the two commands may be invoked
      in parallel; this opens up a race, where the second invocation trashes a file
      supposedly produced during the first, and now in use by a dependent command.
      
      The various qapi code generators are susceptible to this; fix by making them
      generate just one file per invocation.
      Signed-off-by: NAvi Kivity <avi@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      8d3bc517
  7. 21 12月, 2011 1 次提交
  8. 20 12月, 2011 1 次提交
  9. 15 12月, 2011 1 次提交
  10. 14 12月, 2011 1 次提交
  11. 02 12月, 2011 1 次提交
  12. 30 11月, 2011 1 次提交
  13. 26 11月, 2011 1 次提交
  14. 02 11月, 2011 1 次提交
  15. 30 10月, 2011 1 次提交
  16. 27 10月, 2011 1 次提交
    • L
      qapi-commands.py: Don't call the output marshal on error · 694a099a
      Luiz Capitulino 提交于
      Today we generate something like this:
      
          int qmp_marshal_input_query_foo(...)
      
              ...
      
              retval = qmp_query_foo(errp);
              qmp_marshal_output_query_foo(retval, ret, errp);
      
              ...
      
      However, if qmp_query_foo() fails 'retval' will probably be NULL,
      which can cause a segfault as not all visitors check if 'retval'
      is valid.
      
      This commit fixes that by changing the code generator to only
      call the output marshal if qmp_query_foo() succeeds, like this:
      
          retval = qmp_query_foo(errp);
          if (!error_is_set(errp)) {
              qmp_marshal_output_query_foo(retval, ret, errp);
          }
      Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
      694a099a
  17. 25 10月, 2011 2 次提交
  18. 15 10月, 2011 1 次提交
    • H
      scripts: Simpletrace log analysis script for pretty-printing 9p log. · 49a88ce3
      Harsh Prateek Bora 提交于
      This python script allows to pretty print 9p simpletrace logs and can be
      further enhanced to filter 9p logs based on command line arguments.
      
      Sample output:
       TGETATTR (tag = 1 , fid = 0 , request_mask = 0x7ff )
       RGETATTR (tag = 1 , result_mask = 0x7ff , mode = 040777 , uid = 500 , gid = 500 )
       TXATTRWALK (tag = 1 , fid = 0 , newfid = 1 , xattr name = 36832096 )
       RXATTRWALK (tag = 1 , xattrsize  = 18446744073709551555 )
       TXATTRWALK (tag = 1 , fid = 0 , newfid = 1 , xattr name = 36744768 )
       RXATTRWALK (tag = 1 , xattrsize  = 18446744073709551555 )
       TGETATTR (tag = 1 , fid = 1 , request_mask = 0x3fff )
       RGETATTR (tag = 1 , result_mask = 0x17ff , mode = 040777 , uid = 500 , gid = 500 )
       TWALK (tag = 1 , fid = 1 , newfid = 2 , nwnames = 1 )
       RWALK (tag = 1 , nwnames = 1 , qids = 0x230aea0 )
      Signed-off-by: NHarsh Prateek Bora <harsh@linux.vnet.ibm.com>
      Signed-off-by: NAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
      49a88ce3
  19. 04 10月, 2011 6 次提交
  20. 17 9月, 2011 1 次提交
    • S
      trace: allow PRI*64 at beginning and ending of format string · 913540a3
      Stefan Hajnoczi 提交于
      The tracetool parser only picks up PRI*64 and other format string macros
      when enclosed between double quoted strings.  Lift this restriction by
      extracting everything after the closing ')' as the format string:
      
        cpu_set_apic_base(uint64_t val) "%016"PRIx64
                                        ^^        ^^
      
      One trick here: it turns out that backslashes in the format string like
      "\n" were being interpreted by echo(1).  Fix this by using the POSIX
      printf(1) command instead.  Although it normally does not make sense to
      include backslashes in trace event format strings, an injected newline
      causes tracetool to emit a broken header file and I want to eliminate
      cases where broken output is emitted, even if the input was bad.
      Signed-off-by: NStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
      Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
      913540a3
  21. 01 9月, 2011 6 次提交
  22. 27 8月, 2011 1 次提交
  23. 12 8月, 2011 1 次提交
  24. 22 7月, 2011 3 次提交
    • M
      qapi: add qapi-commands.py code generator · c17d9908
      Michael Roth 提交于
      This is the code generator for qapi command marshaling/dispatch.
      Currently only generators for synchronous qapi/qmp functions are
      supported. This script generates the following files:
      
        $(prefix)qmp-marshal.c: command marshal/dispatch functions for each
                                QMP command defined in the schema. Functions
                                generated by qapi-visit.py are used to
                                convert qobjects recieved from the wire into
                                function parameters, and uses the same
                                visiter functions to convert native C return
                                values to qobjects from transmission back
                                over the wire.
      
        $(prefix)qmp-commands.h: Function prototypes for the QMP commands
                                 specified in the schema.
      
      $(prefix) is used in the same manner as with qapi-types.py
      Signed-off-by: NMichael Roth <mdroth@linux.vnet.ibm.com>
      Signed-off-by: NLuiz Capitulino <lcapitulino@gmail.com>
      c17d9908
    • M
      qapi: add qapi-visit.py code generator · 06d64c62
      Michael Roth 提交于
      This is the code generator for qapi visiter functions used to
      marshal/unmarshal/dealloc qapi types. It generates the following 2
      files:
      
        $(prefix)qapi-visit.c: visiter function for a particular c type, used
                               to automagically convert qobjects into the
                               corresponding C type and vice-versa, and well
                               as for deallocation memory for an existing C
                               type
      
        $(prefix)qapi-visit.h: declarations for previously mentioned visiter
                               functions
      
      $(prefix) is used as decribed for qapi-types.py
      Signed-off-by: NMichael Roth <mdroth@linux.vnet.ibm.com>
      Signed-off-by: NLuiz Capitulino <lcapitulino@gmail.com>
      06d64c62
    • M
      qapi: add qapi-types.py code generator · fb3182ce
      Michael Roth 提交于
      This is the code generator for qapi types. It will generation the
      following files:
      
        $(prefix)qapi-types.h - C types corresponding to types defined in
                                the schema you pass in
        $(prefix)qapi-types.c - Cleanup functions for the above C types
      
      The $(prefix) is used to as a namespace to keep the generated code from
      one schema/code-generation separated from others so code and be
      generated from multiple schemas with clobbering previously created code.
      Signed-off-by: NMichael Roth <mdroth@linux.vnet.ibm.com>
      Signed-off-by: NLuiz Capitulino <lcapitulino@gmail.com>
      fb3182ce