1
The following changes since commit ca61fa4b803e5d0abaf6f1ceb690f23bb78a4def:
1
The following changes since commit ac5f7bf8e208cd7893dbb1a9520559e569a4677c:
2
2
3
Merge remote-tracking branch 'remotes/quic/tags/pull-hex-20211006' into staging (2021-10-06 12:11:14 -0700)
3
Merge tag 'migration-20230424-pull-request' of https://gitlab.com/juan.quintela/qemu into staging (2023-04-24 15:00:39 +0100)
4
4
5
are available in the Git repository at:
5
are available in the Git repository at:
6
6
7
https://gitlab.com/stefanha/qemu.git tags/block-pull-request
7
https://gitlab.com/stefanha/qemu.git tags/block-pull-request
8
8
9
for you to fetch changes up to 1cc7eada97914f090125e588497986f6f7900514:
9
for you to fetch changes up to 9d672e290475001fcecdcc9dc79ad088ff89d17f:
10
10
11
iothread: use IOThreadParamInfo in iothread_[set|get]_param() (2021-10-07 15:29:50 +0100)
11
tracetool: use relative paths for '#line' preprocessor directives (2023-04-24 13:53:44 -0400)
12
12
13
----------------------------------------------------------------
13
----------------------------------------------------------------
14
Pull request
14
Pull request (v2)
15
16
I dropped the zoned storage patches that had CI failures. This pull request
17
only contains fixes now.
15
18
16
----------------------------------------------------------------
19
----------------------------------------------------------------
17
20
18
Stefano Garzarella (2):
21
Philippe Mathieu-Daudé (1):
19
iothread: rename PollParamInfo to IOThreadParamInfo
22
block/dmg: Declare a type definition for DMG uncompress function
20
iothread: use IOThreadParamInfo in iothread_[set|get]_param()
21
23
22
iothread.c | 28 +++++++++++++++-------------
24
Thomas De Schampheleire (1):
23
1 file changed, 15 insertions(+), 13 deletions(-)
25
tracetool: use relative paths for '#line' preprocessor directives
26
27
block/dmg.h | 8 ++++----
28
block/dmg.c | 7 ++-----
29
scripts/tracetool/backend/ftrace.py | 4 +++-
30
scripts/tracetool/backend/log.py | 4 +++-
31
scripts/tracetool/backend/syslog.py | 4 +++-
32
5 files changed, 15 insertions(+), 12 deletions(-)
24
33
25
--
34
--
26
2.31.1
35
2.39.2
27
36
28
37
29
diff view generated by jsdifflib
1
From: Stefano Garzarella <sgarzare@redhat.com>
1
From: Philippe Mathieu-Daudé <philmd@linaro.org>
2
2
3
Commit 0445409d74 ("iothread: generalize
3
Introduce the BdrvDmgUncompressFunc type defintion. To emphasis
4
iothread_set_param/iothread_get_param") moved common code to set and
4
dmg_uncompress_bz2 and dmg_uncompress_lzfse are pointer to functions,
5
get IOThread parameters in two new functions.
5
declare them using this new typedef.
6
6
7
These functions are called inside callbacks, so we don't need to use an
7
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
8
opaque pointer. Let's replace `void *opaque` parameter with
8
Message-id: 20230320152610.32052-1-philmd@linaro.org
9
`IOThreadParamInfo *info`.
10
11
Suggested-by: Kevin Wolf <kwolf@redhat.com>
12
Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
13
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
14
Message-id: 20210727145936.147032-3-sgarzare@redhat.com
15
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
9
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
16
---
10
---
17
iothread.c | 18 ++++++++++--------
11
block/dmg.h | 8 ++++----
18
1 file changed, 10 insertions(+), 8 deletions(-)
12
block/dmg.c | 7 ++-----
13
2 files changed, 6 insertions(+), 9 deletions(-)
19
14
20
diff --git a/iothread.c b/iothread.c
15
diff --git a/block/dmg.h b/block/dmg.h
21
index XXXXXXX..XXXXXXX 100644
16
index XXXXXXX..XXXXXXX 100644
22
--- a/iothread.c
17
--- a/block/dmg.h
23
+++ b/iothread.c
18
+++ b/block/dmg.h
24
@@ -XXX,XX +XXX,XX @@ static IOThreadParamInfo aio_max_batch_info = {
19
@@ -XXX,XX +XXX,XX @@ typedef struct BDRVDMGState {
25
};
20
z_stream zstream;
26
21
} BDRVDMGState;
27
static void iothread_get_param(Object *obj, Visitor *v,
22
28
- const char *name, void *opaque, Error **errp)
23
-extern int (*dmg_uncompress_bz2)(char *next_in, unsigned int avail_in,
29
+ const char *name, IOThreadParamInfo *info, Error **errp)
24
- char *next_out, unsigned int avail_out);
30
{
25
+typedef int BdrvDmgUncompressFunc(char *next_in, unsigned int avail_in,
31
IOThread *iothread = IOTHREAD(obj);
26
+ char *next_out, unsigned int avail_out);
32
- IOThreadParamInfo *info = opaque;
27
33
int64_t *field = (void *)iothread + info->offset;
28
-extern int (*dmg_uncompress_lzfse)(char *next_in, unsigned int avail_in,
34
29
- char *next_out, unsigned int avail_out);
35
visit_type_int64(v, name, field, errp);
30
+extern BdrvDmgUncompressFunc *dmg_uncompress_bz2;
36
}
31
+extern BdrvDmgUncompressFunc *dmg_uncompress_lzfse;
37
32
38
static bool iothread_set_param(Object *obj, Visitor *v,
33
#endif
39
- const char *name, void *opaque, Error **errp)
34
diff --git a/block/dmg.c b/block/dmg.c
40
+ const char *name, IOThreadParamInfo *info, Error **errp)
35
index XXXXXXX..XXXXXXX 100644
41
{
36
--- a/block/dmg.c
42
IOThread *iothread = IOTHREAD(obj);
37
+++ b/block/dmg.c
43
- IOThreadParamInfo *info = opaque;
38
@@ -XXX,XX +XXX,XX @@
44
int64_t *field = (void *)iothread + info->offset;
39
#include "qemu/memalign.h"
45
int64_t value;
40
#include "dmg.h"
46
41
47
@@ -XXX,XX +XXX,XX @@ static bool iothread_set_param(Object *obj, Visitor *v,
42
-int (*dmg_uncompress_bz2)(char *next_in, unsigned int avail_in,
48
static void iothread_get_poll_param(Object *obj, Visitor *v,
43
- char *next_out, unsigned int avail_out);
49
const char *name, void *opaque, Error **errp)
44
-
50
{
45
-int (*dmg_uncompress_lzfse)(char *next_in, unsigned int avail_in,
51
+ IOThreadParamInfo *info = opaque;
46
- char *next_out, unsigned int avail_out);
52
47
+BdrvDmgUncompressFunc *dmg_uncompress_bz2;
53
- iothread_get_param(obj, v, name, opaque, errp);
48
+BdrvDmgUncompressFunc *dmg_uncompress_lzfse;
54
+ iothread_get_param(obj, v, name, info, errp);
49
55
}
50
enum {
56
51
/* Limit chunk sizes to prevent unreasonable amounts of memory being used
57
static void iothread_set_poll_param(Object *obj, Visitor *v,
58
const char *name, void *opaque, Error **errp)
59
{
60
IOThread *iothread = IOTHREAD(obj);
61
+ IOThreadParamInfo *info = opaque;
62
63
- if (!iothread_set_param(obj, v, name, opaque, errp)) {
64
+ if (!iothread_set_param(obj, v, name, info, errp)) {
65
return;
66
}
67
68
@@ -XXX,XX +XXX,XX @@ static void iothread_set_poll_param(Object *obj, Visitor *v,
69
static void iothread_get_aio_param(Object *obj, Visitor *v,
70
const char *name, void *opaque, Error **errp)
71
{
72
+ IOThreadParamInfo *info = opaque;
73
74
- iothread_get_param(obj, v, name, opaque, errp);
75
+ iothread_get_param(obj, v, name, info, errp);
76
}
77
78
static void iothread_set_aio_param(Object *obj, Visitor *v,
79
const char *name, void *opaque, Error **errp)
80
{
81
IOThread *iothread = IOTHREAD(obj);
82
+ IOThreadParamInfo *info = opaque;
83
84
- if (!iothread_set_param(obj, v, name, opaque, errp)) {
85
+ if (!iothread_set_param(obj, v, name, info, errp)) {
86
return;
87
}
88
89
--
52
--
90
2.31.1
53
2.39.2
91
54
92
55
diff view generated by jsdifflib
1
From: Stefano Garzarella <sgarzare@redhat.com>
1
From: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
2
2
3
Commit 1793ad0247 ("iothread: add aio-max-batch parameter") added
3
The event filename is an absolute path. Convert it to a relative path when
4
a new parameter (aio-max-batch) to IOThread and used PollParamInfo
4
writing '#line' directives, to preserve reproducibility of the generated
5
structure to handle it.
5
output when different base paths are used.
6
6
7
Since it is not a parameter of the polling mechanism, we rename the
7
Signed-off-by: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
8
structure to a more generic IOThreadParamInfo.
8
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
9
Message-Id: <20230406080045.21696-1-thomas.de_schampheleire@nokia.com>
10
---
11
scripts/tracetool/backend/ftrace.py | 4 +++-
12
scripts/tracetool/backend/log.py | 4 +++-
13
scripts/tracetool/backend/syslog.py | 4 +++-
14
3 files changed, 9 insertions(+), 3 deletions(-)
9
15
10
Suggested-by: Kevin Wolf <kwolf@redhat.com>
16
diff --git a/scripts/tracetool/backend/ftrace.py b/scripts/tracetool/backend/ftrace.py
11
Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
12
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
13
Message-id: 20210727145936.147032-2-sgarzare@redhat.com
14
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
15
---
16
iothread.c | 14 +++++++-------
17
1 file changed, 7 insertions(+), 7 deletions(-)
18
19
diff --git a/iothread.c b/iothread.c
20
index XXXXXXX..XXXXXXX 100644
17
index XXXXXXX..XXXXXXX 100644
21
--- a/iothread.c
18
--- a/scripts/tracetool/backend/ftrace.py
22
+++ b/iothread.c
19
+++ b/scripts/tracetool/backend/ftrace.py
23
@@ -XXX,XX +XXX,XX @@ static void iothread_complete(UserCreatable *obj, Error **errp)
20
@@ -XXX,XX +XXX,XX @@
24
typedef struct {
21
__email__ = "stefanha@redhat.com"
25
const char *name;
22
26
ptrdiff_t offset; /* field's byte offset in IOThread struct */
23
27
-} PollParamInfo;
24
+import os.path
28
+} IOThreadParamInfo;
25
+
29
26
from tracetool import out
30
-static PollParamInfo poll_max_ns_info = {
27
31
+static IOThreadParamInfo poll_max_ns_info = {
28
32
"poll-max-ns", offsetof(IOThread, poll_max_ns),
29
@@ -XXX,XX +XXX,XX @@ def generate_h(event, group):
33
};
30
args=event.args,
34
-static PollParamInfo poll_grow_info = {
31
event_id="TRACE_" + event.name.upper(),
35
+static IOThreadParamInfo poll_grow_info = {
32
event_lineno=event.lineno,
36
"poll-grow", offsetof(IOThread, poll_grow),
33
- event_filename=event.filename,
37
};
34
+ event_filename=os.path.relpath(event.filename),
38
-static PollParamInfo poll_shrink_info = {
35
fmt=event.fmt.rstrip("\n"),
39
+static IOThreadParamInfo poll_shrink_info = {
36
argnames=argnames)
40
"poll-shrink", offsetof(IOThread, poll_shrink),
37
41
};
38
diff --git a/scripts/tracetool/backend/log.py b/scripts/tracetool/backend/log.py
42
-static PollParamInfo aio_max_batch_info = {
39
index XXXXXXX..XXXXXXX 100644
43
+static IOThreadParamInfo aio_max_batch_info = {
40
--- a/scripts/tracetool/backend/log.py
44
"aio-max-batch", offsetof(IOThread, aio_max_batch),
41
+++ b/scripts/tracetool/backend/log.py
45
};
42
@@ -XXX,XX +XXX,XX @@
46
43
__email__ = "stefanha@redhat.com"
47
@@ -XXX,XX +XXX,XX @@ static void iothread_get_param(Object *obj, Visitor *v,
44
48
const char *name, void *opaque, Error **errp)
45
49
{
46
+import os.path
50
IOThread *iothread = IOTHREAD(obj);
47
+
51
- PollParamInfo *info = opaque;
48
from tracetool import out
52
+ IOThreadParamInfo *info = opaque;
49
53
int64_t *field = (void *)iothread + info->offset;
50
54
51
@@ -XXX,XX +XXX,XX @@ def generate_h(event, group):
55
visit_type_int64(v, name, field, errp);
52
' }',
56
@@ -XXX,XX +XXX,XX @@ static bool iothread_set_param(Object *obj, Visitor *v,
53
cond=cond,
57
const char *name, void *opaque, Error **errp)
54
event_lineno=event.lineno,
58
{
55
- event_filename=event.filename,
59
IOThread *iothread = IOTHREAD(obj);
56
+ event_filename=os.path.relpath(event.filename),
60
- PollParamInfo *info = opaque;
57
name=event.name,
61
+ IOThreadParamInfo *info = opaque;
58
fmt=event.fmt.rstrip("\n"),
62
int64_t *field = (void *)iothread + info->offset;
59
argnames=argnames)
63
int64_t value;
60
diff --git a/scripts/tracetool/backend/syslog.py b/scripts/tracetool/backend/syslog.py
64
61
index XXXXXXX..XXXXXXX 100644
62
--- a/scripts/tracetool/backend/syslog.py
63
+++ b/scripts/tracetool/backend/syslog.py
64
@@ -XXX,XX +XXX,XX @@
65
__email__ = "stefanha@redhat.com"
66
67
68
+import os.path
69
+
70
from tracetool import out
71
72
73
@@ -XXX,XX +XXX,XX @@ def generate_h(event, group):
74
' }',
75
cond=cond,
76
event_lineno=event.lineno,
77
- event_filename=event.filename,
78
+ event_filename=os.path.relpath(event.filename),
79
name=event.name,
80
fmt=event.fmt.rstrip("\n"),
81
argnames=argnames)
65
--
82
--
66
2.31.1
83
2.39.2
67
68
diff view generated by jsdifflib