qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] 249e9f: simpletrace: Improve the error messag


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] 249e9f: simpletrace: Improve the error message if event is...
Date: Mon, 12 Jun 2017 07:26:59 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 249e9f792c4c6e52058570e83b550ec8310f621e
      
https://github.com/qemu/qemu/commit/249e9f792c4c6e52058570e83b550ec8310f621e
  Author: Jose Ricardo Ziviani <address@hidden>
  Date:   2017-06-07 (Wed, 07 Jun 2017)

  Changed paths:
    M scripts/simpletrace.py

  Log Message:
  -----------
  simpletrace: Improve the error message if event is not declared

Today, if we use a trace-event file which does not declare an event
existing in the log file we'll get the following error:

$ scripts/simpletrace.py trace-events trace-68508
Traceback (most recent call last):
  File "scripts/simpletrace.py", line 242, in <module>
    run(Formatter())
  File "scripts/simpletrace.py", line 217, in run
    process(events, sys.argv[2], analyzer, read_header=read_header)
  File "scripts/simpletrace.py", line 192, in process
    for rec in read_trace_records(edict, log):
  File "scripts/simpletrace.py", line 107, in read_trace_records
    rec = read_record(edict, idtoname, fobj)
  File "scripts/simpletrace.py", line 71, in read_record
    return get_record(edict, idtoname, rechdr, fobj)
  File "scripts/simpletrace.py", line 45, in get_record
    event = edict[name]
KeyError: 'qemu_mutex_locked'

This patch improves this error by adding a hint instead of just that
KeyError log:

$ scripts/simpletrace.py trace-events trace-68508
'qemu_mutex_locked' event is logged but is not declared in the trace
events file, try using trace-events-all instead.

Signed-off-by: Jose Ricardo Ziviani <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Message-id: address@hidden
Signed-off-by: Stefan Hajnoczi <address@hidden>


  Commit: 5093f028ce6529034efc8fdc06cec2aa2e2eea63
      
https://github.com/qemu/qemu/commit/5093f028ce6529034efc8fdc06cec2aa2e2eea63
  Author: Peter Maydell <address@hidden>
  Date:   2017-06-12 (Mon, 12 Jun 2017)

  Changed paths:
    M scripts/simpletrace.py

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/stefanha/tags/tracing-pull-request' 
into staging

# gpg: Signature made Wed 07 Jun 2017 19:55:32 BST
# gpg:                using RSA key 0x9CA4ABB381AB73C8
# gpg: Good signature from "Stefan Hajnoczi <address@hidden>"
# gpg:                 aka "Stefan Hajnoczi <address@hidden>"
# Primary key fingerprint: 8695 A8BF D3F9 7CDA AC35  775A 9CA4 ABB3 81AB 73C8

* remotes/stefanha/tags/tracing-pull-request:
  simpletrace: Improve the error message if event is not declared

Signed-off-by: Peter Maydell <address@hidden>


Compare: https://github.com/qemu/qemu/compare/2a8469aaabdc...5093f028ce65

reply via email to

[Prev in Thread] Current Thread [Next in Thread]