trace-events: print 0x before hex numbers
Subsystems (2)
PATCH 1/1 trace-events: print 0x before hex numbers
To make logs more readable prefix all hex values with '0x' mark. This is needed for consistency too, as a lot of hex values are already prefixed with '0x'. Also, bring all hex outputs to the common form - use '%#', not '0x%'.
This patch is done by two commands:
find . -name trace-events | \
xargs sed -i 's/%\([-+ *.0-9]*\([hljztL]\|ll\|hh\)\?\(x\|X\|"\s*PRIx\)\)/%#\1/g'
find . -name trace-events | xargs sed -i 's/0x%#/%#/g'
---
Hi all!
It is hard to read logs, when there are hex and dec numbers in one line, when hex number doesn't contain any letters and don't have '0x' prefix. Hope I'm not alone who is not comfortable with it, so, what about a patch like this? May be regexp's should be improved but, I think, the common idea is clear.
accel/kvm/trace-events | 8 +- accel/tcg/trace-events | 8 +- block/trace-events | 22 ++--- chardev/trace-events | 2 +- hw/acpi/trace-events | 54 +++++------ hw/audio/trace-events | 12 +-- hw/char/trace-events | 50 +++++----- hw/display/trace-events | 92 +++++++++--------- hw/dma/trace-events | 36 +++---- hw/i386/trace-events | 160 ++++++++++++++++---------------- hw/i386/xen/trace-events | 4 +- hw/input/trace-events | 4 +- hw/intc/trace-events | 192 +++++++++++++++++++------------------- hw/isa/trace-events | 12 +-- hw/mem/trace-events | 2 +- hw/misc/trace-events | 88 +++++++++--------- hw/net/trace-events | 214 +++++++++++++++++++++--------------------- hw/nvram/trace-events | 6 +- hw/pci/trace-events | 8 +- hw/ppc/trace-events | 126 ++++++++++++------------- hw/s390x/trace-events | 20 ++-- hw/scsi/trace-events | 232 +++++++++++++++++++++++----------------------- hw/sd/trace-events | 4 +- hw/timer/trace-events | 50 +++++----- hw/usb/trace-events | 196 +++++++++++++++++++-------------------- hw/vfio/trace-events | 102 ++++++++++---------- hw/virtio/trace-events | 6 +- hw/xen/trace-events | 4 +- linux-user/trace-events | 10 +- migration/trace-events | 46 ++++----- nbd/trace-events | 32 +++---- net/trace-events | 4 +- target/arm/trace-events | 10 +- target/s390x/trace-events | 6 +- target/sparc/trace-events | 30 +++--- trace-events | 6 +- ui/trace-events | 16 ++-- util/trace-events | 2 +- 38 files changed, 938 insertions(+), 938 deletions(-)
accel/kvm/trace-events +4 -4
@@ -1,11 +1,11 @@ # Trace events for debugging and performance instrumentation # kvm-all.c -kvm_ioctl(int type, void *arg) "type 0x%x, arg %p" -kvm_vm_ioctl(int type, void *arg) "type 0x%x, arg %p" -kvm_vcpu_ioctl(int cpu_index, int type, void *arg) "cpu_index %d, type 0x%x, arg %p" +kvm_ioctl(int type, void *arg) "type %#x, arg %p" +kvm_vm_ioctl(int type, void *arg) "type %#x, arg %p" +kvm_vcpu_ioctl(int cpu_index, int type, void *arg) "cpu_index %d, type %#x, arg %p" kvm_run_exit(int cpu_index, uint32_t reason) "cpu_index %d, reason %d" -kvm_device_ioctl(int fd, int type, void *arg) "dev fd %d, type 0x%x, arg %p" +kvm_device_ioctl(int fd, int type, void *arg) "dev fd %d, type %#x, arg %p" kvm_failed_reg_get(uint64_t id, const char *msg) "Warning: Unable to retrieve ONEREG %" PRIu64 " from KVM: %s" kvm_failed_reg_set(uint64_t id, const char *msg) "Warning: Unable to set ONEREG %" PRIu64 " to KVM: %s" kvm_irqchip_commit_routes(void) ""
accel/tcg/trace-events +4 -4
@@ -2,9 +2,9 @@ # TCG related tracing (mostly disabled by default) # cpu-exec.c -disable exec_tb(void *tb, uintptr_t pc) "tb:%p pc=0x%"PRIxPTR -disable exec_tb_nocache(void *tb, uintptr_t pc) "tb:%p pc=0x%"PRIxPTR -disable exec_tb_exit(void *last_tb, unsigned int flags) "tb:%p flags=%x" +disable exec_tb(void *tb, uintptr_t pc) "tb:%p pc=%#"PRIxPTR +disable exec_tb_nocache(void *tb, uintptr_t pc) "tb:%p pc=%#"PRIxPTR +disable exec_tb_exit(void *last_tb, unsigned int flags) "tb:%p flags=%#x" # translate-all.c -translate_block(void *tb, uintptr_t pc, uint8_t *tb_code) "tb:%p, pc:0x%"PRIxPTR", tb_code:%p" +translate_block(void *tb, uintptr_t pc, uint8_t *tb_code) "tb:%p, pc:%#"PRIxPTR", tb_code:%p"
block/trace-events +11 -11
@@ -5,8 +5,8 @@ bdrv_open_common(void *bs, const char *filename, int flags, const char *format_n bdrv_lock_medium(void *bs, bool locked) "bs %p locked %d" # block/block-backend.c -blk_co_preadv(void *blk, void *bs, int64_t offset, unsigned int bytes, int flags) "blk %p bs %p offset %"PRId64" bytes %u flags %x" -blk_co_pwritev(void *blk, void *bs, int64_t offset, unsigned int bytes, int flags) "blk %p bs %p offset %"PRId64" bytes %u flags %x" +blk_co_preadv(void *blk, void *bs, int64_t offset, unsigned int bytes, int flags) "blk %p bs %p offset %"PRId64" bytes %u flags %#x" +blk_co_pwritev(void *blk, void *bs, int64_t offset, unsigned int bytes, int flags) "blk %p bs %p offset %"PRId64" bytes %u flags %#x" # block/io.c bdrv_co_readv(void *bs, int64_t sector_num, int nb_sector) "bs %p sector_num %"PRId64" nb_sectors %d"
@@ -54,19 +54,19 @@ paio_submit_co(int64_t offset, int count, int type) "offset %"PRId64" count %d t paio_submit(void *acb, void *opaque, int64_t offset, int count, int type) "acb %p opaque %p offset %"PRId64" count %d type %d" # block/qcow2.c -qcow2_writev_start_req(void *co, int64_t offset, int bytes) "co %p offset %" PRIx64 " bytes %d" +qcow2_writev_start_req(void *co, int64_t offset, int bytes) "co %p offset %#" PRIx64 " bytes %d" qcow2_writev_done_req(void *co, int ret) "co %p ret %d" qcow2_writev_start_part(void *co) "co %p" qcow2_writev_done_part(void *co, int cur_bytes) "co %p cur_bytes %d" -qcow2_writev_data(void *co, uint64_t offset) "co %p offset %" PRIx64 -qcow2_pwrite_zeroes_start_req(void *co, int64_t offset, int count) "co %p offset %" PRIx64 " count %d" -qcow2_pwrite_zeroes(void *co, int64_t offset, int count) "co %p offset %" PRIx64 " count %d" +qcow2_writev_data(void *co, uint64_t offset) "co %p offset %#" PRIx64 +qcow2_pwrite_zeroes_start_req(void *co, int64_t offset, int count) "co %p offset %#" PRIx64 " count %d" +qcow2_pwrite_zeroes(void *co, int64_t offset, int count) "co %p offset %#" PRIx64 " count %d" # block/qcow2-cluster.c -qcow2_alloc_clusters_offset(void *co, uint64_t offset, int bytes) "co %p offset %" PRIx64 " bytes %d" -qcow2_handle_copied(void *co, uint64_t guest_offset, uint64_t host_offset, uint64_t bytes) "co %p guest_offset %" PRIx64 " host_offset %" PRIx64 " bytes %" PRIx64 -qcow2_handle_alloc(void *co, uint64_t guest_offset, uint64_t host_offset, uint64_t bytes) "co %p guest_offset %" PRIx64 " host_offset %" PRIx64 " bytes %" PRIx64 -qcow2_do_alloc_clusters_offset(void *co, uint64_t guest_offset, uint64_t host_offset, int nb_clusters) "co %p guest_offset %" PRIx64 " host_offset %" PRIx64 " nb_clusters %d" +qcow2_alloc_clusters_offset(void *co, uint64_t offset, int bytes) "co %p offset %#" PRIx64 " bytes %d" +qcow2_handle_copied(void *co, uint64_t guest_offset, uint64_t host_offset, uint64_t bytes) "co %p guest_offset %#" PRIx64 " host_offset %#" PRIx64 " bytes %#" PRIx64 +qcow2_handle_alloc(void *co, uint64_t guest_offset, uint64_t host_offset, uint64_t bytes) "co %p guest_offset %#" PRIx64 " host_offset %#" PRIx64 " bytes %#" PRIx64 +qcow2_do_alloc_clusters_offset(void *co, uint64_t guest_offset, uint64_t host_offset, int nb_clusters) "co %p guest_offset %#" PRIx64 " host_offset %#" PRIx64 " nb_clusters %d" qcow2_cluster_alloc_phys(void *co) "co %p" qcow2_cluster_link_l2(void *co, int nb_clusters) "co %p nb_clusters %d"
@@ -77,7 +77,7 @@ qcow2_l2_allocate_write_l1(void *bs, int l1_index) "bs %p l1_index %d" qcow2_l2_allocate_done(void *bs, int l1_index, int ret) "bs %p l1_index %d ret %d" # block/qcow2-cache.c -qcow2_cache_get(void *co, int c, uint64_t offset, bool read_from_disk) "co %p is_l2_cache %d offset %" PRIx64 " read_from_disk %d" +qcow2_cache_get(void *co, int c, uint64_t offset, bool read_from_disk) "co %p is_l2_cache %d offset %#" PRIx64 " read_from_disk %d" qcow2_cache_get_replace_entry(void *co, int c, int i) "co %p is_l2_cache %d index %d" qcow2_cache_get_read(void *co, int c, int i) "co %p is_l2_cache %d index %d" qcow2_cache_get_done(void *co, int c, int i) "co %p is_l2_cache %d index %d"
chardev/trace-events +1 -1
@@ -5,7 +5,7 @@ wct_init(void) "" wct_cmd_re(void) "" wct_cmd_st(void) "" wct_cmd_sp(void) "" -wct_cmd_ts(int input) "0x%02x" +wct_cmd_ts(int input) "%#02x" wct_cmd_other(const char *cmd) "%s" wct_speed(int speed) "%d"
hw/acpi/trace-events +27 -27
59 lines not on this page · raw message
hw/audio/trace-events +6 -6
@@ -1,14 +1,14 @@ # See docs/tracing.txt for syntax documentation. # hw/audio/cs4231.c -cs4231_mem_readl_dreg(uint32_t reg, uint32_t ret) "read dreg %d: 0x%02x" -cs4231_mem_readl_reg(uint32_t reg, uint32_t ret) "read reg %d: 0x%08x" -cs4231_mem_writel_reg(uint32_t reg, uint32_t old, uint32_t val) "write reg %d: 0x%08x -> 0x%08x" -cs4231_mem_writel_dreg(uint32_t reg, uint32_t old, uint32_t val) "write dreg %d: 0x%02x -> 0x%02x" +cs4231_mem_readl_dreg(uint32_t reg, uint32_t ret) "read dreg %d: %#02x" +cs4231_mem_readl_reg(uint32_t reg, uint32_t ret) "read reg %d: %#08x" +cs4231_mem_writel_reg(uint32_t reg, uint32_t old, uint32_t val) "write reg %d: %#08x -> %#08x" +cs4231_mem_writel_dreg(uint32_t reg, uint32_t old, uint32_t val) "write dreg %d: %#02x -> %#02x" # hw/audio/milkymist-ac97.c -milkymist_ac97_memory_read(uint32_t addr, uint32_t value) "addr %08x value %08x" -milkymist_ac97_memory_write(uint32_t addr, uint32_t value) "addr %08x value %08x" +milkymist_ac97_memory_read(uint32_t addr, uint32_t value) "addr %#08x value %#08x" +milkymist_ac97_memory_write(uint32_t addr, uint32_t value) "addr %#08x value %#08x" milkymist_ac97_pulse_irq_crrequest(void) "Pulse IRQ CR request" milkymist_ac97_pulse_irq_crreply(void) "Pulse IRQ CR reply" milkymist_ac97_pulse_irq_dmaw(void) "Pulse IRQ DMA write"
hw/char/trace-events +25 -25
80 lines not on this page · raw message
hw/display/trace-events +46 -46
149 lines not on this page · raw message
hw/dma/trace-events +18 -18
@@ -1,32 +1,32 @@ # See docs/tracing.txt for syntax documentation. # hw/dma/rc4030.c -jazzio_read(uint64_t addr, uint32_t ret) "read reg[0x%"PRIx64"] = 0x%x" -jazzio_write(uint64_t addr, uint32_t val) "write reg[0x%"PRIx64"] = 0x%x" -rc4030_read(uint64_t addr, uint32_t ret) "read reg[0x%"PRIx64"] = 0x%x" -rc4030_write(uint64_t addr, uint32_t val) "write reg[0x%"PRIx64"] = 0x%x" +jazzio_read(uint64_t addr, uint32_t ret) "read reg[%#"PRIx64"] = %#x" +jazzio_write(uint64_t addr, uint32_t val) "write reg[%#"PRIx64"] = %#x" +rc4030_read(uint64_t addr, uint32_t ret) "read reg[%#"PRIx64"] = %#x" +rc4030_write(uint64_t addr, uint32_t val) "write reg[%#"PRIx64"] = %#x" # hw/dma/sparc32_dma.c -ledma_memory_read(uint64_t addr) "DMA read addr 0x%"PRIx64 -ledma_memory_write(uint64_t addr) "DMA write addr 0x%"PRIx64 +ledma_memory_read(uint64_t addr) "DMA read addr %#"PRIx64 +ledma_memory_write(uint64_t addr) "DMA write addr %#"PRIx64 sparc32_dma_set_irq_raise(void) "Raise IRQ" sparc32_dma_set_irq_lower(void) "Lower IRQ" -espdma_memory_read(uint32_t addr) "DMA read addr 0x%08x" -espdma_memory_write(uint32_t addr) "DMA write addr 0x%08x" -sparc32_dma_mem_readl(uint64_t addr, uint32_t ret) "read dmareg %"PRIx64": 0x%08x" -sparc32_dma_mem_writel(uint64_t addr, uint32_t old, uint32_t val) "write dmareg %"PRIx64": 0x%08x -> 0x%08x" +espdma_memory_read(uint32_t addr) "DMA read addr %#08x" +espdma_memory_write(uint32_t addr) "DMA write addr %#08x" +sparc32_dma_mem_readl(uint64_t addr, uint32_t ret) "read dmareg %#"PRIx64": %#08x" +sparc32_dma_mem_writel(uint64_t addr, uint32_t old, uint32_t val) "write dmareg %#"PRIx64": %#08x -> %#08x" sparc32_dma_enable_raise(void) "Raise DMA enable" sparc32_dma_enable_lower(void) "Lower DMA enable" # hw/dma/sun4m_iommu.c -sun4m_iommu_mem_readl(uint64_t addr, uint32_t ret) "read reg[%"PRIx64"] = %x" -sun4m_iommu_mem_writel(uint64_t addr, uint32_t val) "write reg[%"PRIx64"] = %x" -sun4m_iommu_mem_writel_ctrl(uint64_t iostart) "iostart = %"PRIx64 -sun4m_iommu_mem_writel_tlbflush(uint32_t val) "tlb flush %x" -sun4m_iommu_mem_writel_pgflush(uint32_t val) "page flush %x" -sun4m_iommu_page_get_flags(uint64_t pa, uint64_t iopte, uint32_t ret) "get flags addr %"PRIx64" => pte %"PRIx64", *pte = %x" -sun4m_iommu_translate_pa(uint64_t addr, uint64_t pa, uint32_t iopte) "xlate dva %"PRIx64" => pa %"PRIx64" iopte = %x" -sun4m_iommu_bad_addr(uint64_t addr) "bad addr %"PRIx64 +sun4m_iommu_mem_readl(uint64_t addr, uint32_t ret) "read reg[%#"PRIx64"] = %#x" +sun4m_iommu_mem_writel(uint64_t addr, uint32_t val) "write reg[%#"PRIx64"] = %#x" +sun4m_iommu_mem_writel_ctrl(uint64_t iostart) "iostart = %#"PRIx64 +sun4m_iommu_mem_writel_tlbflush(uint32_t val) "tlb flush %#x" +sun4m_iommu_mem_writel_pgflush(uint32_t val) "page flush %#x" +sun4m_iommu_page_get_flags(uint64_t pa, uint64_t iopte, uint32_t ret) "get flags addr %#"PRIx64" => pte %#"PRIx64", *pte = %#x" +sun4m_iommu_translate_pa(uint64_t addr, uint64_t pa, uint32_t iopte) "xlate dva %#"PRIx64" => pa %#"PRIx64" iopte = %#x" +sun4m_iommu_bad_addr(uint64_t addr) "bad addr %#"PRIx64 # hw/dma/i8257.c i8257_unregistered_dma(int nchan, int dma_pos, int dma_len) "unregistered DMA channel used nchan=%d dma_pos=%d dma_len=%d"
hw/i386/trace-events +80 -80
192 lines not on this page · raw message
hw/i386/xen/trace-events +2 -2
@@ -2,8 +2,8 @@ xen_platform_log(char *s) "xen platform: %s" # hw/i386/xen/xen_pvdevice.c -xen_pv_mmio_read(uint64_t addr) "WARNING: read from Xen PV Device MMIO space (address %"PRIx64")" -xen_pv_mmio_write(uint64_t addr) "WARNING: write to Xen PV Device MMIO space (address %"PRIx64")" +xen_pv_mmio_read(uint64_t addr) "WARNING: read from Xen PV Device MMIO space (address %#"PRIx64")" +xen_pv_mmio_write(uint64_t addr) "WARNING: write to Xen PV Device MMIO space (address %#"PRIx64")" # xen-hvm.c xen_ram_alloc(unsigned long ram_addr, unsigned long size) "requested: %#lx, size %#lx"
hw/input/trace-events +2 -2
@@ -16,8 +16,8 @@ ps2_kbd_init(void *s) "%p" ps2_mouse_init(void *s) "%p" # hw/input/milkymist-softusb.c -milkymist_softusb_memory_read(uint32_t addr, uint32_t value) "addr %08x value %08x" -milkymist_softusb_memory_write(uint32_t addr, uint32_t value) "addr %08x value %08x" +milkymist_softusb_memory_read(uint32_t addr, uint32_t value) "addr %#08x value %#08x" +milkymist_softusb_memory_write(uint32_t addr, uint32_t value) "addr %#08x value %#08x" milkymist_softusb_mevt(uint8_t m) "m %d" milkymist_softusb_kevt(uint8_t m) "m %d" milkymist_softusb_pulse_irq(void) "Pulse IRQ"
hw/intc/trace-events +96 -96
251 lines not on this page · raw message
hw/isa/trace-events +6 -6
@@ -1,9 +1,9 @@ # See docs/tracing.txt for syntax documentation. # hw/isa/pc87312.c -pc87312_io_read(uint32_t addr, uint32_t val) "read addr=%x val=%x" -pc87312_io_write(uint32_t addr, uint32_t val) "write addr=%x val=%x" -pc87312_info_floppy(uint32_t base) "base 0x%x" -pc87312_info_ide(uint32_t base) "base 0x%x" -pc87312_info_parallel(uint32_t base, uint32_t irq) "base 0x%x, irq %u" -pc87312_info_serial(int n, uint32_t base, uint32_t irq) "id=%d, base 0x%x, irq %u" +pc87312_io_read(uint32_t addr, uint32_t val) "read addr=%#x val=%#x" +pc87312_io_write(uint32_t addr, uint32_t val) "write addr=%#x val=%#x" +pc87312_info_floppy(uint32_t base) "base %#x" +pc87312_info_ide(uint32_t base) "base %#x" +pc87312_info_parallel(uint32_t base, uint32_t irq) "base %#x, irq %u" +pc87312_info_serial(int n, uint32_t base, uint32_t irq) "id=%d, base %#x, irq %u"
hw/mem/trace-events +1 -1
@@ -2,4 +2,4 @@ # hw/mem/pc-dimm.c mhp_pc_dimm_assigned_slot(int slot) "%d" -mhp_pc_dimm_assigned_address(uint64_t addr) "0x%"PRIx64 +mhp_pc_dimm_assigned_address(uint64_t addr) "%#"PRIx64
hw/misc/trace-events +44 -44
107 lines not on this page · raw message
hw/net/trace-events +107 -107
354 lines not on this page · raw message
hw/nvram/trace-events +3 -3
@@ -1,10 +1,10 @@ # See docs/tracing.txt for syntax documentation. # hw/nvram/ds1225y.c -nvram_read(uint32_t addr, uint32_t ret) "read addr %d: 0x%02x" -nvram_write(uint32_t addr, uint32_t old, uint32_t val) "write addr %d: 0x%02x -> 0x%02x" +nvram_read(uint32_t addr, uint32_t ret) "read addr %d: %#02x" +nvram_write(uint32_t addr, uint32_t old, uint32_t val) "write addr %d: %#02x -> %#02x" # hw/nvram/fw_cfg.c fw_cfg_select(void *s, uint16_t key, int ret) "%p key %d = %d" -fw_cfg_read(void *s, uint64_t ret) "%p = %"PRIx64 +fw_cfg_read(void *s, uint64_t ret) "%p = %#"PRIx64 fw_cfg_add_file(void *s, int index, char *name, size_t len) "%p #%d: %s (%zd bytes)"
hw/pci/trace-events +4 -4
@@ -1,12 +1,12 @@ # See docs/tracing.txt for syntax documentation. # hw/pci/pci.c -pci_update_mappings_del(void *d, uint32_t bus, uint32_t slot, uint32_t func, int bar, uint64_t addr, uint64_t size) "d=%p %02x:%02x.%x %d,%#"PRIx64"+%#"PRIx64 -pci_update_mappings_add(void *d, uint32_t bus, uint32_t slot, uint32_t func, int bar, uint64_t addr, uint64_t size) "d=%p %02x:%02x.%x %d,%#"PRIx64"+%#"PRIx64 +pci_update_mappings_del(void *d, uint32_t bus, uint32_t slot, uint32_t func, int bar, uint64_t addr, uint64_t size) "d=%p %#02x:%#02x.%#x %d,%#"PRIx64"+%#"PRIx64 +pci_update_mappings_add(void *d, uint32_t bus, uint32_t slot, uint32_t func, int bar, uint64_t addr, uint64_t size) "d=%p %#02x:%#02x.%#x %d,%#"PRIx64"+%#"PRIx64 # hw/pci/pci_host.c -pci_cfg_read(const char *dev, unsigned devid, unsigned fnid, unsigned offs, unsigned val) "%s %02u:%u @0x%x -> 0x%x" -pci_cfg_write(const char *dev, unsigned devid, unsigned fnid, unsigned offs, unsigned val) "%s %02u:%u @0x%x <- 0x%x" +pci_cfg_read(const char *dev, unsigned devid, unsigned fnid, unsigned offs, unsigned val) "%s %02u:%u @%#x -> %#x" +pci_cfg_write(const char *dev, unsigned devid, unsigned fnid, unsigned offs, unsigned val) "%s %02u:%u @%#x <- %#x" # hw/pci/msix.c msix_write_config(char *name, bool enabled, bool masked) "dev %s enabled %d masked %d"
hw/ppc/trace-events +63 -63
160 lines not on this page · raw message
hw/s390x/trace-events +10 -10
@@ -2,15 +2,15 @@ # hw/s390x/css.c css_enable_facility(const char *facility) "CSS: enable %s" -css_crw(uint8_t rsc, uint8_t erc, uint16_t rsid, const char *chained) "CSS: queueing crw: rsc=%x, erc=%x, rsid=%x %s" -css_chpid_add(uint8_t cssid, uint8_t chpid, uint8_t type) "CSS: add chpid %x.%02x (type %02x)" -css_new_image(uint8_t cssid, const char *default_cssid) "CSS: add css image %02x %s" -css_assign_subch(const char *do_assign, uint8_t cssid, uint8_t ssid, uint16_t schid, uint16_t devno) "CSS: %s %x.%x.%04x (devno %04x)" -css_io_interrupt(int cssid, int ssid, int schid, uint32_t intparm, uint8_t isc, const char *conditional) "CSS: I/O interrupt on sch %x.%x.%04x (intparm %08x, isc %x) %s" -css_adapter_interrupt(uint8_t isc) "CSS: adapter I/O interrupt (isc %x)" -css_do_sic(uint16_t mode, uint8_t isc) "CSS: set interruption mode %x on isc %x" +css_crw(uint8_t rsc, uint8_t erc, uint16_t rsid, const char *chained) "CSS: queueing crw: rsc=%#x, erc=%#x, rsid=%#x %s" +css_chpid_add(uint8_t cssid, uint8_t chpid, uint8_t type) "CSS: add chpid %#x.%#02x (type %#02x)" +css_new_image(uint8_t cssid, const char *default_cssid) "CSS: add css image %#02x %s" +css_assign_subch(const char *do_assign, uint8_t cssid, uint8_t ssid, uint16_t schid, uint16_t devno) "CSS: %s %#x.%#x.%#04x (devno %#04x)" +css_io_interrupt(int cssid, int ssid, int schid, uint32_t intparm, uint8_t isc, const char *conditional) "CSS: I/O interrupt on sch %#x.%#x.%#04x (intparm %#08x, isc %#x) %s" +css_adapter_interrupt(uint8_t isc) "CSS: adapter I/O interrupt (isc %#x)" +css_do_sic(uint16_t mode, uint8_t isc) "CSS: set interruption mode %#x on isc %#x" # hw/s390x/virtio-ccw.c -virtio_ccw_interpret_ccw(int cssid, int ssid, int schid, int cmd_code) "VIRTIO-CCW: %x.%x.%04x: interpret command %x" -virtio_ccw_new_device(int cssid, int ssid, int schid, int devno, const char *devno_mode) "VIRTIO-CCW: add subchannel %x.%x.%04x, devno %04x (%s)" -virtio_ccw_set_ind(uint64_t ind_loc, uint8_t ind_old, uint8_t ind_new) "VIRTIO-CCW: indicator at %" PRIu64 ": %x->%x" +virtio_ccw_interpret_ccw(int cssid, int ssid, int schid, int cmd_code) "VIRTIO-CCW: %#x.%#x.%#04x: interpret command %#x" +virtio_ccw_new_device(int cssid, int ssid, int schid, int devno, const char *devno_mode) "VIRTIO-CCW: add subchannel %#x.%#x.%#04x, devno %#04x (%s)" +virtio_ccw_set_ind(uint64_t ind_loc, uint8_t ind_old, uint8_t ind_new) "VIRTIO-CCW: indicator at %" PRIu64 ": %#x->%#x"
hw/scsi/trace-events +116 -116
323 lines not on this page · raw message
hw/sd/trace-events +2 -2
@@ -1,5 +1,5 @@ # See docs/tracing.txt for syntax documentation. # hw/sd/milkymist-memcard.c -milkymist_memcard_memory_read(uint32_t addr, uint32_t value) "addr %08x value %08x" -milkymist_memcard_memory_write(uint32_t addr, uint32_t value) "addr %08x value %08x" +milkymist_memcard_memory_read(uint32_t addr, uint32_t value) "addr %#08x value %#08x" +milkymist_memcard_memory_write(uint32_t addr, uint32_t value) "addr %#08x value %#08x"
hw/timer/trace-events +25 -25
81 lines not on this page · raw message
hw/usb/trace-events +98 -98
303 lines not on this page · raw message
hw/vfio/trace-events +51 -51
166 lines not on this page · raw message
hw/virtio/trace-events +3 -3
@@ -20,8 +20,8 @@ virtio_rng_vm_state_change(void *rng, int running, int state) "rng %p: state cha # hw/virtio/virtio-balloon.c # -virtio_balloon_bad_addr(uint64_t gpa) "%"PRIx64 -virtio_balloon_handle_output(const char *name, uint64_t gpa) "section name: %s gpa: %"PRIx64 +virtio_balloon_bad_addr(uint64_t gpa) "%#"PRIx64 +virtio_balloon_handle_output(const char *name, uint64_t gpa) "section name: %s gpa: %#"PRIx64 virtio_balloon_get_config(uint32_t num_pages, uint32_t actual) "num_pages: %d actual: %d" virtio_balloon_set_config(uint32_t actual, uint32_t oldactual) "actual: %d oldactual: %d" -virtio_balloon_to_target(uint64_t target, uint32_t num_pages) "balloon target: %"PRIx64" num_pages: %d" +virtio_balloon_to_target(uint64_t target, uint32_t num_pages) "balloon target: %#"PRIx64" num_pages: %d"
hw/xen/trace-events +2 -2
@@ -9,6 +9,6 @@ xen_map_mmio_range(uint32_t id, uint64_t start_addr, uint64_t end_addr) "id: %u xen_unmap_mmio_range(uint32_t id, uint64_t start_addr, uint64_t end_addr) "id: %u start: %#"PRIx64" end: %#"PRIx64 xen_map_portio_range(uint32_t id, uint64_t start_addr, uint64_t end_addr) "id: %u start: %#"PRIx64" end: %#"PRIx64 xen_unmap_portio_range(uint32_t id, uint64_t start_addr, uint64_t end_addr) "id: %u start: %#"PRIx64" end: %#"PRIx64 -xen_map_pcidev(uint32_t id, uint8_t bus, uint8_t dev, uint8_t func) "id: %u bdf: %02x.%02x.%02x" -xen_unmap_pcidev(uint32_t id, uint8_t bus, uint8_t dev, uint8_t func) "id: %u bdf: %02x.%02x.%02x" +xen_map_pcidev(uint32_t id, uint8_t bus, uint8_t dev, uint8_t func) "id: %u bdf: %#02x.%#02x.%#02x" +xen_unmap_pcidev(uint32_t id, uint8_t bus, uint8_t dev, uint8_t func) "id: %u bdf: %#02x.%#02x.%#02x" xen_domid_restrict(int err) "err: %u"
linux-user/trace-events +5 -5
@@ -1,12 +1,12 @@ # See docs/tracing.txt for syntax documentation. # linux-user/signal.c -user_setup_frame(void *env, uint64_t frame_addr) "env=%p frame_addr=%"PRIx64 -user_setup_rt_frame(void *env, uint64_t frame_addr) "env=%p frame_addr=%"PRIx64 -user_do_rt_sigreturn(void *env, uint64_t frame_addr) "env=%p frame_addr=%"PRIx64 -user_do_sigreturn(void *env, uint64_t frame_addr) "env=%p frame_addr=%"PRIx64 +user_setup_frame(void *env, uint64_t frame_addr) "env=%p frame_addr=%#"PRIx64 +user_setup_rt_frame(void *env, uint64_t frame_addr) "env=%p frame_addr=%#"PRIx64 +user_do_rt_sigreturn(void *env, uint64_t frame_addr) "env=%p frame_addr=%#"PRIx64 +user_do_sigreturn(void *env, uint64_t frame_addr) "env=%p frame_addr=%#"PRIx64 user_force_sig(void *env, int target_sig, int host_sig) "env=%p signal %d (host %d)" user_handle_signal(void *env, int target_sig) "env=%p signal %d" user_host_signal(void *env, int host_sig, int target_sig) "env=%p signal %d (target %d(" user_queue_signal(void *env, int target_sig) "env=%p signal %d" -user_s390x_restore_sigregs(void *env, uint64_t sc_psw_addr, uint64_t env_psw_addr) "env=%p frame psw.addr %"PRIx64 " current psw.addr %"PRIx64 +user_s390x_restore_sigregs(void *env, uint64_t sc_psw_addr, uint64_t env_psw_addr) "env=%p frame psw.addr %#"PRIx64 " current psw.addr %#"PRIx64
migration/trace-events +23 -23
109 lines not on this page · raw message
nbd/trace-events +16 -16
@@ -1,12 +1,12 @@ # nbd/client.c nbd_unknown_error(int err) "Squashing unexpected error %d to EINVAL" nbd_send_option_request(uint32_t opt, const char *name, uint32_t len) "Sending option request %" PRIu32" (%s), len %" PRIu32 -nbd_receive_option_reply(uint32_t option, const char *optname, uint32_t type, const char *typename, uint32_t length) "Received option reply %" PRIx32" (%s), type %" PRIx32" (%s), len %" PRIu32 -nbd_reply_err_unsup(uint32_t option, const char *name) "server doesn't understand request %" PRIx32 " (%s), attempting fallback" +nbd_receive_option_reply(uint32_t option, const char *optname, uint32_t type, const char *typename, uint32_t length) "Received option reply %#" PRIx32" (%s), type %#" PRIx32" (%s), len %" PRIu32 +nbd_reply_err_unsup(uint32_t option, const char *name) "server doesn't understand request %#" PRIx32 " (%s), attempting fallback" nbd_opt_go_start(const char *name) "Attempting NBD_OPT_GO for export '%s'" nbd_opt_go_success(void) "Export is good to go" nbd_opt_go_info_unknown(int info, const char *name) "Ignoring unknown info %d (%s)" -nbd_opt_go_info_block_size(uint32_t minimum, uint32_t preferred, uint32_t maximum) "Block sizes are 0x%" PRIx32 ", 0x%" PRIx32 ", 0x%" PRIx32 +nbd_opt_go_info_block_size(uint32_t minimum, uint32_t preferred, uint32_t maximum) "Block sizes are %#" PRIx32 ", %#" PRIx32 ", %#" PRIx32 nbd_receive_query_exports_start(const char *wantname) "Querying export list for '%s'" nbd_receive_query_exports_success(const char *wantname) "Found desired export name '%s'" nbd_receive_starttls_request(void) "Requesting TLS from server"
@@ -14,10 +14,10 @@ nbd_receive_starttls_reply(void) "Getting TLS reply from server" nbd_receive_starttls_new_client(void) "TLS request approved, setting up TLS" nbd_receive_starttls_tls_handshake(void) "Starting TLS handshake" nbd_receive_negotiate(void *tlscreds, const char *hostname) "Receiving negotiation tlscreds=%p hostname=%s" -nbd_receive_negotiate_magic(uint64_t magic) "Magic is 0x%" PRIx64 -nbd_receive_negotiate_server_flags(uint32_t globalflags) "Global flags are %" PRIx32 +nbd_receive_negotiate_magic(uint64_t magic) "Magic is %#" PRIx64 +nbd_receive_negotiate_server_flags(uint32_t globalflags) "Global flags are %#" PRIx32 nbd_receive_negotiate_default_name(void) "Using default NBD export name \"\"" -nbd_receive_negotiate_size_flags(uint64_t size, uint16_t flags) "Size is %" PRIu64 ", export flags %" PRIx16 +nbd_receive_negotiate_size_flags(uint64_t size, uint16_t flags) "Size is %" PRIu64 ", export flags %#" PRIx16 nbd_init_set_socket(void) "Setting NBD socket" nbd_init_set_block_size(unsigned long block_size) "Setting block size to %lu" nbd_init_set_size(unsigned long sectors) "Setting size to %lu block(s)"
@@ -28,11 +28,11 @@ nbd_client_loop(void) "Doing NBD loop" nbd_client_loop_ret(int ret, const char *error) "NBD loop returned %d: %s" nbd_client_clear_queue(void) "Clearing NBD queue" nbd_client_clear_socket(void) "Clearing NBD socket" -nbd_send_request(uint64_t from, uint32_t len, uint64_t handle, uint16_t flags, uint16_t type, const char *name) "Sending request to server: { .from = %" PRIu64", .len = %" PRIu32 ", .handle = %" PRIu64 ", .flags = %" PRIx16 ", .type = %" PRIu16 " (%s) }" -nbd_receive_reply(uint32_t magic, int32_t error, uint64_t handle) "Got reply: { magic = 0x%" PRIx32 ", .error = % " PRId32 ", handle = %" PRIu64" }" +nbd_send_request(uint64_t from, uint32_t len, uint64_t handle, uint16_t flags, uint16_t type, const char *name) "Sending request to server: { .from = %" PRIu64", .len = %" PRIu32 ", .handle = %" PRIu64 ", .flags = %#" PRIx16 ", .type = %" PRIu16 " (%s) }" +nbd_receive_reply(uint32_t magic, int32_t error, uint64_t handle) "Got reply: { magic = %#" PRIx32 ", .error = % " PRId32 ", handle = %" PRIu64" }" # nbd/server.c -nbd_negotiate_send_rep_len(uint32_t opt, const char *optname, uint32_t type, const char *typename, uint32_t len) "Reply opt=%" PRIx32 " (%s), type=%" PRIx32 " (%s), len=%" PRIu32 +nbd_negotiate_send_rep_len(uint32_t opt, const char *optname, uint32_t type, const char *typename, uint32_t len) "Reply opt=%#" PRIx32 " (%s), type=%#" PRIx32 " (%s), len=%" PRIu32 nbd_negotiate_send_rep_err(const char *msg) "sending error message \"%s\"" nbd_negotiate_send_rep_list(const char *name, const char *desc) "Advertising export name '%s' description '%s'" nbd_negotiate_handle_export_name(void) "Checking length"
@@ -40,17 +40,17 @@ nbd_negotiate_handle_export_name_request(const char *name) "Client requested exp nbd_negotiate_send_info(int info, const char *name, uint32_t length) "Sending NBD_REP_INFO type %d (%s) with remaining length %" PRIu32 nbd_negotiate_handle_info_requests(int requests) "Client requested %d items of info" nbd_negotiate_handle_info_request(int request, const char *name) "Client requested info %d (%s)" -nbd_negotiate_handle_info_block_size(uint32_t minimum, uint32_t preferred, uint32_t maximum) "advertising minimum 0x%" PRIx32 ", preferred 0x%" PRIx32 ", maximum 0x%" PRIx32 +nbd_negotiate_handle_info_block_size(uint32_t minimum, uint32_t preferred, uint32_t maximum) "advertising minimum %#" PRIx32 ", preferred %#" PRIx32 ", maximum %#" PRIx32 nbd_negotiate_handle_starttls(void) "Setting up TLS" nbd_negotiate_handle_starttls_handshake(void) "Starting TLS handshake" -nbd_negotiate_options_flags(uint32_t flags) "Received client flags 0x%" PRIx32 -nbd_negotiate_options_check_magic(uint64_t magic) "Checking opts magic 0x%" PRIx64 -nbd_negotiate_options_check_option(uint32_t option, const char *name) "Checking option 0x%" PRIx32 " (%s)" +nbd_negotiate_options_flags(uint32_t flags) "Received client flags %#" PRIx32 +nbd_negotiate_options_check_magic(uint64_t magic) "Checking opts magic %#" PRIx64 +nbd_negotiate_options_check_option(uint32_t option, const char *name) "Checking option %#" PRIx32 " (%s)" nbd_negotiate_begin(void) "Beginning negotiation" -nbd_negotiate_old_style(uint64_t size, unsigned flags) "advertising size %" PRIu64 " and flags %x" -nbd_negotiate_new_style_size_flags(uint64_t size, unsigned flags) "advertising size %" PRIu64 " and flags %x" +nbd_negotiate_old_style(uint64_t size, unsigned flags) "advertising size %" PRIu64 " and flags %#x" +nbd_negotiate_new_style_size_flags(uint64_t size, unsigned flags) "advertising size %" PRIu64 " and flags %#x" nbd_negotiate_success(void) "Negotiation succeeded" -nbd_receive_request(uint32_t magic, uint16_t flags, uint16_t type, uint64_t from, uint32_t len) "Got request: { magic = 0x%" PRIx32 ", .flags = %" PRIx16 ", .type = %" PRIx16 ", from = %" PRIu64 ", len = %" PRIu32 " }" +nbd_receive_request(uint32_t magic, uint16_t flags, uint16_t type, uint64_t from, uint32_t len) "Got request: { magic = %#" PRIx32 ", .flags = %#" PRIx16 ", .type = %#" PRIx16 ", from = %" PRIu64 ", len = %" PRIu32 " }" nbd_send_reply(int32_t error, uint64_t handle) "Sending response to client: { .error = %" PRId32 ", handle = %" PRIu64 " }" nbd_blk_aio_attached(const char *name, void *ctx) "Export %s: Attaching clients to AIO context %p\n" nbd_blk_aio_detach(const char *name, void *ctx) "Export %s: Detaching clients from AIO context %p\n"
net/trace-events +2 -2
@@ -13,9 +13,9 @@ colo_compare_icmp_miscompare(const char *sta, int size) ": %s = %d" colo_compare_ip_info(int psize, const char *sta, const char *stb, int ssize, const char *stc, const char *std) "ppkt size = %d, ip_src = %s, ip_dst = %s, spkt size = %d, ip_src = %s, ip_dst = %s" colo_old_packet_check_found(int64_t old_time) "%" PRId64 colo_compare_miscompare(void) "" -colo_compare_tcp_info(const char *pkt, uint32_t seq, uint32_t ack, int res, uint32_t flag, int size) "side: %s seq/ack= %u/%u res= %d flags= %x pkt_size: %d\n" +colo_compare_tcp_info(const char *pkt, uint32_t seq, uint32_t ack, int res, uint32_t flag, int size) "side: %s seq/ack= %u/%u res= %d flags= %#x pkt_size: %d\n" # net/filter-rewriter.c colo_filter_rewriter_debug(void) "" -colo_filter_rewriter_pkt_info(const char *func, const char *src, const char *dst, uint32_t seq, uint32_t ack, uint32_t flag) "%s: src/dst: %s/%s p: seq/ack=%u/%u flags=%x\n" +colo_filter_rewriter_pkt_info(const char *func, const char *src, const char *dst, uint32_t seq, uint32_t ack, uint32_t flag) "%s: src/dst: %s/%s p: seq/ack=%u/%u flags=%#x\n" colo_filter_rewriter_conn_offset(uint32_t offset) ": offset=%u\n"
target/arm/trace-events +5 -5
@@ -1,10 +1,10 @@ # See docs/tracing.txt for syntax documentation. # target/arm/helper.c -arm_gt_recalc(int timer, int irqstate, uint64_t nexttick) "gt recalc: timer %d irqstate %d next tick %" PRIx64 +arm_gt_recalc(int timer, int irqstate, uint64_t nexttick) "gt recalc: timer %d irqstate %d next tick %#" PRIx64 arm_gt_recalc_disabled(int timer) "gt recalc: timer %d irqstate 0 timer disabled" -arm_gt_cval_write(int timer, uint64_t value) "gt_cval_write: timer %d value %" PRIx64 -arm_gt_tval_write(int timer, uint64_t value) "gt_tval_write: timer %d value %" PRIx64 -arm_gt_ctl_write(int timer, uint64_t value) "gt_ctl_write: timer %d value %" PRIx64 +arm_gt_cval_write(int timer, uint64_t value) "gt_cval_write: timer %d value %#" PRIx64 +arm_gt_tval_write(int timer, uint64_t value) "gt_tval_write: timer %d value %#" PRIx64 +arm_gt_ctl_write(int timer, uint64_t value) "gt_ctl_write: timer %d value %#" PRIx64 arm_gt_imask_toggle(int timer, int irqstate) "gt_ctl_write: timer %d IMASK toggle, new irqstate %d" -arm_gt_cntvoff_write(uint64_t value) "gt_cntvoff_write: value %" PRIx64 +arm_gt_cntvoff_write(uint64_t value) "gt_cntvoff_write: value %#" PRIx64
target/s390x/trace-events +3 -3
@@ -6,9 +6,9 @@ set_skeys_nonzero(int rc) "SKEY: Call to set_skeys unexpectedly returned %d" # target/s390x/ioinst.c ioinst(const char *insn) "IOINST: %s" -ioinst_sch_id(const char *insn, int cssid, int ssid, int schid) "IOINST: %s (%x.%x.%04x)" -ioinst_chp_id(const char *insn, int cssid, int chpid) "IOINST: %s (%x.%02x)" -ioinst_chsc_cmd(uint16_t cmd, uint16_t len) "IOINST: chsc command %04x, len %04x" +ioinst_sch_id(const char *insn, int cssid, int ssid, int schid) "IOINST: %s (%#x.%#x.%#04x)" +ioinst_chp_id(const char *insn, int cssid, int chpid) "IOINST: %s (%#x.%#02x)" +ioinst_chsc_cmd(uint16_t cmd, uint16_t len) "IOINST: chsc command %#04x, len %#04x" # target/s390x/kvm.c kvm_enable_cmma(int rc) "CMMA: enabling with result code %d"
target/sparc/trace-events +15 -15
@@ -1,28 +1,28 @@ # See docs/tracing.txt for syntax documentation. # target/sparc/mmu_helper.c -mmu_helper_dfault(uint64_t address, uint64_t context, int mmu_idx, uint32_t tl) "DFAULT at %"PRIx64" context %"PRIx64" mmu_idx=%d tl=%d" -mmu_helper_dprot(uint64_t address, uint64_t context, int mmu_idx, uint32_t tl) "DPROT at %"PRIx64" context %"PRIx64" mmu_idx=%d tl=%d" -mmu_helper_dmiss(uint64_t address, uint64_t context) "DMISS at %"PRIx64" context %"PRIx64 -mmu_helper_tfault(uint64_t address, uint64_t context) "TFAULT at %"PRIx64" context %"PRIx64 -mmu_helper_tmiss(uint64_t address, uint64_t context) "TMISS at %"PRIx64" context %"PRIx64 -mmu_helper_get_phys_addr_code(uint32_t tl, int mmu_idx, uint64_t prim_context, uint64_t sec_context, uint64_t address) "tl=%d mmu_idx=%d primary context=%"PRIx64" secondary context=%"PRIx64" address=%"PRIx64 -mmu_helper_get_phys_addr_data(uint32_t tl, int mmu_idx, uint64_t prim_context, uint64_t sec_context, uint64_t address) "tl=%d mmu_idx=%d primary context=%"PRIx64" secondary context=%"PRIx64" address=%"PRIx64 -mmu_helper_mmu_fault(uint64_t address, uint64_t paddr, int mmu_idx, uint32_t tl, uint64_t prim_context, uint64_t sec_context) "Translate at %"PRIx64" -> %"PRIx64", mmu_idx=%d tl=%d primary context=%"PRIx64" secondary context=%"PRIx64 +mmu_helper_dfault(uint64_t address, uint64_t context, int mmu_idx, uint32_t tl) "DFAULT at %#"PRIx64" context %#"PRIx64" mmu_idx=%d tl=%d" +mmu_helper_dprot(uint64_t address, uint64_t context, int mmu_idx, uint32_t tl) "DPROT at %#"PRIx64" context %#"PRIx64" mmu_idx=%d tl=%d" +mmu_helper_dmiss(uint64_t address, uint64_t context) "DMISS at %#"PRIx64" context %#"PRIx64 +mmu_helper_tfault(uint64_t address, uint64_t context) "TFAULT at %#"PRIx64" context %#"PRIx64 +mmu_helper_tmiss(uint64_t address, uint64_t context) "TMISS at %#"PRIx64" context %#"PRIx64 +mmu_helper_get_phys_addr_code(uint32_t tl, int mmu_idx, uint64_t prim_context, uint64_t sec_context, uint64_t address) "tl=%d mmu_idx=%d primary context=%#"PRIx64" secondary context=%#"PRIx64" address=%#"PRIx64 +mmu_helper_get_phys_addr_data(uint32_t tl, int mmu_idx, uint64_t prim_context, uint64_t sec_context, uint64_t address) "tl=%d mmu_idx=%d primary context=%#"PRIx64" secondary context=%#"PRIx64" address=%#"PRIx64 +mmu_helper_mmu_fault(uint64_t address, uint64_t paddr, int mmu_idx, uint32_t tl, uint64_t prim_context, uint64_t sec_context) "Translate at %#"PRIx64" -> %#"PRIx64", mmu_idx=%d tl=%d primary context=%#"PRIx64" secondary context=%#"PRIx64 # target/sparc/int64_helper.c -int_helper_set_softint(uint32_t softint) "new %08x" -int_helper_clear_softint(uint32_t softint) "new %08x" -int_helper_write_softint(uint32_t softint) "new %08x" +int_helper_set_softint(uint32_t softint) "new %#08x" +int_helper_clear_softint(uint32_t softint) "new %#08x" +int_helper_write_softint(uint32_t softint) "new %#08x" # target/sparc/int32_helper.c int_helper_icache_freeze(void) "Instruction cache: freeze" int_helper_dcache_freeze(void) "Data cache: freeze" # target/sparc/win_helper.c -win_helper_gregset_error(uint32_t pstate) "ERROR in get_gregset: active pstate bits=%x" -win_helper_switch_pstate(uint32_t pstate_regs, uint32_t new_pstate_regs) "change_pstate: switching regs old=%x new=%x" -win_helper_no_switch_pstate(uint32_t new_pstate_regs) "change_pstate: regs new=%x (unchanged)" -win_helper_wrpil(uint32_t psrpil, uint32_t new_pil) "old=%x new=%x" +win_helper_gregset_error(uint32_t pstate) "ERROR in get_gregset: active pstate bits=%#x" +win_helper_switch_pstate(uint32_t pstate_regs, uint32_t new_pstate_regs) "change_pstate: switching regs old=%#x new=%#x" +win_helper_no_switch_pstate(uint32_t new_pstate_regs) "change_pstate: regs new=%#x (unchanged)" +win_helper_wrpil(uint32_t psrpil, uint32_t new_pil) "old=%#x new=%#x" win_helper_done(uint32_t tl) "tl=%d" win_helper_retry(uint32_t tl) "tl=%d"
trace-events +3 -3
@@ -106,7 +106,7 @@ vcpu guest_cpu_reset(void) # # Mode: user, softmmu # Targets: TCG(all) -vcpu tcg guest_mem_before(TCGv vaddr, uint8_t info) "info=%d", "vaddr=0x%016"PRIx64" info=%d" +vcpu tcg guest_mem_before(TCGv vaddr, uint8_t info) "info=%d", "vaddr=%#016"PRIx64" info=%d" # @num: System call number. # @arg*: System call argument value.
@@ -115,7 +115,7 @@ vcpu tcg guest_mem_before(TCGv vaddr, uint8_t info) "info=%d", "vaddr=0x%016"PRI # # Mode: user # Targets: TCG(all) -vcpu guest_user_syscall(uint64_t num, uint64_t arg1, uint64_t arg2, uint64_t arg3, uint64_t arg4, uint64_t arg5, uint64_t arg6, uint64_t arg7, uint64_t arg8) "num=0x%016"PRIx64" arg1=0x%016"PRIx64" arg2=0x%016"PRIx64" arg3=0x%016"PRIx64" arg4=0x%016"PRIx64" arg5=0x%016"PRIx64" arg6=0x%016"PRIx64" arg7=0x%016"PRIx64" arg8=0x%016"PRIx64 +vcpu guest_user_syscall(uint64_t num, uint64_t arg1, uint64_t arg2, uint64_t arg3, uint64_t arg4, uint64_t arg5, uint64_t arg6, uint64_t arg7, uint64_t arg8) "num=%#016"PRIx64" arg1=%#016"PRIx64" arg2=%#016"PRIx64" arg3=%#016"PRIx64" arg4=%#016"PRIx64" arg5=%#016"PRIx64" arg6=%#016"PRIx64" arg7=%#016"PRIx64" arg8=%#016"PRIx64 # @num: System call number. # @ret: System call result value.
@@ -124,4 +124,4 @@ vcpu guest_user_syscall(uint64_t num, uint64_t arg1, uint64_t arg2, uint64_t arg # # Mode: user # Targets: TCG(all) -vcpu guest_user_syscall_ret(uint64_t num, uint64_t ret) "num=0x%016"PRIx64" ret=0x%016"PRIx64 +vcpu guest_user_syscall_ret(uint64_t num, uint64_t ret) "num=%#016"PRIx64" ret=%#016"PRIx64
ui/trace-events +8 -8
@@ -8,7 +8,7 @@ console_txt_new(int w, int h) "%dx%d" console_select(int nr) "%d" console_refresh(int interval) "interval %d ms" displaysurface_create(void *display_surface, int w, int h) "surface=%p, %dx%d" -displaysurface_create_from(void *display_surface, int w, int h, uint32_t format) "surface=%p, %dx%d, format 0x%x" +displaysurface_create_from(void *display_surface, int w, int h, uint32_t format) "surface=%p, %dx%d, format %#x" displaysurface_create_pixman(void *display_surface) "surface=%p" displaysurface_free(void *display_surface) "surface=%p" displaychangelistener_register(void *dcl, const char *name) "%p [ %s ]"
@@ -25,22 +25,22 @@ gd_ungrab(const char *tab, const char *device) "tab=%s, dev=%s" # ui/vnc.c vnc_key_guest_leds(bool caps, bool num, bool scroll) "caps %d, num %d, scroll %d" vnc_key_map_init(const char *layout) "%s" -vnc_key_event_ext(bool down, int sym, int keycode, const char *name) "down %d, sym 0x%x, keycode 0x%x [%s]" -vnc_key_event_map(bool down, int sym, int keycode, const char *name) "down %d, sym 0x%x -> keycode 0x%x [%s]" +vnc_key_event_ext(bool down, int sym, int keycode, const char *name) "down %d, sym %#x, keycode %#x [%s]" +vnc_key_event_map(bool down, int sym, int keycode, const char *name) "down %d, sym %#x -> keycode %#x [%s]" vnc_key_sync_numlock(bool on) "%d" vnc_key_sync_capslock(bool on) "%d" # ui/input.c -input_event_key_number(int conidx, int number, const char *qcode, bool down) "con %d, key number 0x%x [%s], down %d" +input_event_key_number(int conidx, int number, const char *qcode, bool down) "con %d, key number %#x [%s], down %d" input_event_key_qcode(int conidx, const char *qcode, bool down) "con %d, key qcode %s, down %d" input_event_btn(int conidx, const char *btn, bool down) "con %d, button %s, down %d" input_event_rel(int conidx, const char *axis, int value) "con %d, axis %s, value %d" -input_event_abs(int conidx, const char *axis, int value) "con %d, axis %s, value 0x%x" +input_event_abs(int conidx, const char *axis, int value) "con %d, axis %s, value %#x" input_event_sync(void) "" input_mouse_mode(int absolute) "absolute %d" # ui/spice-display.c -qemu_spice_add_memslot(int qid, uint32_t slot_id, unsigned long virt_start, unsigned long virt_end, int async) "%d %u: host virt 0x%lx - 0x%lx async=%d" +qemu_spice_add_memslot(int qid, uint32_t slot_id, unsigned long virt_start, unsigned long virt_end, int async) "%d %u: host virt %#lx - %#lx async=%d" qemu_spice_del_memslot(int qid, uint32_t gid, uint32_t slot_id) "%d gid=%u sid=%u" qemu_spice_create_primary_surface(int qid, uint32_t sid, void *surface, int async) "%d sid=%u surface=%p async=%d" qemu_spice_destroy_primary_surface(int qid, uint32_t sid, int async) "%d sid=%u async=%d"
@@ -49,5 +49,5 @@ qemu_spice_create_update(uint32_t left, uint32_t right, uint32_t top, uint32_t b # ui/keymaps.c keymap_parse(const char *file) "file %s" -keymap_add(const char *type, int sym, int code, const char *line) "%-6s sym=0x%04x code=0x%04x (line: %s)" -keymap_unmapped(int sym) "sym=0x%04x" +keymap_add(const char *type, int sym, int code, const char *line) "%-6s sym=%#04x code=%#04x (line: %s)" +keymap_unmapped(int sym) "sym=%#04x"
util/trace-events +1 -1
@@ -42,7 +42,7 @@ qemu_vfree(void *ptr) "ptr %p" qemu_anon_ram_free(void *ptr, size_t size) "ptr %p size %zu" # util/hbitmap.c -hbitmap_iter_skip_words(const void *hb, void *hbi, uint64_t pos, unsigned long cur) "hb %p hbi %p pos %"PRId64" cur 0x%lx" +hbitmap_iter_skip_words(const void *hb, void *hbi, uint64_t pos, unsigned long cur) "hb %p hbi %p pos %"PRId64" cur %#lx" hbitmap_reset(void *hb, uint64_t start, uint64_t count, uint64_t sbit, uint64_t ebit) "hb %p items %"PRIu64",%"PRIu64" bits %"PRIu64"..%"PRIu64 hbitmap_set(void *hb, uint64_t start, uint64_t count, uint64_t sbit, uint64_t ebit) "hb %p items %"PRIu64",%"PRIu64" bits %"PRIu64"..%"PRIu64
Signature · 1 line
2.11.1
Quoted 5 lines · Vladimir Sementsov-Ogievskiy
To make logs more readable prefix all hex values with '0x' mark. This is needed for consistency too, as a lot of hex values are already prefixed with '0x'. Also, bring all hex outputs to the common form - use '%#', not '0x%'.
Quoted 7 lines
This patch is done by two commands:
find . -name trace-events | \
xargs sed -i 's/%\([-+ *.0-9]*\([hljztL]\|ll\|hh\)\?\(x\|X\|"\s*PRIx\)\)/%#\1/g'
find . -name trace-events | xargs sed -i 's/0x%#/%#/g'Signed-off-by Vladimir Sementsov-Ogievskiy <[email protected]>---
There seem to be an order of magnitude more trace format strings using 0x% rather than %#, so maybe converting in the other direction would be better? I think the patch would also be easier to review if the "no change to the printed value" switches between 0x% and %# were not in the same patch as "changing the printed value which didn't have an 0x before".
thanks
-- PMM
Quoted 21 lines · Peter Maydell
Quoted 5 lines · Vladimir Sementsov-Ogievskiy
To make logs more readable prefix all hex values with '0x' mark. This is needed for consistency too, as a lot of hex values are already prefixed with '0x'. Also, bring all hex outputs to the common form - use '%#', not '0x%'.
Quoted 7 lines
This patch is done by two commands:
find . -name trace-events | \
xargs sed -i 's/%\([-+ *.0-9]*\([hljztL]\|ll\|hh\)\?\(x\|X\|"\s*PRIx\)\)/%#\1/g'
find . -name trace-events | xargs sed -i 's/0x%#/%#/g'Signed-off-by Vladimir Sementsov-Ogievskiy <[email protected]>---
There seem to be an order of magnitude more trace format strings using 0x% rather than %#, so maybe converting in the other direction would be better? I think the patch would also be easier to review if the "no change to the printed value" switches between 0x% and %# were not in the same patch as "changing the printed value which didn't have an 0x before".
Quoted 2 lines
thanks
-- PMM
I thought that '%#' is cooler as it uses a feature of printf. However
this feature looks not very popular, therefore '0x%' is clearer. So if more people are comfortable with '0x%' let's use it.. One more vote here?
Will split into two patches anyway.
Signature · 2 lines
Best regards, Vladimir
Quoted 10 lines · Peter Maydell
Quoted 8 lines · Vladimir Sementsov-Ogievskiy
To make logs more readable prefix all hex values with '0x' mark. This is needed for consistency too, as a lot of hex values are already prefixed with '0x'. Also, bring all hex outputs to the common form - use '%#', not '0x%'.
This patch is done by two commands:
find . -name trace-events | \
xargs sed -i 's/%\([-+ *.0-9]*\([hljztL]\|ll\|hh\)\?\(x\|X\|"\s*PRIx\)\)/%#\1/g'
Why PRIx32 but not PRIX32?
Quoted 9 lines
Quoted 4 lines
find . -name trace-events | xargs sed -i 's/0x%#/%#/g'
Signed-off-by Vladimir Sementsov-Ogievskiy <[email protected]>---
There seem to be an order of magnitude more trace format strings using 0x% rather than %#, so maybe converting in the other direction would be better? I think the patch would also be easier to review if the "no change to the printed value" switches between 0x% and %#
Umm, 0x%x and %#x are not identical. The difference is visible when printing 0; the former produces 0x0 while the latter produces 0.
Fortunately, both forms are unambiguous, and the point of this exercise is to make it unambiguous when a value must be read as hex to be interpreted correctly. I kind of like %#x, but agree that it is not as commonly used; and from the consistency standpoint, seeing a series of traces that report 0x0 vs. 0x1 is nicer than 0 vs 0x1.
Quoted 2 lines
were not in the same patch as "changing the printed value which didn't have an 0x before".
I definitely agree with this advice of splitting things.
Quoted 5 lines
thanks
-- PMM
Signature · 3 lines
Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org
Quoted 8 lines · Eric Blake
Quoted 7 lines · Peter Maydell
Quoted 5 lines · Vladimir Sementsov-Ogievskiy
To make logs more readable prefix all hex values with '0x' mark. This is needed for consistency too, as a lot of hex values are already prefixed with '0x'. Also, bring all hex outputs to the common form - use '%#', not '0x%'.
Quoted 5 lines
Quoted 3 lines
Quoted 3 lines
This patch is done by two commands:
find . -name trace-events | \
xargs sed -i 's/%\([-+ *.0-9]*\([hljztL]\|ll\|hh\)\?\(x\|X\|"\s*PRIx\)\)/%#\1/g'Why PRIx32 but not PRIX32?
As it happens none of our trace-events files use PRIX...
thanks
-- PMM
Quoted 9 lines · Peter Maydell
Quoted 8 lines · Eric Blake
Quoted 7 lines · Peter Maydell
Quoted 5 lines · Vladimir Sementsov-Ogievskiy
To make logs more readable prefix all hex values with '0x' mark. This is needed for consistency too, as a lot of hex values are already prefixed with '0x'. Also, bring all hex outputs to the common form - use '%#', not '0x%'.
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
Quoted 3 lines
This patch is done by two commands:
find . -name trace-events | \
xargs sed -i 's/%\([-+ *.0-9]*\([hljztL]\|ll\|hh\)\?\(x\|X\|"\s*PRIx\)\)/%#\1/g'Why PRIx32 but not PRIX32?
As it happens none of our trace-events files use PRIX...
True for now, but if we're going to add a checkpatch.pl rule to enforce things, then the regex should cover it for future additions.
Signature · 3 lines
Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org
Quoted 9 lines · Vladimir Sementsov-Ogievskiy
To make logs more readable prefix all hex values with '0x' mark. This is needed for consistency too, as a lot of hex values are already prefixed with '0x'. Also, bring all hex outputs to the common form - use '%#', not '0x%'.
This patch is done by two commands:
find . -name trace-events | \
xargs sed -i 's/%\([-+ *.0-9]*\([hljztL]\|ll\|hh\)\?\(x\|X\|"\s*PRIx\)\)/%#\1/g'
find . -name trace-events | xargs sed -i 's/0x%#/%#/g'
I fear that despite your cleanup, these mistakes will be frequently re-introduced. IOW, I think you should add to scripts/checkpatch.pl to re-validate any patch which touches a trace-events file, to prevent further regressions.
Quoted 9 lines
Signed-off-by Vladimir Sementsov-Ogievskiy <[email protected]>---
Hi all!
It is hard to read logs, when there are hex and dec numbers in one line, when hex number doesn't contain any letters and don't have '0x' prefix. Hope I'm not alone who is not comfortable with it, so, what about a patch like this? May be regexp's should be improved but, I think, the common idea is clear.
Yeah, I agree - mixing decimal & hex values with no 0x prefix is horribly misleading at best.
Regards,
Daniel
Signature · 3 lines
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
Quoted 6 lines · Daniel P. Berrange
Quoted 5 lines · Vladimir Sementsov-Ogievskiy
To make logs more readable prefix all hex values with '0x' mark. This is needed for consistency too, as a lot of hex values are already prefixed with '0x'. Also, bring all hex outputs to the common form - use '%#', not '0x%'.
Quoted 8 lines
Quoted 4 lines
This patch is done by two commands:
find . -name trace-events | \
xargs sed -i 's/%\([-+ *.0-9]*\([hljztL]\|ll\|hh\)\?\(x\|X\|"\s*PRIx\)\)/%#\1/g'
find . -name trace-events | xargs sed -i 's/0x%#/%#/g'I fear that despite your cleanup, these mistakes will be frequently re-introduced. IOW, I think you should add to
scripts/checkpatch.plto re-validate any patch which touches a trace-events file, to prevent further regressions.
Good point, I'll try to do it.
Quoted 4 lines
Quoted 4 lines
Signed-off-by Vladimir Sementsov-Ogievskiy <[email protected]>---
Quoted 8 lines
Quoted 6 lines
Hi all!
It is hard to read logs, when there are hex and dec numbers in one line, when hex number doesn't contain any letters and don't have '0x' prefix. Hope I'm not alone who is not comfortable with it, so, what about a patch like this? May be regexp's should be improved but, I think, the common idea is clear.
Yeah, I agree - mixing decimal & hex values with no 0x prefix is horribly misleading at best.
Thank you!
Quoted 5 lines
Regards,
Daniel
Signature · 2 lines
Best regards, Vladimir
Quoted 4 lines · On Fri, 28 Jul 2017 11:55:47 +0300 Vladimir Sementsov-Ogievskiy…
To make logs more readable prefix all hex values with '0x' mark. This is needed for consistency too, as a lot of hex values are already prefixed with '0x'. Also, bring all hex outputs to the common form - use '%#', not '0x%'.
This is problematic if you try to match up things in the trace with things that don't have the leading 0x elsewhere. See my comments on the s390x changes below.
Quoted 14 lines
This patch is done by two commands:
find . -name trace-events | \
xargs sed -i 's/%\([-+ *.0-9]*\([hljztL]\|ll\|hh\)\?\(x\|X\|"\s*PRIx\)\)/%#\1/g'
find . -name trace-events | xargs sed -i 's/0x%#/%#/g'Signed-off-by Vladimir Sementsov-Ogievskiy <[email protected]>hw/s390x/trace-events +0
-0@@ -2,15 +2,15 @@
hw/s390x/trace-events line 5
Quoted 10 lines
hw/s390x/trace-events +1
-7# hw/s390x/css.c css_enable_facility(const char *facility) "CSS: enable %s" -css_crw(uint8_t rsc, uint8_t erc, uint16_t rsid, const char *chained) "CSS: queueing crw: rsc=%x, erc=%x, rsid=%x %s" -css_chpid_add(uint8_t cssid, uint8_t chpid, uint8_t type) "CSS: add chpid %x.%02x (type %02x)" -css_new_image(uint8_t cssid, const char *default_cssid) "CSS: add css image %02x %s" -css_assign_subch(const char *do_assign, uint8_t cssid, uint8_t ssid, uint16_t schid, uint16_t devno) "CSS: %s %x.%x.%04x (devno %04x)" -css_io_interrupt(int cssid, int ssid, int schid, uint32_t intparm, uint8_t isc, const char *conditional) "CSS: I/O interrupt on sch %x.%x.%04x (intparm %08x, isc %x) %s" -css_adapter_interrupt(uint8_t isc) "CSS: adapter I/O interrupt (isc %x)" -css_do_sic(uint16_t mode, uint8_t isc) "CSS: set interruption mode %x on isc %x" +css_crw(uint8_t rsc, uint8_t erc, uint16_t rsid, const char *chained) "CSS: queueing crw: rsc=%#x, erc=%#x, rsid=%#x %s"
ok
hw/s390x/trace-events line 6
Quoted 1 line
hw/s390x/trace-events +1
-0+css_chpid_add(uint8_t cssid, uint8_t chpid, uint8_t type) "CSS: add chpid %#x.%#02x (type %#02x)"
Not ok. This is supposed to mimic the identifier used in the Linux kernel (sysfs and elsewhere), which is of the form 0.42. (Changing type is fine.)
hw/s390x/trace-events line 7
Quoted 1 line
hw/s390x/trace-events +1
-0+css_new_image(uint8_t cssid, const char *default_cssid) "CSS: add css image %#02x %s"
ok
hw/s390x/trace-events line 8
Quoted 1 line
hw/s390x/trace-events +1
-0+css_assign_subch(const char *do_assign, uint8_t cssid, uint8_t ssid, uint16_t schid, uint16_t devno) "CSS: %s %#x.%#x.%#04x (devno %#04x)"
Again, not ok. This is a bus id, which uses the form fe.1.4711 and is used both on the command line and in the Linux kernel. Changing devno is debatable.
hw/s390x/trace-events line 9
Quoted 1 line
hw/s390x/trace-events +1
-0+css_io_interrupt(int cssid, int ssid, int schid, uint32_t intparm, uint8_t isc, const char *conditional) "CSS: I/O interrupt on sch %#x.%#x.%#04x (intparm %#08x, isc %#x) %s"
Again x.y.zzzz bus id. intparm is ok, isc is a value in the 0..7 range, so not really useful, but does not hurt.
hw/s390x/trace-events line 10
Quoted 1 line
hw/s390x/trace-events +1
-0+css_adapter_interrupt(uint8_t isc) "CSS: adapter I/O interrupt (isc %#x)"
Dito on the isc, but does not really hurt.
hw/s390x/trace-events line 11
Quoted 1 line
hw/s390x/trace-events +1
-0+css_do_sic(uint16_t mode, uint8_t isc) "CSS: set interruption mode %#x on isc %#x"
Dito on the isc, mode is fine.
hw/s390x/trace-events line 14
Quoted 6 lines
hw/s390x/trace-events +1
-3# hw/s390x/virtio-ccw.c -virtio_ccw_interpret_ccw(int cssid, int ssid, int schid, int cmd_code) "VIRTIO-CCW: %x.%x.%04x: interpret command %x" -virtio_ccw_new_device(int cssid, int ssid, int schid, int devno, const char *devno_mode) "VIRTIO-CCW: add subchannel %x.%x.%04x, devno %04x (%s)" -virtio_ccw_set_ind(uint64_t ind_loc, uint8_t ind_old, uint8_t ind_new) "VIRTIO-CCW: indicator at %" PRIu64 ": %x->%x" +virtio_ccw_interpret_ccw(int cssid, int ssid, int schid, int cmd_code) "VIRTIO-CCW: %#x.%#x.%#04x: interpret command %#x"
x.y.zzzz bus id, cmd_code is ok
hw/s390x/trace-events line 15
Quoted 1 line
hw/s390x/trace-events +1
-0+virtio_ccw_new_device(int cssid, int ssid, int schid, int devno, const char *devno_mode) "VIRTIO-CCW: add subchannel %#x.%#x.%#04x, devno %#04x (%s)"
x.y.zzzz bus id, devno debatable
hw/s390x/trace-events line 16
Quoted 1 line
hw/s390x/trace-events +1
-0+virtio_ccw_set_ind(uint64_t ind_loc, uint8_t ind_old, uint8_t ind_new) "VIRTIO-CCW: indicator at %" PRIu64 ": %#x->%#x"
ok
target/s390x/trace-events set_skeys_nonzero(int rc) "SKEY: Call to set_skeys unexpectedly returned %d" · line 9
Quoted 13 lines
target/s390x/trace-events +1
-3@@ -6,9 +6,9 @@ set_skeys_nonzero(int rc) "SKEY: Call to set_skeys unexpectedly returned %d" # target/s390x/ioinst.c ioinst(const char *insn) "IOINST: %s" -ioinst_sch_id(const char *insn, int cssid, int ssid, int schid) "IOINST: %s (%x.%x.%04x)" -ioinst_chp_id(const char *insn, int cssid, int chpid) "IOINST: %s (%x.%02x)" -ioinst_chsc_cmd(uint16_t cmd, uint16_t len) "IOINST: chsc command %04x, len %04x" +ioinst_sch_id(const char *insn, int cssid, int ssid, int schid) "IOINST: %s (%#x.%#x.%#04x)"
x.y.zzzz bus id
target/s390x/trace-events set_skeys_nonzero(int rc) "SKEY: Call to set_skeys unexpectedly returned %d" · line 10
Quoted 1 line
target/s390x/trace-events +1
-0+ioinst_chp_id(const char *insn, int cssid, int chpid) "IOINST: %s (%#x.%#02x)"
m.nn bus id
target/s390x/trace-events set_skeys_nonzero(int rc) "SKEY: Call to set_skeys unexpectedly returned %d" · line 11
Quoted 1 line
target/s390x/trace-events +1
-0+ioinst_chsc_cmd(uint16_t cmd, uint16_t len) "IOINST: chsc command %#04x, len %#04x"
ok
Quoted 3 lines
target/s390x/trace-events +0
-0# target/s390x/kvm.c kvm_enable_cmma(int rc) "CMMA: enabling with result code %d"
Quoted 10 lines · Cornelia Huck
Quoted 4 lines · On Fri, 28 Jul 2017 11:55:47 +0300 Vladimir Sementsov-Ogievskiy…
To make logs more readable prefix all hex values with '0x' mark. This is needed for consistency too, as a lot of hex values are already prefixed with '0x'. Also, bring all hex outputs to the common form - use '%#', not '0x%'.
This is problematic if you try to match up things in the trace with things that don't have the leading 0x elsewhere. See my comments on the s390x changes below.
Hmm, not so easy..
All your remarks satisfy the following criteria (and it seems logical anyway):
hex numbers grouped into patterns like NUM.NUM.NUM (several numbers splitted by period) are allowed to be printed without 0x prefixes.
Quoted 86 lines
Quoted 14 lines
This patch is done by two commands:
find . -name trace-events | \
xargs sed -i 's/%\([-+ *.0-9]*\([hljztL]\|ll\|hh\)\?\(x\|X\|"\s*PRIx\)\)/%#\1/g'
find . -name trace-events | xargs sed -i 's/0x%#/%#/g'Signed-off-by Vladimir Sementsov-Ogievskiy <[email protected]>hw/s390x/trace-events +0
-0@@ -2,15 +2,15 @@hw/s390x/trace-events line 5
Quoted 10 lines
hw/s390x/trace-events +1
-7# hw/s390x/css.c css_enable_facility(const char *facility) "CSS: enable %s" -css_crw(uint8_t rsc, uint8_t erc, uint16_t rsid, const char *chained) "CSS: queueing crw: rsc=%x, erc=%x, rsid=%x %s" -css_chpid_add(uint8_t cssid, uint8_t chpid, uint8_t type) "CSS: add chpid %x.%02x (type %02x)" -css_new_image(uint8_t cssid, const char *default_cssid) "CSS: add css image %02x %s" -css_assign_subch(const char *do_assign, uint8_t cssid, uint8_t ssid, uint16_t schid, uint16_t devno) "CSS: %s %x.%x.%04x (devno %04x)" -css_io_interrupt(int cssid, int ssid, int schid, uint32_t intparm, uint8_t isc, const char *conditional) "CSS: I/O interrupt on sch %x.%x.%04x (intparm %08x, isc %x) %s" -css_adapter_interrupt(uint8_t isc) "CSS: adapter I/O interrupt (isc %x)" -css_do_sic(uint16_t mode, uint8_t isc) "CSS: set interruption mode %x on isc %x" +css_crw(uint8_t rsc, uint8_t erc, uint16_t rsid, const char *chained) "CSS: queueing crw: rsc=%#x, erc=%#x, rsid=%#x %s"ok
hw/s390x/trace-events line 6
Quoted 1 line
hw/s390x/trace-events +1
-0+css_chpid_add(uint8_t cssid, uint8_t chpid, uint8_t type) "CSS: add chpid %#x.%#02x (type %#02x)"Not ok. This is supposed to mimic the identifier used in the Linux kernel (sysfs and elsewhere), which is of the form 0.42. (Changing type is fine.)
hw/s390x/trace-events line 7
Quoted 1 line
hw/s390x/trace-events +1
-0+css_new_image(uint8_t cssid, const char *default_cssid) "CSS: add css image %#02x %s"ok
hw/s390x/trace-events line 8
Quoted 1 line
hw/s390x/trace-events +1
-0+css_assign_subch(const char *do_assign, uint8_t cssid, uint8_t ssid, uint16_t schid, uint16_t devno) "CSS: %s %#x.%#x.%#04x (devno %#04x)"Again, not ok. This is a bus id, which uses the form fe.1.4711 and is used both on the command line and in the Linux kernel. Changing devno is debatable.
hw/s390x/trace-events line 9
Quoted 1 line
hw/s390x/trace-events +1
-0+css_io_interrupt(int cssid, int ssid, int schid, uint32_t intparm, uint8_t isc, const char *conditional) "CSS: I/O interrupt on sch %#x.%#x.%#04x (intparm %#08x, isc %#x) %s"Again x.y.zzzz bus id. intparm is ok, isc is a value in the 0..7 range, so not really useful, but does not hurt.
hw/s390x/trace-events line 10
Quoted 1 line
hw/s390x/trace-events +1
-0+css_adapter_interrupt(uint8_t isc) "CSS: adapter I/O interrupt (isc %#x)"Dito on the isc, but does not really hurt.
hw/s390x/trace-events line 11
Quoted 1 line
hw/s390x/trace-events +1
-0+css_do_sic(uint16_t mode, uint8_t isc) "CSS: set interruption mode %#x on isc %#x"Dito on the isc, mode is fine.
hw/s390x/trace-events line 14
Quoted 6 lines
hw/s390x/trace-events +1
-3# hw/s390x/virtio-ccw.c -virtio_ccw_interpret_ccw(int cssid, int ssid, int schid, int cmd_code) "VIRTIO-CCW: %x.%x.%04x: interpret command %x" -virtio_ccw_new_device(int cssid, int ssid, int schid, int devno, const char *devno_mode) "VIRTIO-CCW: add subchannel %x.%x.%04x, devno %04x (%s)" -virtio_ccw_set_ind(uint64_t ind_loc, uint8_t ind_old, uint8_t ind_new) "VIRTIO-CCW: indicator at %" PRIu64 ": %x->%x" +virtio_ccw_interpret_ccw(int cssid, int ssid, int schid, int cmd_code) "VIRTIO-CCW: %#x.%#x.%#04x: interpret command %#x"x.y.zzzz bus id,
cmd_codeis okhw/s390x/trace-events line 15
Quoted 1 line
hw/s390x/trace-events +1
-0+virtio_ccw_new_device(int cssid, int ssid, int schid, int devno, const char *devno_mode) "VIRTIO-CCW: add subchannel %#x.%#x.%#04x, devno %#04x (%s)"x.y.zzzz bus id, devno debatable
hw/s390x/trace-events line 16
Quoted 1 line
hw/s390x/trace-events +1
-0+virtio_ccw_set_ind(uint64_t ind_loc, uint8_t ind_old, uint8_t ind_new) "VIRTIO-CCW: indicator at %" PRIu64 ": %#x->%#x"ok
target/s390x/trace-events set_skeys_nonzero(int rc) "SKEY: Call to set_skeys unexpectedly returned %d" · line 9
Quoted 12 lines
target/s390x/trace-events +1
-3@@ -6,9 +6,9 @@ set_skeys_nonzero(int rc) "SKEY: Call to set_skeys unexpectedly returned %d" # target/s390x/ioinst.c ioinst(const char *insn) "IOINST: %s" -ioinst_sch_id(const char *insn, int cssid, int ssid, int schid) "IOINST: %s (%x.%x.%04x)" -ioinst_chp_id(const char *insn, int cssid, int chpid) "IOINST: %s (%x.%02x)" -ioinst_chsc_cmd(uint16_t cmd, uint16_t len) "IOINST: chsc command %04x, len %04x" +ioinst_sch_id(const char *insn, int cssid, int ssid, int schid) "IOINST: %s (%#x.%#x.%#04x)"x.y.zzzz bus id
target/s390x/trace-events set_skeys_nonzero(int rc) "SKEY: Call to set_skeys unexpectedly returned %d" · line 10
Quoted 1 line
target/s390x/trace-events +1
-0+ioinst_chp_id(const char *insn, int cssid, int chpid) "IOINST: %s (%#x.%#02x)"m.nn bus id
target/s390x/trace-events set_skeys_nonzero(int rc) "SKEY: Call to set_skeys unexpectedly returned %d" · line 11
Quoted 1 line
target/s390x/trace-events +1
-0+ioinst_chsc_cmd(uint16_t cmd, uint16_t len) "IOINST: chsc command %#04x, len %#04x"ok
Quoted 3 lines
target/s390x/trace-events +0
-0# target/s390x/kvm.c kvm_enable_cmma(int rc) "CMMA: enabling with result code %d"
Signature · 2 lines
Best regards, Vladimir
Quoted 12 lines · On Fri, 28 Jul 2017 13:01:15 +0300 Vladimir Sementsov-Ogievskiy…
Quoted 10 lines · Cornelia Huck
Quoted 4 lines · On Fri, 28 Jul 2017 11:55:47 +0300 Vladimir Sementsov-Ogievskiy…
To make logs more readable prefix all hex values with '0x' mark. This is needed for consistency too, as a lot of hex values are already prefixed with '0x'. Also, bring all hex outputs to the common form - use '%#', not '0x%'.
This is problematic if you try to match up things in the trace with things that don't have the leading 0x elsewhere. See my comments on the s390x changes below.
Quoted 7 lines
Hmm, not so easy..
All your remarks satisfy the following criteria (and it seems logical anyway):
hex numbers grouped into patterns like NUM.NUM.NUM (several numbers splitted by period) are allowed to be printed without 0x prefixes.
Works for me. There might be other similar patterns, though.
Quoted 11 lines · Vladimir Sementsov-Ogievskiy
To make logs more readable prefix all hex values with '0x' mark. This is needed for consistency too, as a lot of hex values are already prefixed with '0x'. Also, bring all hex outputs to the common form - use '%#', not '0x%'.
This patch is done by two commands:
find . -name trace-events | \
xargs sed -i 's/%\([-+ *.0-9]*\([hljztL]\|ll\|hh\)\?\(x\|X\|"\s*PRIx\)\)/%#\1/g'
find . -name trace-events | xargs sed -i 's/0x%#/%#/g'Signed-off-by Vladimir Sementsov-Ogievskiy <[email protected]>
Quoted 8 lines
---
Hi all!
It is hard to read logs, when there are hex and dec numbers in one line, when hex number doesn't contain any letters and don't have '0x' prefix. Hope I'm not alone who is not comfortable with it, so, what about a patch like this? May be regexp's should be improved but, I think, the common idea is clear.
Thanks, this looks useful. Will review v2.
Stefan