Commit graph

12969 commits

Author SHA1 Message Date
Aneesh Kumar K.V fc22118d9b virtio-9p: Use layered xattr approach
We would need this to make sure we handle the mapped
security model correctly for different xattr names.

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
2010-10-20 12:10:58 -05:00
Venkateswararao Jujjuri (JV) 0f8151cb75 [virtio-9p] Ignore O_DIRECT hint from client.
The O_DIRECT flag imposes alignment restrictions on the length and address
of userspace buffers and the file offset of I/Os.

While VirtFS/9P has plans to implement O_DIRECT behavior on the server,
for now we will stick to a behavior like NFS by bypassing the page cache
only on the client. Server may still cache the I/O.

Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
2010-10-20 12:10:58 -05:00
M. Mohan Kumar df0973a465 qemu-virtio-9p: Implement TREADLINK operation for 9p2000.L
Synopsis

        size[4] TReadlink tag[2] fid[4]
        size[4] RReadlink tag[2] target[s]

Description
        Readlink is used to return the contents of the symoblic link
        referred by fid. Contents of symboic link is returned as a
        response.

        target[s] - Contents of the symbolic link referred by fid.

Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com>
Reviewed-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
2010-10-20 12:10:58 -05:00
Venkateswararao Jujjuri (JV) b41e95d348 [virtio-9p] Introduce server side TFSYNC/RFSYNC for dotl
SYNOPSIS
    size[4] Tfsync tag[2] fid[4]

    size[4] Rfsync tag[2]

DESCRIPTION

The Tfsync transaction transfers ("flushes") all modified in-core data of
file identified by fid to the disk device (or other  permanent  storage
device)  where that  file  resides.

Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
2010-10-20 12:10:58 -05:00
M. Mohan Kumar 8f35400358 qemu-virtio9p: Implement TGETLOCK
Synopsis

    size[4] TGetlock tag[2] fid[4] getlock[n]
    size[4] RGetlock tag[2] getlock[n]

Description

TGetlock is used to test for the existence of byte range posix locks on
a file identified by given fid. The reply contains getlock structure. If
the lock could be placed it returns F_UNLCK in type field of getlock structure.
Otherwise it returns the details of the conflicting locks in the getlock
structure

    getlock structure:
      type[1] - Type of lock: F_RDLCK, F_WRLCK
      start[8] - Starting offset for lock
      length[8] - Number of bytes to lock
        If length is 0, lock all bytes starting at the location
        'start' through to the end of file
      proc_id[4] - process id that wants to take lock/owns the task
               in case of reply
      client[4] - Client id of the system that owns the process

Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com>
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
2010-10-20 12:10:58 -05:00
M. Mohan Kumar 82cc3ee88b [virto-9p] Implement TLOCK
Synopsis

    size[4] TLock tag[2] fid[4] flock[n]
    size[4] RLock tag[2] status[1]

Description

Tlock is used to acquire/release byte range posix locks on a file
identified by given fid. The reply contains status of the lock request

    flock structure:
        type[1] - Type of lock: F_RDLCK, F_WRLCK, F_UNLCK
        flags[4] - Flags could be either of
          P9_LOCK_FLAGS_BLOCK(1) - Blocked lock request, if there is a
            conflicting lock exists, wait for that lock to be released.
          P9_LOCK_FLAGS_RECLAIM(2) - Reclaim lock request, used when client is
            trying to reclaim a lock after a server restrart (due to crash)
        start[8] - Starting offset for lock
        length[8] - Number of bytes to lock
          If length is 0, lock all bytes starting at the location 'start'
          through to the end of file
        pid[4] - PID of the process that wants to take lock
        client_id[4] - Unique client id

        status[1] - Status of the lock request, can be
          P9_LOCK_SUCCESS(0), P9_LOCK_BLOCKED(1), P9_LOCK_ERROR(2) or
          P9_LOCK_GRACE(3)
          P9_LOCK_SUCCESS - Request was successful
          P9_LOCK_BLOCKED - A conflicting lock is held by another process
          P9_LOCK_ERROR - Error while processing the lock request
          P9_LOCK_GRACE - Server is in grace period, it can't accept new lock
                requests in this period (except locks with
                P9_LOCK_FLAGS_RECLAIM flag set)

Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com>
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
2010-10-20 12:10:58 -05:00
Sripathi Kodi ab03b63d7a [virtio-9p] open should not return EBADF
When 9P server fails to create a file due to permission problems it should
return EPERM. However the current 9P2000.L code returns EBADF. EBADF is NOT
a valid return value from open() call.

