1. 14 7月, 2017 4 次提交
  2. 05 7月, 2017 1 次提交
  3. 04 7月, 2017 5 次提交
  4. 01 7月, 2017 2 次提交
  5. 28 6月, 2017 1 次提交
  6. 27 6月, 2017 1 次提交
  7. 20 6月, 2017 2 次提交
  8. 15 6月, 2017 5 次提交
  9. 06 6月, 2017 2 次提交
    • E
      tb-hash: improve tb_jmp_cache hash function in user mode · 6f165318
      Emilio G. Cota 提交于
      Optimizations to cross-page chaining and indirect branches make
      performance more sensitive to the hit rate of tb_jmp_cache.
      The constraint of reserving some bits for the page number
      lowers the achievable quality of the hashing function.
      
      However, user-mode does not have this requirement. Thus,
      with this change we use for user-mode a hashing function that
      is both faster and of better quality than the previous one.
      
      Measurements:
      
      Note: baseline (i.e. speedup == 1x) is QEMU v2.9.0.
      
      -                           SPECint06 (test set), x86_64-linux-user. Host: Intel i7-6700K @ 4.00GHz
      
       2.2x +-+--------------------------------------------------------------------------------------------------------------+-+
            |                                                                                                                  |
            |         jr                                                                                                       |
         2x +jr+multhash        +....................................................+++++...................................+-+
            |    jr+hash                                                              |$$$                                     |
            |                                                                         |$+$                                     |
            |                                                                        ### $                                     |
       1.8x +-+......................................................................#|#.$...................................+-+
            |                                                                      ++#+# $                                     |
            |                                                                       |# # $                                     |
       1.6x +-+....................................................................***.#.$....................++$$$..........+-+
            |                                         $$$                          *+* # $                     |$+$            |
            |                       ++$$$           ### $                          * * # $                  +++|$ $            |
            |                     ++###+$           # # $                          * * # $           ###   ****## $            |
       1.4x +-+...................***+#.$.........***.#.$..........................*.*.#.$...........#+#$$.*++*|#.$..........+-+
            |                     *+* # $         * * # $                          * * # $           # # $ *  *+# $            |
            |                     * * # $   +++++ * * # $                          * * # $         *** # $ *  * # $   ###$$    |
       1.2x +-+...................*.*.#.$.***##$$.*.*.#.$..........................*.*.#.$.........*.*.#.$.*..*.#.$.***+#+$..+-+
            |                     * * # $ *+* # $ * * # $   +++                    * * # $ ++###$$ * * # $ *  * # $ * * # $    |
            |    ***##$$          * * # $ * * # $ * * # $ ***##$$          ++###   * * # $ *** #+$ * * # $ *  * # $ * * # $    |
            |    *+*+#+$ ***##$$$ * * # $ * * # $ * * # $ *+* # $ ++####$$ ***+#   * * # $ * * # $ * * # $ *  * # $ * * # $    |
         1x +-++-*+*+#+$+*+*+#-+$+*+*-#+$+*+*+#+$+*+*+#+$+*-*+#+$+***++#+$+*+*+#$$+*+*+#+$+*+*+#+$+*+*-#+$+*+-*+#+$+*+*+#+$-++-+
            |    * * # $ * * #  $ * * # $ * * # $ * * # $ * * # $ * *  # $ * * # $ * * # $ * * # $ * * # $ *  * # $ * * # $    |
            |    * * # $ * * #  $ * * # $ * * # $ * * # $ * * # $ * *  # $ * * # $ * * # $ * * # $ * * # $ *  * # $ * * # $    |
       0.8x +-+--***##$$-***##$$$-***##$$-***##$$-***##$$-***##$$-***###$$-***##$$-***##$$-***##$$-***##$$-****##$$-***##$$--+-+
               astar   bzip2      gcc   gobmk h264ref   hmmlibquantum      mcf omnetpperlbench   sjengxalancbmk   hmean
        png: http://imgur.com/4UXTrEc
      
      Here I also tried the hash function suggested by Paolo ("multhash"):
      
        return ((uint64_t) (pc * 2654435761) >> 32) & (TB_JMP_CACHE_SIZE - 1);
      
      As you can see it is just as good as the other new function ("hash"),
      which is what I ended up going with.
      
      -                          SPECint06 (train set), x86_64-linux-user. Host: Intel i7-6700K @ 4.00GHz
      
       2.6x +-+--------------------------------------------------------------------------------------------------------------+-+
            |                                                                                                                  |
            |     jr                                                                                           ###             |
       2.4x +jr+hash...........................................................................................#.#...........+-+
            |                                                                                                  # #             |
            |                                                                                                  # #             |
       2.2x +-+................................................................................................#.#...........+-+
            |                                                                                                  # #             |
            |                                                                                                  # #             |
         2x +-+................................................................................................#.#...........+-+
            |                                                                                               **** #             |
            |                                                                                               *  * #             |
       1.8x +-+.............................................................................................*..*.#...........+-+
            |                                                                         +++                   *  * #             |
            |                                                                         ####    ####          *  * #             |
       1.6x +-+......................................####.............................#..#.****..#..........*..*.#...........+-+
            |                        +++             #++#                          ****  # *  *  #    ####  *  * #             |
            |                        ###             #  #                          *  *  # *  *  #    #  #  *  * #             |
       1.4x +-+...................****+#..........****..#..........................*..*..#.*..*..#....#..#..*..*.#...........+-+
            |                     *++* #          *  *  #                          *  *  # *  *  #  ***  #  *  * #     ####    |
            |                     *  * #     #### *  *  #                          *  *  # *  *  #  * *  #  *  * #  ****  #    |
       1.2x +-+...................*..*.#..****++#.*..*..#..........................*..*..#.*..*..#..*.*..#..*..*.#..*..*..#..+-+
            |    ****###          *  * #  *  *  # *  *  #                          *  *  # *  *  #  * *  #  *  * #  *  *  #    |
            |    *  *  #  ***###  *  * #  *  *  # *  *  #                  ****##  *  *  # *  *  #  * *  #  *  * #  *  *  #    |
         1x +-+--****###--***###--****##--****###-****###--***###--***###--****##--****###-****###--***###--****##--****###--+-+
               astar   bzip2      gcc   gobmk h264ref   hmmlibquantum      mcf omnetpperlbench   sjengxalancbmk   hmean
        png: http://imgur.com/ArCbHqo
      
      -                                    NBench, x86_64-linux-user. Host: Intel i7-6700K @ 4.00GHz
      
       1.12x +-+-------------------------------------------------------------------------------------------------------------+-+
             |                                                                                                                 |
             |     jr                                                           +++                                            |
        1.1x +jr+hash...........................................................####.........................................+-+
             |                                                               +++#| #                                           |
             |                                                                | #++#                                           |
       1.08x +-+................................+++................+++.+++..*****..#.........................................+-+
             |                                   |  +++             |   |   * | *  #                                           |
             |                                   |   |              |   |   *+++*  #                                           |
       1.06x +-+................................****###.............|...|...*...*..#.........................+++.............+-+
             |                                  *| * |#            ****###  *   *  #                          |                |
             |                                  *| *++#            *| * |#  *   *  #                        ####               |
       1.04x +-+................................*++*..#............*|.*.|#..*...*..#........................#.|#.............+-+
             |                                  *  *  #            *++*++#  *   *  #                     +++#++#               |
             |                                  *  *  #            *  *  #  *   *  #                      | #  #   +++####     |
       1.02x +-+................................*..*..#......+++...*..*..#..*...*..#.....................****..#..*****++#...+-+
             |         +++                      *  *  #   +++ |    *  *  #  *   *  #  +++                *| *  #  *+++*  #     |
             |      +++ |    +++ +++   ++++++   *  *  #  *****###  *  *  #  *   *  #   |  +++   ++++++   *++*  #  *   *  #     |
          1x +-++-+++++####++****###++++-+####+-*++*++#-+*+++*-+#++*++*++#++*+-+*++#+-+++####-+*****###++*++*++#++*+-+*++#+-++-+
             |     *****| #  *++* |#  *****| #  *  *  #  *   *++#  *  *  #  *   *  #  **** |#  *   *  #  *  *  #  *   *  #     |
             |     * | *| #  *  *++#  * | *++#  *  *  #  *   *  #  *  *  #  *   *  #  *| *++#  *   *  #  *  *  #  *   *  #     |
       0.98x +-+...*.|.*++#..*..*..#..*+++*..#..*..*..#..*...*..#..*..*..#..*...*..#..*++*..#..*...*..#..*..*..#..*...*..#...+-+
             |     *+++*  #  *  *  #  *   *  #  *  *  #  *   *  #  *  *  #  *   *  #  *  *  #  *   *  #  *  *  #  *   *  #     |
             |     *   *  #  *  *  #  *   *  #  *  *  #  *   *  #  *  *  #  *   *  #  *  *  #  *   *  #  *  *  #  *   *  #     |
       0.96x +-+---*****###--****###--*****###--****###--*****###--****###--*****###--****###--*****###--****###--*****###---+-+
             ASSIGNMENT BITFIELD   FOURFP EMULATION   HUFFMAN   LU DECOMPOSITIONEURAL NNUMERIC SOSTRING SORT     hmean
        png: http://imgur.com/ZXFX0hJ
      
      -                                   NBench, arm-linux-user. Host: Intel i7-4790K @ 4.00GHz
      
        1.3x +-+-------------------------------------------------------------------------------------------------------------+-+
             |                            ####                                                                                 |
             |     jr                     #  #                                            +++                                  |
       1.25x +jr+hash.....................#..#...........................................####................................+-+
             |                            #  #                                           #  #                                  |
             |                            #  #                                           #  #                                  |
        1.2x +-+..........................#..#...........................................#..#................................+-+
             |                            #  #                                           #  #                                  |
             |                            #  #                                           #  #                                  |
       1.15x +-+..........................#..#...........................................#..#................................+-+
             |                            #  #                                  ####     #  #                                  |
             |                            #  #                                  #  #     #  #                                  |
        1.1x +-+..........................#..#..................................#..#.....#..#................................+-+
             |                            #  #                                  #  #     #  #                         +++      |
             |                            #  #               ####               #  #     #  #                         ####     |
       1.05x +-+..........................#..#...............#..#.....####......#..#.....#..#.........................#..#...+-+
             |                            #  #               #  #     #  #      #  #     #  #                +++      #  #     |
             |                   +++  *****  #     ####  *****  #     #  #   +++#  #  ****  #            ****###      #  #     |
          1x +-++-+*****###++****+++++*+-+*++#+-****++#-+*+++*-+#+++++#++#++*****++#+-*++*++#-+*****-++++*++*++#++*****++#+-++-+
             |     *   *  #  *  * |   *   *  #  *  *  #  *   *  #  ****  #  *   *  #  *  *  #  *   *###  *  *++#  *   *  #     |
             |     *   *  #  *  *###  *   *  #  *  *  #  *   *  #  *  *  #  *   *  #  *  *  #  *   *  #  *  *  #  *   *  #     |
       0.95x +-+...*...*..#..*..*.|#..*...*..#..*..*..#..*...*..#..*..*..#..*...*..#..*..*..#..*...*..#..*..*..#..*...*..#...+-+
             |     *   *  #  *  * |#  *   *  #  *  *  #  *   *  #  *  *  #  *   *  #  *  *  #  *   *  #  *  *  #  *   *  #     |
             |     *   *  #  *  * |#  *   *  #  *  *  #  *   *  #  *  *  #  *   *  #  *  *  #  *   *  #  *  *  #  *   *  #     |
        0.9x +-+---*****###--****###--*****###--****###--*****###--****###--*****###--****###--*****###--****###--*****###---+-+
             ASSIGNMENT BITFIELD   FOURFP EMULATION   HUFFMAN   LU DECOMPOSITIONEURAL NNUMERIC SOSTRING SORT     hmean
        png: http://imgur.com/FfD27eyReviewed-by: NAlex Bennée <alex.bennee@linaro.org>
      Reviewed-by: NRichard Henderson <rth@twiddle.net>
      Signed-off-by: NEmilio G. Cota <cota@braap.org>
      Message-Id: <1493263764-18657-12-git-send-email-cota@braap.org>
      Signed-off-by: NRichard Henderson <rth@twiddle.net>
      6f165318
    • E
      tcg: Introduce goto_ptr opcode and tcg_gen_lookup_and_goto_ptr · cedbcb01
      Emilio G. Cota 提交于
      Instead of exporting goto_ptr directly to TCG frontends, export
      tcg_gen_lookup_and_goto_ptr(), which calls goto_ptr with the pointer
      returned by the lookup_tb_ptr() helper. This is the only use case
      we have for goto_ptr and lookup_tb_ptr, so having this function is
      very convenient. Furthermore, it trivially allows us to avoid calling
      the lookup helper if goto_ptr is not implemented by the backend.
      Reviewed-by: NAlex Bennée <alex.bennee@linaro.org>
      Signed-off-by: NEmilio G. Cota <cota@braap.org>
      Message-Id: <1493263764-18657-2-git-send-email-cota@braap.org>
      Message-Id: <1493263764-18657-3-git-send-email-cota@braap.org>
      Message-Id: <1493263764-18657-4-git-send-email-cota@braap.org>
      Message-Id: <1493263764-18657-5-git-send-email-cota@braap.org>
      [rth: Squashed 4 related commits.]
      Signed-off-by: NRichard Henderson <rth@twiddle.net>
      cedbcb01
  10. 04 6月, 2017 1 次提交
  11. 26 5月, 2017 2 次提交
  12. 19 5月, 2017 2 次提交
  13. 18 5月, 2017 2 次提交
    • P
      ramblock: add new hmp command "info ramblock" · be9b23c4
      Peter Xu 提交于
      To dump information about ramblocks. It looks like:
      
      (qemu) info ramblock
                    Block Name    PSize              Offset               Used              Total
                  /objects/mem    2 MiB  0x0000000000000000 0x0000000080000000 0x0000000080000000
                      vga.vram    4 KiB  0x0000000080060000 0x0000000001000000 0x0000000001000000
          /rom@etc/acpi/tables    4 KiB  0x00000000810b0000 0x0000000000020000 0x0000000000200000
                       pc.bios    4 KiB  0x0000000080000000 0x0000000000040000 0x0000000000040000
        0000:00:03.0/e1000.rom    4 KiB  0x0000000081070000 0x0000000000040000 0x0000000000040000
                        pc.rom    4 KiB  0x0000000080040000 0x0000000000020000 0x0000000000020000
          0000:00:02.0/vga.rom    4 KiB  0x0000000081060000 0x0000000000010000 0x0000000000010000
         /rom@etc/table-loader    4 KiB  0x00000000812b0000 0x0000000000001000 0x0000000000001000
            /rom@etc/acpi/rsdp    4 KiB  0x00000000812b1000 0x0000000000001000 0x0000000000001000
      
      Ramblock is something hidden internally in QEMU implementation, and this
      command should only be used by mostly QEMU developers on RAM stuff. It
      is not a command suitable for QMP interface. So only HMP interface is
      provided for it.
      Reviewed-by: NDr. David Alan Gilbert <dgilbert@redhat.com>
      Signed-off-by: NPeter Xu <peterx@redhat.com>
      Message-Id: <1494562661-9063-4-git-send-email-peterx@redhat.com>
      Signed-off-by: NDr. David Alan Gilbert <dgilbert@redhat.com>
      be9b23c4
    • P
      ramblock: add RAMBLOCK_FOREACH() · 99e15582
      Peter Xu 提交于
      So that it can simplifies the iterators.
      Reviewed-by: NDr. David Alan Gilbert <dgilbert@redhat.com>
      Signed-off-by: NPeter Xu <peterx@redhat.com>
      Message-Id: <1494562661-9063-2-git-send-email-peterx@redhat.com>
      Signed-off-by: NDr. David Alan Gilbert <dgilbert@redhat.com>
      99e15582
  14. 04 5月, 2017 1 次提交
  15. 24 4月, 2017 1 次提交
    • G
      memory: add support getting and using a dirty bitmap copy. · 8deaf12c
      Gerd Hoffmann 提交于
      This patch adds support for getting and using a local copy of the dirty
      bitmap.
      
      memory_region_snapshot_and_clear_dirty() will create a snapshot of the
      dirty bitmap for the specified range, clear the dirty bitmap and return
      the copy.  The returned bitmap can be a bit larger than requested, the
      range is expanded so the code can copy unsigned longs from the bitmap
      and avoid atomic bit update operations.
      
      memory_region_snapshot_get_dirty() will return the dirty status of
      pages, pretty much like memory_region_get_dirty(), but using the copy
      returned by memory_region_copy_and_clear_dirty().
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      Message-id: 20170421091632.30900-3-kraxel@redhat.com
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      8deaf12c
  16. 21 4月, 2017 8 次提交