qemu/scripts/tracetool
Philippe Mathieu-Daudé 9f7ad79c16 trace: Forbid event format ending with newline character
Event format ending with newlines confuse the trace reports.
Forbid them.

Add a check to refuse new format added with trailing newline:

  $ make
  [...]
    GEN     hw/misc/trace.h
  Traceback (most recent call last):
    File "scripts/tracetool.py", line 152, in <module>
      main(sys.argv)
    File "scripts/tracetool.py", line 143, in main
      events.extend(tracetool.read_events(fh, arg))
    File "scripts/tracetool/__init__.py", line 367, in read_events
      event = Event.build(line)
    File "scripts/tracetool/__init__.py", line 281, in build
      raise ValueError("Event format can not end with a newline character")
  ValueError: Error at hw/misc/trace-events:121: Event format can not end with a newline character

Reviewed-by: John Snow <jsnow@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-id: 20190916095121.29506-3-philmd@redhat.com
Message-Id: <20190916095121.29506-3-philmd@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2019-09-18 10:20:15 +01:00
..
backend tracetool: Include thread id information in log backend 2018-12-12 10:04:59 +00:00
format trace: Do not include qom/cpu.h into generated trace.h 2019-08-16 13:31:52 +02:00
__init__.py trace: Forbid event format ending with newline character 2019-09-18 10:20:15 +01:00
transform.py trace: Add 'vcpu' event property to trace guest vCPU 2016-03-01 13:27:10 +00:00
vcpu.py trace: Add 'vcpu' event property to trace guest vCPU 2016-03-01 13:27:10 +00:00