The problem is because we do not preserve the errno variable properly. If the
file open had failed, the call to close() on the fd in v9fs_post_lcreate()
fails and sets errno to EBADF. We should preserve the errno that we got from
open() and we should call close() only if we had a valid fd.

Signed-off-by: Sripathi Kodi <sripathik@in.ibm.com>
Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
2010-10-20 12:10:58 -05:00
Blue Swirl a12c668f0a trace: improve info trace output
Use PRI*64 to print full 64 bit data even on ILP32 hosts.

Print also sixth tracepoint parameter.

Acked-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Cc: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-10-20 16:41:36 +00:00
Stefan Hajnoczi cf85cf8e97 trace: Format strings must begin/end with double quotes
Document the restriction that format strings must begin and end with
double quotes.  This is for easy parsing since we don't run cpp over
trace-events.

Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-10-20 16:41:31 +00:00
Blue Swirl d8023f3114 apic: convert debug printf statements to tracepoints
Replace debug printf statements with tracepoints.

Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-10-20 16:41:28 +00:00
Stefan Hajnoczi 6df40080b0 trace: Relax trace-events parsing regex in simpletrace.py
The regular expression to parse trace event definitions assumed the
format string would be a simple double-quoted string.  However, we now
use PRI?64 for portability which splits string literals.  The regular
expression can disregard the format string entirely since simpletrace.py
never needs to use it.

Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-10-20 16:27:51 +00:00
Isaku Yamahata 48ebf2f90f x3130: pcie downstream port
Implement TI x3130 pcie downstream port switch.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2010-10-20 12:06:53 +02:00
Isaku Yamahata faf1e708d5 x3130: pcie upstream port
Implement TI x3130 pcie upstream port switch.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2010-10-20 12:06:50 +02:00
Isaku Yamahata 8135aeed0f ioh3420: pcie root port in X58 ioh
Implements pcie root port switch in intel X58 ioh
whose device id is 0x3420.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2010-10-20 12:06:43 +02:00
Isaku Yamahata bc20ba98b1 pcie port: define struct PCIEPort/PCIESlot and helper functions
define struct PCIEPort which represents common part
of pci express port.(root, upstream and downstream.)
add a helper function for pcie port which can be used commonly by
root/upstream/downstream port.
define struct PCIESlot which represents common part of
pcie slot.(root and downstream.) and helper functions for it.
helper functions for chassis, slot -> PCIESlot conversion.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2010-10-20 12:05:45 +02:00
Isaku Yamahata 0208def1ca pci/bridge: fix pci_bridge_reset()
The lower bits of base/limit registers is RO and shouldn't be zero
cleared on reset. This patch fixes it.
In fact, the default value of base/limit registers aren't specified
in the spec. And some bridges disable forwarding on reset instead of
zeroing base/limit registers.
So introduce one function to disable bridge forwarding so that
such bridges can use it. It will be used later.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2010-10-20 12:05:10 +02:00
Isaku Yamahata 6da6d29fa6 pcie: comment on hpev_intx
document hpev_intx.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2010-10-20 12:04:36 +02:00
Isaku Yamahata 0428527c62 pcie: helper functions for pcie capability and extended capability
This patch implements helper functions for pci express capability
and pci express extended capability allocation.
NOTE: presence detection depends on pci_qdev_init() change.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2010-10-19 14:09:44 +02:00
Isaku Yamahata 08f3dcf13f pcie: add pcie constants to pcie_regs.h
add pcie constants to pcie_regs.h.
Those constants should go to Linux pci_regs.h and then the file should
go away eventually.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2010-10-19 14:09:12 +02:00
Isaku Yamahata e4c7d2aef8 msi: implements msi
implements msi related functions.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2010-10-19 14:09:06 +02:00
Isaku Yamahata 99443c21b0 pci: use pci_word_test_and_clear_mask() in pci_device_reset()
use pci_clear_bit_word() in pci_device_reset() where appropriate.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2010-10-19 13:57:33 +02:00
Isaku Yamahata a5d1fd20cc pci: introduce helper function to handle msi-x and msi.
this patch implements helper functions to handle msi-x and msi
uniformly.
They will be used later.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2010-10-19 13:57:24 +02:00
Isaku Yamahata aabcf5266f pci: introduce helper functions to test-and-{clear, set} mask in configuration space
This patch introduces helper functions to test-and-{clear, set} mask in configuration
space. pci_{byte, word, long, quad}_test_and_{clear, set}_mask().
They will be used later.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2010-10-19 13:57:21 +02:00
Isaku Yamahata 1a4f5971b6 pci: make pci_del_capability() update for w1cmask
Clear w1cmask when deleting a pci capability.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2010-10-18 08:07:01 +02:00
Jindrich Makovicka 38cc9b607f issue snd_pcm_start() when capturing audio
snd_pcm_start() starts the capture process and ensures that the events
are delivered to the poll handler. Without the call, capture can be started
only when there is simultaneous playback running.

