> This happens with nested macOS guest.
I took another look at the stack trace in the issue. Everything should
be fine then.
> Maybe we are missing an earlier check whether HVF is usable or not, but
> we shouldn't brutally abort().
I agree. I think with this patchset you're doing it practicall
on(+), 1 deletion(-)
Reviewed-by: Mads Ynddal
_ipa_size and
hv_vm_config_get_default_ipa_size fail if HVF is not available, but
assuming so, it looks fine to me.
Reviewed-by: Mads Ynddal
> On 16 Jul 2025, at 19.28, Philippe Mathieu-Daudé wrote:
>
> Do not abort in hvf_arm_get_default_ipa_bit_size()
> and hvf_arm_get_max_ipa_bit_size() when the IPA can
> not be fetched. Return 0 (and document it).
>
> Signed-off-by: Philippe Mathieu-Daudé
> ---
> target/arm/hvf_arm.h | 11
> On 15 Jul 2025, at 12.40, Philippe Mathieu-Daudé wrote:
>
> Co-developed-by: Mads Ynddal
> Signed-off-by: Philippe Mathieu-Daudé
> Reviewed-by: Richard Henderson
> ---
> Mads, I welcome your Signed-off-by tag on top :)
> ---
> accel/hvf/hvf-accel-ops.c | 24 +
> And it doesn't seem to make much sense to log PC in every Dabort handler,
> let's just remove it from this trace event.
>
> Signed-off-by: Zenghui Yu
I agree. Unless cpu_synchronize_state(cpu) is called, the value in env->pc is
stale.
Reviewed-by: Mads Ynddal
> On 2 Jul 2025, at 20.52, Philippe Mathieu-Daudé wrote:
>
> Signed-off-by: Philippe Mathieu-Daudé
> Reviewed-by: Richard Henderson
> ---
> accel/hvf/hvf-accel-ops.c | 19 +++
> 1 file changed, 19 insertions(+)
>
> diff --git a/accel/hvf/hvf-accel-ops.c b/accel/hvf/hvf-accel-o
accel/hvf/hvf-accel-ops.c | 10 +-
> target/arm/hvf/hvf.c | 4 ++--
> target/i386/hvf/hvf.c | 4 ++--
> target/i386/hvf/x86hvf.c | 2 +-
> 5 files changed, 10 insertions(+), 11 deletions(-)
>
Reviewed-by: Mads Ynddal
+
> accel/qtest/qtest.c | 1 +
> accel/xen/xen-all.c | 1 +
> system/cpus.c | 9 +++--
> target/i386/nvmm/nvmm-accel-ops.c | 1 +
> target/i386/whpx/whpx-accel-ops.c | 1 +
> 8 files changed, 12 insertions(+), 6 deletions(-)
>
Reviewed-by: Mads Ynddal
cg-accel-ops.c | 3 +++
> accel/xen/xen-all.c | 2 ++
> system/cpus.c | 6 ++
> target/i386/nvmm/nvmm-accel-ops.c | 3 +++
> target/i386/whpx/whpx-accel-ops.c | 3 +++
> 9 files changed, 21 insertions(+), 4 deletions(-)
>
Reviewed-by: Mads Ynddal
-all.c | 1 +
> system/cpus.c | 7 ---
> target/i386/nvmm/nvmm-accel-ops.c | 1 +
> target/i386/whpx/whpx-accel-ops.c | 1 +
> 8 files changed, 13 insertions(+), 3 deletions(-)
Reviewed-by: Mads Ynddal
ment?
>
> Suggested-by: Shatyuka
> Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2800
> Signed-off-by: Philippe Mathieu-Daudé
> Acked-by: Richard Henderson
> ---
> accel/hvf/hvf-accel-ops.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
Reviewed-by: Mads Ynddal
; accel/kvm/kvm-accel-ops.c | 12 +---
> 1 file changed, 1 insertion(+), 11 deletions(-)
>
Reviewed-by: Mads Ynddal
; accel/hvf/hvf-accel-ops.c | 18 +-
> 1 file changed, 1 insertion(+), 17 deletions(-)
>
Reviewed-by: Mads Ynddal
---
> include/system/accel-ops.h | 5 -
> accel/accel-common.c | 16 +++-
> system/cpus.c | 2 +-
> 3 files changed, 20 insertions(+), 3 deletions(-)
>
Reviewed-by: Mads Ynddal
oduced by tracetool.read_events
> @@ -332,7 +330,7 @@ def run(analyzer):
> except (AssertionError, ValueError):
> raise SimpleException(f'usage: {sys.argv[0]} [--no-header]
> \n')
>
> -with open(trace_event_path, 'r') as events_fobj, open(trace_file_path,
> 'rb') as log_fobj:
> +with open(trace_event_path) as events_fobj, open(trace_file_path, 'rb')
> as log_fobj:
> process(events_fobj, log_fobj, analyzer, read_header=not no_header)
>
> if __name__ == '__main__':
I'm not really a fan of the implicit default arguments, but I guess the rest is
fine. If this is the way everyone else wants to go, I won't stand in the way.
—
Mads Ynddal
changes that might affect the Apple Silicon HVF code, which will be my primary
focus.
Signed-off-by: Mads Ynddal
---
MAINTAINERS | 2 ++
1 file changed, 2 insertions(+)
diff --git a/MAINTAINERS b/MAINTAINERS
index 28b3dd2684..2b9be05aaf 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -509,6 +
uot;system/hvf.h"
>-> "target/arm/cpu.h"
> -> "target/arm/cpu-qom.h"
> -> "hw/core/cpu.h"
>
> "system/hvf.h" however doesn't need "target/arm/cpu.h" and we
> want to remove it there. In order to
r if Apple changed the
> behavior of the function in a release of macOS.
>
> Mads Ynddal (2):
> hvf: avoid repeatedly setting trap debug for each cpu
> hvf: only update sysreg from owning thread
>
> accel/hvf/hvf-all.c | 7 ++-
> target/arm/hvf/hvf.c | 27 +++
From: Mads Ynddal
hv_vcpu_set_sys_reg should only be called from the owning thread of the
vCPU, so to avoid crashes, the call to hvf_update_guest_debug is
dispatched to the individual threads.
Tested-by: Daniel Gomez
Signed-off-by: Mads Ynddal
---
accel/hvf/hvf-all.c | 7 ++-
1 file
From: Mads Ynddal
In (recent versions of?) macOS, calls to hv_vcpu_set_sys_reg were failing if
they were issued outside of the specific thread that owns the vCPU.
This caused a crash when attaching a debugger through the GDB stub.
This GDB stub has worked before, so it is unclear if Apple
From: Mads Ynddal
hvf_arch_set_traps is already called from a context of a specific
CPUState, so we don't need to do a nested CPU_FOREACH.
It also results in an error from hv_vcpu_set_sys_reg, as it may only be
called from the thread owning the vCPU.
Tested-by: Daniel Gomez
Signed-o
| 4 ++--
> hw/usb/trace-events | 6 +++---
> hw/vfio/trace-events | 4 ++--
> scripts/tracetool/__init__.py | 2 ++
> 6 files changed, 14 insertions(+), 10 deletions(-)
>
> --
> 2.41.0
>
Acked-by: Mads Ynddal
tively slow, that we
cannot make the TCG analysis? I'm not saying it can't be true, but it'd be nice
to see it demonstrated before making decisions.
Because, as you point out, there's a lot of downsides to having two versions. So
the benefits have to clearly outweigh the additional work.
I have a lot of other questions, but let's maybe start with the core idea first.
—
Mads Ynddal
security of the Python version. We're not
doing anything obviously exploitable.
—
Mads Ynddal
> Why are the timestamps non-monotonic?
>
> In a situation like that maybe not only the negative timestamps are
> useless but even some positive timestamps are incorrect. I think it's
> worth understanding the nature of the instability before merging a
> fix.
I agree with Stefan on this. We'll
>> +class Formatter2(Analyzer2):
>
> Was this class part of the benchmark? It appears to be unused.
>
>> +def __init__(self):
>> +self.last_timestamp_ns = None
>> +
>> +def catchall(self, *rec_args, event, timestamp_ns, pid, event_id):
>> +if self.las
From: Mads Ynddal
The call to `getargspec` was deprecated and in Python 3.11 it has been
removed in favor of `getfullargspec`. `getfullargspec` is compatible
with QEMU's requirement of at least Python version 3.6.
Reviewed-by: Stefan Hajnoczi
Reviewed-by: Philippe Mathieu-Daudé
Signed-o
From: Mads Ynddal
A failed call to `read_header` wouldn't be handled the same for the two
different code paths (one path would try to use `None` as a list).
Changed to raise exception to be handled centrally. This also allows for
easier unpacking, as errors has been filtered out.
Review
From: Mads Ynddal
By moving the dynamic argument construction to keyword-arguments,
we can remove all of the specialized handling, and streamline it.
If a tracing method wants to access these, they can define the
kwargs, or ignore it be placing `**kwargs` at the end of the
function's argu
From: Mads Ynddal
To avoid duplicate code depending on input types and to better handle
open/close of log with a context-manager, we move the logic of process into
_process.
Reviewed-by: Stefan Hajnoczi
Signed-off-by: Mads Ynddal
---
scripts/simpletrace.py | 26 ++
1
From: Mads Ynddal
Instead of explicitly calling `begin` and `end`, we can change the class
to use the context-manager paradigm. This is mostly a styling choice,
used in modern Python code. But it also allows for more advanced analyzers
to handle exceptions gracefully in the `__exit__` method
From: Mads Ynddal
It was unclear what was the supported public interface. I.e. when
refactoring the code, what functions/classes are important to retain.
Reviewed-by: Stefan Hajnoczi
Signed-off-by: Mads Ynddal
---
scripts/simpletrace.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a
From: Mads Ynddal
Moved event_mapping and event_id_to_name down one level in the function
call-stack to keep variable instantiation and usage closer (`process`
and `run` has no use of the variables; `read_trace_records` does).
Instead of passing event_mapping and event_id_to_name to the bottom
From: Mads Ynddal
The arguments extracted from `sys.argv` named and unpacked to make it
clear what the arguments are and what they're used for.
The two input files were opened, but never explicitly closed. File usage
changed to use `with` statement to take care of this. At the same
From: Mads Ynddal
Moved event processing to the Analyzer class to separate specific analyzer
logic (like caching and function signatures) from the _process function.
This allows for new types of Analyzer-based subclasses without changing
the core code.
Note, that the fn_cache is important for
From: Mads Ynddal
In my work to refactor simpletrace.py, I noticed that there's no
maintainer of it, and has the status of "odd fixes". I'm using it from
time to time, so I'd like to maintain the script.
I've added myself as reviewer under "Tracing" to
From: Mads Ynddal
Python 3 removed `dict.iteritems()` in favor of `dict.items()`. This
means the script currently doesn't work on Python 3.
Reviewed-by: Philippe Mathieu-Daudé
Reviewed-by: Stefan Hajnoczi
Signed-off-by: Mads Ynddal
---
scripts/analyse-locks-simpletrace.py | 2 +-
1
From: Mads Ynddal
I wanted to use simpletrace.py for an internal project, so I tried to update
and polish the code. Some of the commits resolve specific issues, while some
are more subjective.
I've tried to divide it into commits so we can discuss the
individual changes, and I'm rea
From: Mads Ynddal
It wasn't clear where the constants and structs came from, so I added
comments to help.
Reviewed-by: Stefan Hajnoczi
Signed-off-by: Mads Ynddal
---
scripts/simpletrace.py | 5 +
1 file changed, 5 insertions(+)
diff --git a/scripts/simpletrace.py b/sc
From: Mads Ynddal
Define `SimpleException` to differentiate our exceptions from generic
exceptions (IOError, etc.). Adapted simpletrace to support this and
output to stderr.
Reviewed-by: Philippe Mathieu-Daudé
Reviewed-by: Stefan Hajnoczi
Signed-off-by: Mads Ynddal
---
scripts
From: Mads Ynddal
Readability is subjective, but I've expanded the naming of the variables
and arguments, to help with understanding for new eyes on the code.
Signed-off-by: Mads Ynddal
Reviewed-by: Philippe Mathieu-Daudé
Reviewed-by: Stefan Hajnoczi
---
scripts/simpletrace.py
e qemu.git maintainer yourself
> (requires publishing a GPG key and signing pull request tags).
>
> Please let me know which option you prefer.
For future patches, I would like to send pull requests myself with a GPG key to
get the practice. I can have Klaus Jensen sign my key to
get started.
—
Mads Ynddal
> AFAIK, we don't consider simpletrace.py python code to be a
> supported public API, just a command line tool.
>
> IOW, we can change the python code at will, as long as the
> command line doesn't alter its behaviour. Thus I don't see
> a need to add new classes, just change the existing ones.
> On 23 Aug 2023, at 10.54, Mads Ynddal wrote:
>
> From: Mads Ynddal
>
> By moving the dynamic argument construction to keyword-arguments,
> we can remove all of the specialized handling, and streamline it.
> If a tracing method wants to access these, they can define th
> On 23 Aug 2023, at 10.54, Mads Ynddal wrote:
>
> From: Mads Ynddal
>
> I wanted to use simpletrace.py for an internal project, so I tried to update
> and polish the code. Some of the commits resolve specific issues, while some
> are more subjective.
>
> I
From: Mads Ynddal
By moving the dynamic argument construction to keyword-arguments,
we can remove all of the specialized handling, and streamline it.
If a tracing method wants to access these, they can define the
kwargs, or ignore it be placing `**kwargs` at the end of the
function's argu
From: Mads Ynddal
A failed call to `read_header` wouldn't be handled the same for the two
different code paths (one path would try to use `None` as a list).
Changed to raise exception to be handled centrally. This also allows for
easier unpacking, as errors has been filtered out.
Signed-o
From: Mads Ynddal
It was unclear what was the supported public interface. I.e. when
refactoring the code, what functions/classes are important to retain.
Signed-off-by: Mads Ynddal
---
scripts/simpletrace.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/scripts/simpletrace.py b
From: Mads Ynddal
Python 3 removed `dict.iteritems()` in favor of `dict.items()`. This
means the script curerntly doesn't work on Python 3.
Signed-off-by: Mads Ynddal
---
scripts/analyse-locks-simpletrace.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/an
From: Mads Ynddal
It wasn't clear where the constants and structs came from, so I added
comments to help.
Signed-off-by: Mads Ynddal
---
scripts/simpletrace.py | 5 +
1 file changed, 5 insertions(+)
diff --git a/scripts/simpletrace.py b/scripts/simpletrace.py
index b221d9a241..5c230
From: Mads Ynddal
In my work to refactor simpletrace.py, I noticed that there's no
maintainer of it, and has the status of "odd fixes". I'm using it from
time to time, so I'd like to maintain the script.
I've added myself as reviewer under "Tracing" to
From: Mads Ynddal
To avoid duplicate code depending on input types and to better handle
open/close of log with a context-manager, we move the logic of process into
_process.
Signed-off-by: Mads Ynddal
---
scripts/simpletrace.py | 26 ++
1 file changed, 18 insertions
From: Mads Ynddal
Moved event processing to the Analyzer class to separate specific analyzer
logic (like caching and function signatures) from the _process function.
This allows for new types of Analyzer-based subclasses without changing
the core code.
Note, that the fn_cache is important for
From: Mads Ynddal
Readability is subjective, but I've expanded the naming of the variables
and arguments, to help with understanding for new eyes on the code.
Signed-off-by: Mads Ynddal
Reviewed-by: Philippe Mathieu-Daudé
Reviewed-by: Stefan Hajnoczi
---
scripts/simpletrace.py
From: Mads Ynddal
I wanted to use simpletrace.py for an internal project, so I tried to update
and polish the code. Some of the commits resolve specific issues, while some
are more subjective.
I've tried to divide it into commits so we can discuss the
individual changes, and I'm rea
From: Mads Ynddal
Define `SimpleException` to differentiate our exceptions from generic
exceptions (IOError, etc.). Adapted simpletrace to support this and
output to stderr.
Signed-off-by: Mads Ynddal
Reviewed-by: Philippe Mathieu-Daudé
---
scripts/simpletrace.py | 22
From: Mads Ynddal
The arguments extracted from `sys.argv` named and unpacked to make it
clear what the arguments are and what they're used for.
The two input files were opened, but never explicitly closed. File usage
changed to use `with` statement to take care of this. At the same
From: Mads Ynddal
Instead of explicitly calling `begin` and `end`, we can change the class
to use the context-manager paradigm. This is mostly a styling choice,
used in modern Python code. But it also allows for more advanced analyzers
to handle exceptions gracefully in the `__exit__` method
From: Mads Ynddal
The call to `getargspec` was deprecated and in Python 3.11 it has been
removed in favor of `getfullargspec`. `getfullargspec` is compatible
with QEMU's requirement of at least Python version 3.6.
Signed-off-by: Mads Ynddal
Reviewed-by: Stefan Hajnoczi
---
sc
From: Mads Ynddal
Moved event_mapping and event_id_to_name down one level in the function
call-stack to keep variable instantiation and usage closer (`process`
and `run` has no use of the variables; `read_trace_records` does).
Instead of passing event_mapping and event_id_to_name to the bottom
> On 15 Jun 2023, at 00.40, Alexander Graf wrote:
>
> This patch set introduces a new ARM and HVF specific machine type
> called "vmapple". It mimicks the device model that Apple's proprietary
> Virtualization.Framework exposes, but implements it in QEMU.
>
> With this new machine type, you ca
for Apple M1 cpus.
>
> We already have a check for ARMv8-A never setting vfp-d32 true,
> so restructure the code so that AArch64 avoids the test entirely.
>
> Reported-by: Mads Ynddal
> Signed-off-by: Richard Henderson
> ---
> target/arm/cpu.c | 28 +++---
trm aes pmull sha1 sha2 crc32 atomics fphp asimdhp
cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 asimddp sha512 asimdfhm dit uscat
ilrcpc flagm sb paca pacg dcpodp flagm2 frint
CPU implementer : 0x00
CPU architecture: 8
CPU variant : 0x0
CPU part : 0x000
CPU revision : 0
—
Mads Ynddal
; \
-serial "mon:stdio"
qemu-system-aarch64: ARM CPUs must have both VFP-D32 and Neon or neither
If you fix/work on this issue in a separate thread/patch, you can add
reported-by, so I'll automatically follow and help test it:
Reported-by: Mads Ynddal
—
Mads Ynddal
> On
> On 8 Jun 2023, at 14.41, Mads Ynddal wrote:
>
> From: Mads Ynddal
>
> By moving the dynamic argument construction to keyword-arguments,
> we can remove all of the specialized handling, and streamline it.
> If a tracing method wants to access these, they can define th
From: Mads Ynddal
By moving the dynamic argument construction to keyword-arguments,
we can remove all of the specialized handling, and streamline it.
If a tracing method wants to access these, they can define the
kwargs, or ignore it be placing `**kwargs` at the end of the
function's argu
From: Mads Ynddal
Define `SimpleException` to differentiate our exceptions from generic
exceptions (IOError, etc.). Adapted simpletrace to support this and
output to stderr.
Signed-off-by: Mads Ynddal
Reviewed-by: Philippe Mathieu-Daudé
---
scripts/simpletrace.py | 22
From: Mads Ynddal
Moved event processing to the Analyzer class to separate specific analyzer
logic (like caching and function signatures) from the _process function.
This allows for new types of Analyzer-based subclasses without changing
the core code.
Note, that the fn_cache is important for
From: Mads Ynddal
The call to `getargspec` was deprecated and in Python 3.11 it has been
removed in favor of `getfullargspec`. `getfullargspec` is compatible
with QEMU's requirement of at least Python version 3.6.
Signed-off-by: Mads Ynddal
Reviewed-by: Stefan Hajnoczi
---
sc
From: Mads Ynddal
Instead of explicitly calling `begin` and `end`, we can change the class
to use the context-manager paradigm. This is mostly a styling choice,
used in modern Python code. But it also allows for more advanced analyzers
to handle exceptions gracefully in the `__exit__` method
From: Mads Ynddal
Python 3 removed `dict.iteritems()` in favor of `dict.items()`. This
means the script curerntly doesn't work on Python 3.
Signed-off-by: Mads Ynddal
---
scripts/analyse-locks-simpletrace.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/an
From: Mads Ynddal
A failed call to `read_header` wouldn't be handled the same for the two
different code paths (one path would try to use `None` as a list).
Changed to raise exception to be handled centrally. This also allows for
easier unpacking, as errors has been filtered out.
Signed-o
From: Mads Ynddal
To avoid duplicate code depending on input types and to better handle
open/close of log with a context-manager, we move the logic of process into
_process.
Signed-off-by: Mads Ynddal
---
scripts/simpletrace.py | 26 ++
1 file changed, 18 insertions
From: Mads Ynddal
Readability is subjective, but I've expanded the naming of the variables
and arguments, to help with understanding for new eyes on the code.
Signed-off-by: Mads Ynddal
Reviewed-by: Philippe Mathieu-Daudé
Reviewed-by: Stefan Hajnoczi
---
scripts/simpletrace.py
From: Mads Ynddal
It was unclear what was the supported public interface. I.e. when
refactoring the code, what functions/classes are important to retain.
Signed-off-by: Mads Ynddal
---
scripts/simpletrace.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/scripts/simpletrace.py b
From: Mads Ynddal
It wasn't clear where the constants and structs came from, so I added
comments to help.
Signed-off-by: Mads Ynddal
---
scripts/simpletrace.py | 5 +
1 file changed, 5 insertions(+)
diff --git a/scripts/simpletrace.py b/scripts/simpletrace.py
index b221d9a241..5c230
From: Mads Ynddal
Moved event_mapping and event_id_to_name down one level in the function
call-stack to keep variable instantiation and usage closer (`process`
and `run` has no use of the variables; `read_trace_records` does).
Instead of passing event_mapping and event_id_to_name to the bottom
From: Mads Ynddal
In my work to refactor simpletrace.py, I noticed that there's no
maintainer of it, and has the status of "odd fixes". I'm using it from
time to time, so I'd like to maintain the script.
I've added myself as reviewer under "Tracing" to
From: Mads Ynddal
I wanted to use simpletrace.py for an internal project, so I tried to update
and polish the code. Some of the commits resolve specific issues, while some
are more subjective.
I've tried to divide it into commits so we can discuss the
individual changes, and I'm rea
From: Mads Ynddal
The arguments extracted from `sys.argv` named and unpacked to make it
clear what the arguments are and what they're used for.
The two input files were opened, but never explicitly closed. File usage
changed to use `with` statement to take care of this. At the same
>
> This is nice but breaking existing analysis scripts should be avoided.
>
> I suggest preserving the Analyzer class the way it is and adding a new
> Analyzer2 class that follows the new method signature for trace event
> methods.
You're right. This has too large effects on the API.
I could
>
> Bearing in mind compatibility with existing simpletrace analysis
> scripts, how about the following default method implementations?
>
> def __enter__(self):
> self.begin()
>
> def __exit__(self, exc_type, exc_val, exc_tb):
> if exc_type is None:
> self.end()
> ret
>
> From my reply to v1 of this patch series:
>
> This is fragile since this information will be outdated if the C source
> code changes (e.g. renaming files or variables).
>
> Instead I would add the following comment:
>
> # This is the binary format that the QEMU "simple" trace backend
> #
> On 9 May 2023, at 16.38, Stefan Hajnoczi wrote:
>
> On Tue, May 02, 2023 at 11:23:31AM +0200, Mads Ynddal wrote:
>> From: Mads Ynddal
>>
>> The call to `getargspec` was deprecated and in Python 3.11 it has been
>> removed in favor of `getfullargspec`.
&g
>
> I was curious how Mads is using simpletrace for an internal (to
> Samsung?) project.
>
I was just tracing the NVMe emulation to get some metrics. The code is all
upstream or a part of this patchset. The rest is tracing configs.
> simpletrace.py is both a command-line tool and a Python module. The
> Python module has a public API that people's scripts may rely on. Let's
> avoid breaking API changes unless necessary so that existing scripts
> that import simpletrace continue to work.
>
> It's not very clear what is a publi
> A question for you: do you think it's possible to move simpletrace into
> qemu/python/utils? This requires cleaning up the code to some fairly pedantic
> standards, but helps protect it against rot as we change target python
> versions.
>
> No problem if that's too much to ask. just want t
From: Mads Ynddal
In my work to refactor simpletrace.py, I noticed that there's no
maintainer of it, and has the status of "odd fixes". I'm using it from
time to time, so I'd like to maintain the script.
I've added myself as reviewer under "Tracing" to
From: Mads Ynddal
The signature of `process` in simpletrace.py has changed to not take
filepaths as the two first arguments, but rather a file-like object. We
change the code here to reflect that.
Signed-off-by: Mads Ynddal
---
scripts/analyse-locks-simpletrace.py | 3 ++-
1 file changed, 2
From: Mads Ynddal
Python 3 removed `dict.iteritems()` in favor of `dict.items()`. This
means the script curerntly doesn't work on Python 3.
Signed-off-by: Mads Ynddal
---
scripts/analyse-locks-simpletrace.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/an
From: Mads Ynddal
It wasn't clear where the constants and structs came from, so I added
comments to help.
Signed-off-by: Mads Ynddal
---
scripts/simpletrace.py | 14 +++---
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/scripts/simpletrace.py b/scripts/simpletra
From: Mads Ynddal
Define `SimpleException` to differentiate our exceptions from generic
exceptions (IOError, etc.). Adapted simpletrace to support this and
output to stderr.
Reviewed-by: Philippe Mathieu-Daudé
Signed-off-by: Mads Ynddal
---
scripts/simpletrace.py | 22
From: Mads Ynddal
Readability is subjective, but I've expanded the naming of the variables
and arguments, to help with understanding for new eyes on the code.
Reviewed-by: Philippe Mathieu-Daudé
Signed-off-by: Mads Ynddal
---
scripts/simpletrace.py | 34 +---
From: Mads Ynddal
By moving the dynamic argument construction to keyword-arguments,
we can remove all of the specialized handling, and streamline it.
If a tracing method wants to access these, they can define the
kwargs, or ignore it be placing `**kwargs` at the end of the
function's argu
From: Mads Ynddal
The arguments extracted from `sys.argv` named and unpacked to make it
clear what the arguments are and what they're used for.
The two input files were opened, but never explicitly closed. File usage
changed to use `with` statement to take care of this. At the same
From: Mads Ynddal
NOTE: `process` changes function signature
Moved event_mapping and event_id_to_name down one level in the function
call-stack to keep variable instantiation and usage closer (`process`
and `run` has no use of the variables; `read_trace_records` does).
Instead of passing
From: Mads Ynddal
The call to `getargspec` was deprecated and in Python 3.11 it has been
removed in favor of `getfullargspec`.
Signed-off-by: Mads Ynddal
---
scripts/simpletrace.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/simpletrace.py b/scripts
From: Mads Ynddal
Instead of explicitly calling `begin` and `end`, we can change the class
to use the context-manager paradigm. This is mostly a styling choice,
used in modern Python code. But it also allows for more advanced analyzers
to handle exceptions gracefully in the `__exit__` method
From: Mads Ynddal
A failed call to `read_header` wouldn't be handled the same for the two
different code paths (one path would try to use `None` as a list).
Changed to raise exception to be handled centrally. This also allows for
easier unpacking, as errors has been filtered out.
Signed-o
1 - 100 of 133 matches
Mail list logo