* [for-next][PATCH 1/9] rtla: use the definition for stdout fd when calling isatty()
2024-10-11 17:30 [for-next][PATCH 0/9] rtla: Updates for 6.13 Steven Rostedt
@ 2024-10-11 17:30 ` Steven Rostedt
2024-10-11 17:30 ` [for-next][PATCH 2/9] tools/rv: Correct the grammatical errors in the comments Steven Rostedt
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Steven Rostedt @ 2024-10-11 17:30 UTC (permalink / raw)
To: linux-kernel; +Cc: Tomas Glozar, John Kacur, Eder Zulian
From: Eder Zulian <ezulian@redhat.com>
Use the STDOUT_FILENO definition when testing whether the standard
output file descriptor refers to a terminal (for better redability).
Link: https://lore.kernel.org/20240813142338.376039-1-ezulian@redhat.com
Signed-off-by: Eder Zulian <ezulian@redhat.com>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
---
tools/tracing/rtla/src/osnoise_top.c | 2 +-
tools/tracing/rtla/src/timerlat_top.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/tracing/rtla/src/osnoise_top.c b/tools/tracing/rtla/src/osnoise_top.c
index 2f756628613d..66e3a4382bc2 100644
--- a/tools/tracing/rtla/src/osnoise_top.c
+++ b/tools/tracing/rtla/src/osnoise_top.c
@@ -627,7 +627,7 @@ osnoise_top_apply_config(struct osnoise_tool *tool, struct osnoise_top_params *p
auto_house_keeping(¶ms->monitored_cpus);
}
- if (isatty(1) && !params->quiet)
+ if (isatty(STDOUT_FILENO) && !params->quiet)
params->pretty_output = 1;
return 0;
diff --git a/tools/tracing/rtla/src/timerlat_top.c b/tools/tracing/rtla/src/timerlat_top.c
index 8c16419fe22a..94a2f5bbaeb7 100644
--- a/tools/tracing/rtla/src/timerlat_top.c
+++ b/tools/tracing/rtla/src/timerlat_top.c
@@ -850,7 +850,7 @@ timerlat_top_apply_config(struct osnoise_tool *top, struct timerlat_top_params *
}
}
- if (isatty(1) && !params->quiet)
+ if (isatty(STDOUT_FILENO) && !params->quiet)
params->pretty_output = 1;
return 0;
--
2.45.2
^ permalink raw reply related [flat|nested] 10+ messages in thread* [for-next][PATCH 2/9] tools/rv: Correct the grammatical errors in the comments
2024-10-11 17:30 [for-next][PATCH 0/9] rtla: Updates for 6.13 Steven Rostedt
2024-10-11 17:30 ` [for-next][PATCH 1/9] rtla: use the definition for stdout fd when calling isatty() Steven Rostedt
@ 2024-10-11 17:30 ` Steven Rostedt
2024-10-11 17:30 ` [for-next][PATCH 3/9] tools/rv: Correct the grammatical errors in the comments[2] Steven Rostedt
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Steven Rostedt @ 2024-10-11 17:30 UTC (permalink / raw)
To: linux-kernel; +Cc: Tomas Glozar, John Kacur, Ba Jing
From: Ba Jing <bajing@cmss.chinamobile.com>
The form of "print" should be consistent with "parses".
Link: https://lore.kernel.org/20240902233408.8684-1-bajing@cmss.chinamobile.com
Signed-off-by: Ba Jing <bajing@cmss.chinamobile.com>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
---
tools/verification/rv/src/in_kernel.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/verification/rv/src/in_kernel.c b/tools/verification/rv/src/in_kernel.c
index f04479ecc96c..f2bbc75a76f4 100644
--- a/tools/verification/rv/src/in_kernel.c
+++ b/tools/verification/rv/src/in_kernel.c
@@ -332,7 +332,7 @@ static void ikm_print_header(struct trace_seq *s)
* ikm_event_handler - callback to handle event events
*
* Called any time a rv:"monitor"_event events is generated.
- * It parses and print event.
+ * It parses and prints event.
*/
static int
ikm_event_handler(struct trace_seq *s, struct tep_record *record,
@@ -384,7 +384,7 @@ ikm_event_handler(struct trace_seq *s, struct tep_record *record,
* ikm_error_handler - callback to handle error events
*
* Called any time a rv:"monitor"_errors events is generated.
- * It parses and print event.
+ * It parses and prints event.
*/
static int
ikm_error_handler(struct trace_seq *s, struct tep_record *record,
--
2.45.2
^ permalink raw reply related [flat|nested] 10+ messages in thread* [for-next][PATCH 3/9] tools/rv: Correct the grammatical errors in the comments[2]
2024-10-11 17:30 [for-next][PATCH 0/9] rtla: Updates for 6.13 Steven Rostedt
2024-10-11 17:30 ` [for-next][PATCH 1/9] rtla: use the definition for stdout fd when calling isatty() Steven Rostedt
2024-10-11 17:30 ` [for-next][PATCH 2/9] tools/rv: Correct the grammatical errors in the comments Steven Rostedt
@ 2024-10-11 17:30 ` Steven Rostedt
2024-10-11 17:30 ` [for-next][PATCH 4/9] rv: Fix a typo Steven Rostedt
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Steven Rostedt @ 2024-10-11 17:30 UTC (permalink / raw)
To: linux-kernel; +Cc: Tomas Glozar, John Kacur, Ba Jing
From: Ba Jing <bajing@cmss.chinamobile.com>
The word "trace" begins with a consonant sound,
so "a" should be used instead of "an".
Link: https://lore.kernel.org/20240903003019.8969-1-bajing@cmss.chinamobile.com
Signed-off-by: Ba Jing <bajing@cmss.chinamobile.com>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
---
tools/verification/rv/src/trace.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/verification/rv/src/trace.c b/tools/verification/rv/src/trace.c
index 2c7deed47f8d..1b9f9bfa1893 100644
--- a/tools/verification/rv/src/trace.c
+++ b/tools/verification/rv/src/trace.c
@@ -81,7 +81,7 @@ void trace_instance_destroy(struct trace_instance *trace)
}
/**
- * trace_instance_init - create an trace instance
+ * trace_instance_init - create a trace instance
*
* It is more than the tracefs instance, as it contains other
* things required for the tracing, such as the local events and
--
2.45.2
^ permalink raw reply related [flat|nested] 10+ messages in thread* [for-next][PATCH 4/9] rv: Fix a typo
2024-10-11 17:30 [for-next][PATCH 0/9] rtla: Updates for 6.13 Steven Rostedt
` (2 preceding siblings ...)
2024-10-11 17:30 ` [for-next][PATCH 3/9] tools/rv: Correct the grammatical errors in the comments[2] Steven Rostedt
@ 2024-10-11 17:30 ` Steven Rostedt
2024-10-11 17:30 ` [for-next][PATCH 5/9] rtla: Fix consistency in getopt_long for timerlat_hist Steven Rostedt
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Steven Rostedt @ 2024-10-11 17:30 UTC (permalink / raw)
To: linux-kernel
Cc: Tomas Glozar, John Kacur, Masami Hiramatsu, Mathieu Desnoyers,
Matthew Wilcox, Andrew Kreimer
From: Andrew Kreimer <algonell@gmail.com>
Fix a typo in comments.
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Link: https://lore.kernel.org/20240911114349.20449-1-algonell@gmail.com
Reported-by: Matthew Wilcox <willy@infradead.org>
Signed-off-by: Andrew Kreimer <algonell@gmail.com>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
---
kernel/trace/rv/rv.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/trace/rv/rv.c b/kernel/trace/rv/rv.c
index dc819aec43e8..279c70e1bd74 100644
--- a/kernel/trace/rv/rv.c
+++ b/kernel/trace/rv/rv.c
@@ -41,7 +41,7 @@
* per-task monitor, and so on), and the helper functions that glue the
* monitor to the system via trace. Generally, a monitor includes some form
* of trace output as a reaction for event parsing and exceptions,
- * as depicted bellow:
+ * as depicted below:
*
* Linux +----- RV Monitor ----------------------------------+ Formal
* Realm | | Realm
--
2.45.2
^ permalink raw reply related [flat|nested] 10+ messages in thread* [for-next][PATCH 5/9] rtla: Fix consistency in getopt_long for timerlat_hist
2024-10-11 17:30 [for-next][PATCH 0/9] rtla: Updates for 6.13 Steven Rostedt
` (3 preceding siblings ...)
2024-10-11 17:30 ` [for-next][PATCH 4/9] rv: Fix a typo Steven Rostedt
@ 2024-10-11 17:30 ` Steven Rostedt
2024-10-11 17:30 ` [for-next][PATCH 6/9] tools/rtla: drop __NR_sched_getattr Steven Rostedt
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Steven Rostedt @ 2024-10-11 17:30 UTC (permalink / raw)
To: linux-kernel; +Cc: Tomas Glozar, John Kacur, Luis Goncalves, Gabriele Monaco
From: Gabriele Monaco <gmonaco@redhat.com>
Commit e9a4062e1527 ("rtla: Add --trace-buffer-size option") adds a new
long option to rtla utilities, but among all affected files,
timerlat_hist misses a trailing `:` in the corresponding short option
inside the getopt string (e.g. `\3:`). This patch propagates the `:`.
Although this change is not functionally required, it improves
consistency and slightly reduces the likelihood a future change would
introduce a problem.
Cc: John Kacur <jkacur@redhat.com>
Cc: Luis Goncalves <lgoncalv@redhat.com>
Cc: Tomas Glozar <tglozar@redhat.com>
Link: https://lore.kernel.org/20240926143417.54039-1-gmonaco@redhat.com
Signed-off-by: Gabriele Monaco <gmonaco@redhat.com>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
---
tools/tracing/rtla/src/timerlat_hist.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/tracing/rtla/src/timerlat_hist.c b/tools/tracing/rtla/src/timerlat_hist.c
index a3907c390d67..1f9137c592f4 100644
--- a/tools/tracing/rtla/src/timerlat_hist.c
+++ b/tools/tracing/rtla/src/timerlat_hist.c
@@ -778,7 +778,7 @@ static struct timerlat_hist_params
/* getopt_long stores the option index here. */
int option_index = 0;
- c = getopt_long(argc, argv, "a:c:C::b:d:e:E:DhH:i:knp:P:s:t::T:uU0123456:7:8:9\1\2:\3",
+ c = getopt_long(argc, argv, "a:c:C::b:d:e:E:DhH:i:knp:P:s:t::T:uU0123456:7:8:9\1\2:\3:",
long_options, &option_index);
/* detect the end of the options. */
--
2.45.2
^ permalink raw reply related [flat|nested] 10+ messages in thread* [for-next][PATCH 6/9] tools/rtla: drop __NR_sched_getattr
2024-10-11 17:30 [for-next][PATCH 0/9] rtla: Updates for 6.13 Steven Rostedt
` (4 preceding siblings ...)
2024-10-11 17:30 ` [for-next][PATCH 5/9] rtla: Fix consistency in getopt_long for timerlat_hist Steven Rostedt
@ 2024-10-11 17:30 ` Steven Rostedt
2024-10-11 17:30 ` [for-next][PATCH 7/9] tools/rtla: fix collision with glibc sched_attr/sched_set_attr Steven Rostedt
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Steven Rostedt @ 2024-10-11 17:30 UTC (permalink / raw)
To: linux-kernel; +Cc: Tomas Glozar, John Kacur, Jan Stancek
From: Jan Stancek <jstancek@redhat.com>
It's not used since commit 084ce16df0f0 ("tools/rtla:
Remove unused sched_getattr() function").
Link: https://lore.kernel.org/c355dc9ad23470098d6a8d0f31fbd702551c9ea8.1728552769.git.jstancek@redhat.com
Signed-off-by: Jan Stancek <jstancek@redhat.com>
Reviewed-by: Tomas Glozar <tglozar@redhat.com>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
---
tools/tracing/rtla/src/utils.c | 32 ++++++++++++++------------------
1 file changed, 14 insertions(+), 18 deletions(-)
diff --git a/tools/tracing/rtla/src/utils.c b/tools/tracing/rtla/src/utils.c
index 9ac71a66840c..05b2b3fc005e 100644
--- a/tools/tracing/rtla/src/utils.c
+++ b/tools/tracing/rtla/src/utils.c
@@ -211,24 +211,20 @@ long parse_ns_duration(char *val)
/*
* This is a set of helper functions to use SCHED_DEADLINE.
*/
-#ifdef __x86_64__
-# define __NR_sched_setattr 314
-# define __NR_sched_getattr 315
-#elif __i386__
-# define __NR_sched_setattr 351
-# define __NR_sched_getattr 352
-#elif __arm__
-# define __NR_sched_setattr 380
-# define __NR_sched_getattr 381
-#elif __aarch64__ || __riscv
-# define __NR_sched_setattr 274
-# define __NR_sched_getattr 275
-#elif __powerpc__
-# define __NR_sched_setattr 355
-# define __NR_sched_getattr 356
-#elif __s390x__
-# define __NR_sched_setattr 345
-# define __NR_sched_getattr 346
+#ifndef __NR_sched_setattr
+# ifdef __x86_64__
+# define __NR_sched_setattr 314
+# elif __i386__
+# define __NR_sched_setattr 351
+# elif __arm__
+# define __NR_sched_setattr 380
+# elif __aarch64__ || __riscv
+# define __NR_sched_setattr 274
+# elif __powerpc__
+# define __NR_sched_setattr 355
+# elif __s390x__
+# define __NR_sched_setattr 345
+# endif
#endif
#define SCHED_DEADLINE 6
--
2.45.2
^ permalink raw reply related [flat|nested] 10+ messages in thread* [for-next][PATCH 7/9] tools/rtla: fix collision with glibc sched_attr/sched_set_attr
2024-10-11 17:30 [for-next][PATCH 0/9] rtla: Updates for 6.13 Steven Rostedt
` (5 preceding siblings ...)
2024-10-11 17:30 ` [for-next][PATCH 6/9] tools/rtla: drop __NR_sched_getattr Steven Rostedt
@ 2024-10-11 17:30 ` Steven Rostedt
2024-10-11 17:30 ` [for-next][PATCH 8/9] rtla/timerlat: Make timerlat_top_cpu->*_count unsigned long long Steven Rostedt
2024-10-11 17:30 ` [for-next][PATCH 9/9] rtla/timerlat: Make timerlat_hist_cpu->*_count " Steven Rostedt
8 siblings, 0 replies; 10+ messages in thread
From: Steven Rostedt @ 2024-10-11 17:30 UTC (permalink / raw)
To: linux-kernel; +Cc: Tomas Glozar, John Kacur, Jan Stancek
From: Jan Stancek <jstancek@redhat.com>
glibc commit 21571ca0d703 ("Linux: Add the sched_setattr
and sched_getattr functions") now also provides 'struct sched_attr'
and sched_setattr() which collide with the ones from rtla.
In file included from src/trace.c:11:
src/utils.h:49:8: error: redefinition of ‘struct sched_attr’
49 | struct sched_attr {
| ^~~~~~~~~~
In file included from /usr/include/bits/sched.h:60,
from /usr/include/sched.h:43,
from /usr/include/tracefs/tracefs.h:10,
from src/trace.c:4:
/usr/include/linux/sched/types.h:98:8: note: originally defined here
98 | struct sched_attr {
| ^~~~~~~~~~
Define 'struct sched_attr' conditionally, similar to what strace did:
https://lore.kernel.org/all/20240930222913.3981407-1-raj.khem@gmail.com/
and rename rtla's version of sched_setattr() to avoid collision.
Link: https://lore.kernel.org/8088f66a7a57c1b209cd8ae0ae7c336a7f8c930d.1728572865.git.jstancek@redhat.com
Signed-off-by: Jan Stancek <jstancek@redhat.com>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
---
tools/tracing/rtla/src/utils.c | 4 ++--
tools/tracing/rtla/src/utils.h | 2 ++
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/tools/tracing/rtla/src/utils.c b/tools/tracing/rtla/src/utils.c
index 05b2b3fc005e..6fae234aaf36 100644
--- a/tools/tracing/rtla/src/utils.c
+++ b/tools/tracing/rtla/src/utils.c
@@ -229,7 +229,7 @@ long parse_ns_duration(char *val)
#define SCHED_DEADLINE 6
-static inline int sched_setattr(pid_t pid, const struct sched_attr *attr,
+static inline int syscall_sched_setattr(pid_t pid, const struct sched_attr *attr,
unsigned int flags) {
return syscall(__NR_sched_setattr, pid, attr, flags);
}
@@ -239,7 +239,7 @@ int __set_sched_attr(int pid, struct sched_attr *attr)
int flags = 0;
int retval;
- retval = sched_setattr(pid, attr, flags);
+ retval = syscall_sched_setattr(pid, attr, flags);
if (retval < 0) {
err_msg("Failed to set sched attributes to the pid %d: %s\n",
pid, strerror(errno));
diff --git a/tools/tracing/rtla/src/utils.h b/tools/tracing/rtla/src/utils.h
index d44513e6c66a..99c9cf81bcd0 100644
--- a/tools/tracing/rtla/src/utils.h
+++ b/tools/tracing/rtla/src/utils.h
@@ -46,6 +46,7 @@ update_sum(unsigned long long *a, unsigned long long *b)
*a += *b;
}
+#ifndef SCHED_ATTR_SIZE_VER0
struct sched_attr {
uint32_t size;
uint32_t sched_policy;
@@ -56,6 +57,7 @@ struct sched_attr {
uint64_t sched_deadline;
uint64_t sched_period;
};
+#endif /* SCHED_ATTR_SIZE_VER0 */
int parse_prio(char *arg, struct sched_attr *sched_param);
int parse_cpu_set(char *cpu_list, cpu_set_t *set);
--
2.45.2
^ permalink raw reply related [flat|nested] 10+ messages in thread* [for-next][PATCH 8/9] rtla/timerlat: Make timerlat_top_cpu->*_count unsigned long long
2024-10-11 17:30 [for-next][PATCH 0/9] rtla: Updates for 6.13 Steven Rostedt
` (6 preceding siblings ...)
2024-10-11 17:30 ` [for-next][PATCH 7/9] tools/rtla: fix collision with glibc sched_attr/sched_set_attr Steven Rostedt
@ 2024-10-11 17:30 ` Steven Rostedt
2024-10-11 17:30 ` [for-next][PATCH 9/9] rtla/timerlat: Make timerlat_hist_cpu->*_count " Steven Rostedt
8 siblings, 0 replies; 10+ messages in thread
From: Steven Rostedt @ 2024-10-11 17:30 UTC (permalink / raw)
To: linux-kernel; +Cc: Tomas Glozar, John Kacur, Attila Fazekas
From: Tomas Glozar <tglozar@redhat.com>
Most fields of struct timerlat_top_cpu are unsigned long long, but the
fields {irq,thread,user}_count are int (32-bit signed).
This leads to overflow when tracing on a large number of CPUs for a long
enough time:
$ rtla timerlat top -a20 -c 1-127 -d 12h
...
0 12:00:00 | IRQ Timer Latency (us) | Thread Timer Latency (us)
CPU COUNT | cur min avg max | cur min avg max
1 #43200096 | 0 0 1 2 | 3 2 6 12
...
127 #43200096 | 0 0 1 2 | 3 2 5 11
ALL #119144 e4 | 0 5 4 | 2 28 16
The average latency should be 0-1 for IRQ and 5-6 for thread, but is
reported as 5 and 28, about 4 to 5 times more, due to the count
overflowing when summed over all CPUs: 43200096 * 127 = 5486412192,
however, 1191444898 (= 5486412192 mod MAX_INT) is reported instead, as
seen on the last line of the output, and the averages are thus ~4.6
times higher than they should be (5486412192 / 1191444898 = ~4.6).
Fix the issue by changing {irq,thread,user}_count fields to unsigned
long long, similarly to other fields in struct timerlat_top_cpu and to
the count variable in timerlat_top_print_sum.
Link: https://lore.kernel.org/20241011121015.2868751-1-tglozar@redhat.com
Reported-by: Attila Fazekas <afazekas@redhat.com>
Signed-off-by: Tomas Glozar <tglozar@redhat.com>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
---
tools/tracing/rtla/src/timerlat_top.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/tools/tracing/rtla/src/timerlat_top.c b/tools/tracing/rtla/src/timerlat_top.c
index 94a2f5bbaeb7..7fb85c8ee3bc 100644
--- a/tools/tracing/rtla/src/timerlat_top.c
+++ b/tools/tracing/rtla/src/timerlat_top.c
@@ -54,9 +54,9 @@ struct timerlat_top_params {
};
struct timerlat_top_cpu {
- int irq_count;
- int thread_count;
- int user_count;
+ unsigned long long irq_count;
+ unsigned long long thread_count;
+ unsigned long long user_count;
unsigned long long cur_irq;
unsigned long long min_irq;
@@ -280,7 +280,7 @@ static void timerlat_top_print(struct osnoise_tool *top, int cpu)
/*
* Unless trace is being lost, IRQ counter is always the max.
*/
- trace_seq_printf(s, "%3d #%-9d |", cpu, cpu_data->irq_count);
+ trace_seq_printf(s, "%3d #%-9llu |", cpu, cpu_data->irq_count);
if (!cpu_data->irq_count) {
trace_seq_printf(s, "%s %s %s %s |", no_value, no_value, no_value, no_value);
--
2.45.2
^ permalink raw reply related [flat|nested] 10+ messages in thread* [for-next][PATCH 9/9] rtla/timerlat: Make timerlat_hist_cpu->*_count unsigned long long
2024-10-11 17:30 [for-next][PATCH 0/9] rtla: Updates for 6.13 Steven Rostedt
` (7 preceding siblings ...)
2024-10-11 17:30 ` [for-next][PATCH 8/9] rtla/timerlat: Make timerlat_top_cpu->*_count unsigned long long Steven Rostedt
@ 2024-10-11 17:30 ` Steven Rostedt
8 siblings, 0 replies; 10+ messages in thread
From: Steven Rostedt @ 2024-10-11 17:30 UTC (permalink / raw)
To: linux-kernel; +Cc: Tomas Glozar, John Kacur, Attila Fazekas
From: Tomas Glozar <tglozar@redhat.com>
Do the same fix as in previous commit also for timerlat-hist.
Link: https://lore.kernel.org/20241011121015.2868751-2-tglozar@redhat.com
Reported-by: Attila Fazekas <afazekas@redhat.com>
Signed-off-by: Tomas Glozar <tglozar@redhat.com>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
---
tools/tracing/rtla/src/timerlat_hist.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/tools/tracing/rtla/src/timerlat_hist.c b/tools/tracing/rtla/src/timerlat_hist.c
index 1f9137c592f4..d49c8f0855fe 100644
--- a/tools/tracing/rtla/src/timerlat_hist.c
+++ b/tools/tracing/rtla/src/timerlat_hist.c
@@ -62,9 +62,9 @@ struct timerlat_hist_cpu {
int *thread;
int *user;
- int irq_count;
- int thread_count;
- int user_count;
+ unsigned long long irq_count;
+ unsigned long long thread_count;
+ unsigned long long user_count;
unsigned long long min_irq;
unsigned long long sum_irq;
@@ -304,15 +304,15 @@ timerlat_print_summary(struct timerlat_hist_params *params,
continue;
if (!params->no_irq)
- trace_seq_printf(trace->seq, "%9d ",
+ trace_seq_printf(trace->seq, "%9llu ",
data->hist[cpu].irq_count);
if (!params->no_thread)
- trace_seq_printf(trace->seq, "%9d ",
+ trace_seq_printf(trace->seq, "%9llu ",
data->hist[cpu].thread_count);
if (params->user_hist)
- trace_seq_printf(trace->seq, "%9d ",
+ trace_seq_printf(trace->seq, "%9llu ",
data->hist[cpu].user_count);
}
trace_seq_printf(trace->seq, "\n");
@@ -488,15 +488,15 @@ timerlat_print_stats_all(struct timerlat_hist_params *params,
trace_seq_printf(trace->seq, "count:");
if (!params->no_irq)
- trace_seq_printf(trace->seq, "%9d ",
+ trace_seq_printf(trace->seq, "%9llu ",
sum.irq_count);
if (!params->no_thread)
- trace_seq_printf(trace->seq, "%9d ",
+ trace_seq_printf(trace->seq, "%9llu ",
sum.thread_count);
if (params->user_hist)
- trace_seq_printf(trace->seq, "%9d ",
+ trace_seq_printf(trace->seq, "%9llu ",
sum.user_count);
trace_seq_printf(trace->seq, "\n");
--
2.45.2
^ permalink raw reply related [flat|nested] 10+ messages in thread