Signed-off-by: Jindrich Makovicka <makovick@gmail.com>
Signed-off-by: malc <av1474@comtv.ru>
2010-10-18 00:39:06 +04:00
Jindrich Makovicka 22d948a2d9 fix 100% CPU load when idle with ALSA
Playback control function did not disable polling when playback stops.
Caused busy spinning of the main loop due to unprocessed events.

Signed-off-by: Jindrich Makovicka <makovick@gmail.com>
Signed-off-by: malc <av1474@comtv.ru>
2010-10-18 00:39:02 +04:00
Blue Swirl f871d6893a trace: print a warning if user tries to enable an unknown trace event
There was no warning if a bad trace event name was given to
'trace-event' command, thus the user could think that the command
was successful even if this was not the case.

Print a warning if the user tries to enable a trace event which is not
known.

Acked-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-10-13 19:14:29 +00:00
Blue Swirl 2abf314ddd mips: avoid write only variables
Compiling with GCC 4.6.0 20100925 produced a lot of warnings like:
/src/qemu/target-mips/translate.c: In function 'gen_ld':
/src/qemu/target-mips/translate.c:1039:17: error: variable 'opn' set but not used [-Werror=unused-but-set-variable]

Fix by adding a dummy cast so that the variable is not unused.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-10-13 18:43:21 +00:00
Blue Swirl 577f25a5eb ppc: avoid write only variables
Compiling with GCC 4.6.0 20100925 produced warnings:
/src/qemu/target-ppc/op_helper.c: In function 'helper_icbi':
/src/qemu/target-ppc/op_helper.c:351:14: error: variable 'tmp' set but not used [-Werror=unused-but-set-variable]
/src/qemu/target-ppc/op_helper.c: In function 'do_6xx_tlb':
/src/qemu/target-ppc/op_helper.c:3805:28: error: variable 'EPN' set but not used [-Werror=unused-but-set-variable]
/src/qemu/target-ppc/op_helper.c: In function 'do_74xx_tlb':
/src/qemu/target-ppc/op_helper.c:3838:28: error: variable 'EPN' set but not used [-Werror=unused-but-set-variable]

Fix by adding a dummy cast so that the variable is not unused. Delete tmp.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-10-13 18:43:20 +00:00
Blue Swirl 4581cbcdc3 i386: avoid a write only variable
Compiling with GCC 4.6.0 20100925 produced warnings:
/src/qemu/target-i386/op_helper.c: In function 'switch_tss':
/src/qemu/target-i386/op_helper.c:283:53: error: variable 'new_trap' set but not used [-Werror=unused-but-set-variable]

Fix by adding a dummy cast so that the variable is not unused. Add also
pointer to docs.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-10-13 18:43:19 +00:00
Blue Swirl 2ded6ad761 vnc: avoid write only variables
Compiling with GCC 4.6.0 20100925 produced warnings:
/src/qemu/ui/vnc.c: In function 'vnc_client_cache_auth':
/src/qemu/ui/vnc.c:217:12: error: variable 'qdict' set but not used [-Werror=unused-but-set-variable]
/src/qemu/ui/vnc.c: In function 'vnc_display_open':
/src/qemu/ui/vnc.c:2526:9: error: variable 'acl' set but not used [-Werror=unused-but-set-variable]

Fix by making the variable declarations and their uses also conditional
to debug definition.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-10-13 18:43:17 +00:00
Blue Swirl 03e654c083 cris: avoid a write only variable
Compiling with GCC 4.6.0 20100925 produced a warning:
In file included from /src/qemu/target-cris/translate.c:3154:0:
/src/qemu/target-cris/translate_v10.c: In function 'dec10_prep_move_m':
/src/qemu/target-cris/translate_v10.c:111:22: error: variable 'rd' set but not used [-Werror=unused-but-set-variable]

Fix by deleting rd, adjust the only user.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-10-13 18:42:35 +00:00
Blue Swirl 49a2942d9b Delete write only variables
Compiling with GCC 4.6.0 20100925 produced warnings like:
/src/qemu/net/tap-win32.c: In function 'tap_win32_open':
/src/qemu/net/tap-win32.c:582:12: error: variable 'hThread' set but not used [-Werror=unused-but-set-variable]

Fix by removing the unused variables.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-10-13 18:41:29 +00:00
Blue Swirl ae0bfb79aa ppc: remove video.x
Only Mac-on-Linux stuff used video.x, OpenBIOS does not need it.

Remove video.x MoL hacks.

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-10-13 18:38:07 +00:00
Blue Swirl f3f5b86725 lsi53c895a: avoid a write only variable
Compiling with GCC 4.6.0 20100925 produced a warning:
/src/qemu/hw/lsi53c895a.c: In function 'lsi_do_msgout':
/src/qemu/hw/lsi53c895a.c:848:9: error: variable 'len' set but not used [-Werror=unused-but-set-variable]

Fix by adding a dummy cast so that the variable is not unused for
non-debug case.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-10-13 18:38:07 +00:00
Blue Swirl ef4760626e eepro100: initialize a variable in all cases
Compiling with GCC 4.6.0 20100925 produced warnings:
/src/qemu/hw/eepro100.c: In function 'eepro100_read4':
/src/qemu/hw/eepro100.c:1351:14: error: 'val' may be used uninitialized in this function [-Werror=uninitialized]
/src/qemu/hw/eepro100.c: In function 'eepro100_read2':
/src/qemu/hw/eepro100.c:1328:14: error: 'val' may be used uninitialized in this function [-Werror=uninitialized]
/src/qemu/hw/eepro100.c: In function 'eepro100_read1':
/src/qemu/hw/eepro100.c:1285:13: error: 'val' may be used uninitialized in this function [-Werror=uninitialized]

Fix by initializing 'val' at start.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-10-13 18:38:07 +00:00
Blue Swirl 8c78881f48 cirrus: avoid write only variables
Compiling with GCC 4.6.0 20100925 produced a lot of warnings like:
In file included from /src/qemu/hw/cirrus_vga_rop.h:174:0,
                 from /src/qemu/hw/cirrus_vga.c:284:
/src/qemu/hw/cirrus_vga_rop2.h: In function 'cirrus_patternfill_0_8':
/src/qemu/hw/cirrus_vga_rop2.h:48:18: error: variable 'col' set but not used [-Werror=unused-but-set-variable]
/src/qemu/hw/cirrus_vga_rop2.h: In function 'cirrus_colorexpand_transp_0_8':
/src/qemu/hw/cirrus_vga_rop2.h:104:18: error: variable 'col' set but not used [-Werror=unused-but-set-variable]

Fix the warnings by introducing an inline function, which avoids
exposing write-only variables.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-10-13 18:38:07 +00:00
Blue Swirl 83e3f76c25 block: avoid a write only variable
Compiling with GCC 4.6.0 20100925 produced a warning:
/src/qemu/block/qcow2-refcount.c: In function 'update_refcount':
/src/qemu/block/qcow2-refcount.c:552:13: error: variable 'dummy' set but not used [-Werror=unused-but-set-variable]

Fix by adding a dummy cast so that the result is not unused.

Acked-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-10-13 18:38:07 +00:00
Anthony Liguori a2d3f69530 Merge remote branch 'mst/for_anthony' into staging 2010-10-11 15:37:11 -05:00
Blue Swirl d7489b72ca trace: remove timestamp files when cleaning up
'make clean' did not remove trace.[ch]-timestamp files,
only trace.[ch]. But 'make' did not know how to make trace.[ch]
files if the timestamp files were present.

Fix by removing the timestamp files along with trace.[ch].

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-10-09 08:24:17 +00:00
Stefan Weil ba80782912 configure: Send error message from spice check to /dev/null
pkg-config is not always available (e.g. on win32 hosts),
but we don't want to see the 'command not found' error message.

Redirect stdout and stderr to /dev/null.

v2:

* Removed changes which should not have been here.

Cc: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-10-09 08:23:02 +00:00
Stefan Weil 6650b7100b win32: Set unbuffered stdout
Win32 does not support line-buffering, but it allows
unbuffered output.

Unbuffered output is a good approximation. For typical output
statements which usually end with '\n', it's even identical.

Buffered output is unusable for program traces because of
its large delay.

Cc: Blue Swirl <blauwirbel@gmail.com>
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-10-09 08:20:39 +00:00
Stefan Hajnoczi ea95f15602 .gitignore: Ignore *-timestamp
Timestamp files were recently added to reduce make churn on source files
that use tracing.  The timestamp files should never be committed and
should not be visible in git status.

Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-10-09 08:19:38 +00:00
Vincent Minet b755a4289e acpi: Fix an infinite loop in acpi_table_add
Commit d729bb9a77 has a typo, causing an
infinite loop in acpi_table_add.

Signed-off-by: Vincent Minet <vincent@vincent-minet.net>
Acked-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-10-09 08:19:16 +00:00
Stefan Weil 10d554c65a configure: Remove unneeded defines from checks
_GNU_SOURCE is already defined in QEMU_CFLAGS which
is passed to gcc in shell function compile_prog.

Removing the definition from several checks avoids compiler warnings
(which are now written to config.log).

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-10-09 08:18:29 +00:00
Scott Wood 832ce9c286 configure: include stddef.h for NULL
This fixes an observed failure to detect madvise() on Linux.

To avoid similar issues, all other tests that use NULL but don't already
have stddef.h (or another header that is defined to provide NULL,
such as stdio.h, unistd.h, or time.h) are also fixed.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-10-09 08:17:55 +00:00
Stefan Hajnoczi bbf0a44081 trace: Trace bdrv_aio_{readv,writev}
Observing block layer aio readv/writev operations is useful for
debugging image formats or understanding guest disk I/O patterns.

Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-10-09 08:17:03 +00:00
Stefan Hajnoczi ea9c16989b trace: Use TP_PROTO() and TP_ARGS() for LTTng UST
The LTTng UserSpace Tracer formerly used TPPROTO() and TPARGS() instead
of TP_PROTO() and TP_ARGS() like the kernel uses.  This has been changed
so QEMU needs to follow.

I am not aware of a graceful way of making the transition but since no
one complained that the UST build is broken, it should be fine to just
switch over without compatibility for old UST headers.  The newer UST
headers are shipping in distro packages so it is realistic to make this
change now.

Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-10-09 08:16:55 +00:00
Stefan Hajnoczi 5eb5527b1e trace: Don't strip lines containing '#' arbitrarily
Although comment lines must be skipped, the '#' character can occur in
valid format strings.  Be more careful when checking for comments.
Leave comments at the end of the line where they will not interfere with
other processing.

Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-10-09 08:16:50 +00:00
Stefan Hajnoczi 9a85d39447 trace: Use portable format strings
It is not portable to use "%ld" for int64_t because int64_t may have
type long on 64-bit platforms and long long on 32-bit platforms.  Use
the standard library PRId64 macros to keep format strings portable.

Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-10-09 08:16:45 +00:00