lkml.org 
[lkml]   [2015]   [Mar]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 13/13] builtin-sched.c %ld in format string %ld in format string requires 'long' but the argument type is 'unsigned long'.
Date
Signed-off-by: Ameen Ali <AmeenAli023@gmail.com>
---
tools/perf/builtin-sched.c | 26 +++++++++++++-------------
1 file changed, 13 insertions(+), 13 deletions(-)

diff --git a/tools/perf/builtin-sched.c b/tools/perf/builtin-sched.c
index 891c393..dbc417a 100644
--- a/tools/perf/builtin-sched.c
+++ b/tools/perf/builtin-sched.c
@@ -351,7 +351,7 @@ static struct task_desc *register_pid(struct perf_sched *sched,
sched->tasks[task->nr] = task;

if (verbose)
- printf("registered task #%ld, PID %ld (%s)\n", sched->nr_tasks, pid, comm);
+ printf("registered task #%lu, PID %lu (%s)\n", sched->nr_tasks, pid, comm);

return task;
}
@@ -364,7 +364,7 @@ static void print_task_traces(struct perf_sched *sched)

for (i = 0; i < sched->nr_tasks; i++) {
task = sched->tasks[i];
- printf("task %6ld (%20s:%10ld), nr_events: %ld\n",
+ printf("task %6lu (%20s:%10lu), nr_events: %lu\n",
task->nr, task->comm, task->pid, task->nr_events);
}
}
@@ -612,7 +612,7 @@ static void run_one_test(struct perf_sched *sched)
sched->run_avg = delta;
sched->run_avg = (sched->run_avg * 9 + delta) / 10;

- printf("#%-3ld: %0.3f, ", sched->nr_runs, (double)delta / 1000000.0);
+ printf("#%-3lu: %0.3f, ", sched->nr_runs, (double)delta / 1000000.0);

printf("ravg: %0.2f, ", (double)sched->run_avg / 1e6);

@@ -632,7 +632,7 @@ static void run_one_test(struct perf_sched *sched)
printf("\n");

if (sched->nr_sleep_corrections)
- printf(" (%ld sleep corrections)\n", sched->nr_sleep_corrections);
+ printf(" (%lu sleep corrections)\n", sched->nr_sleep_corrections);
sched->nr_sleep_corrections = 0;
}

@@ -1493,17 +1493,17 @@ out_delete:
static void print_bad_events(struct perf_sched *sched)
{
if (sched->nr_unordered_timestamps && sched->nr_timestamps) {
- printf(" INFO: %.3f%% unordered timestamps (%ld out of %ld)\n",
+ printf(" INFO: %.3f%% unordered timestamps (%lu out of %lu)\n",
(double)sched->nr_unordered_timestamps/(double)sched->nr_timestamps*100.0,
sched->nr_unordered_timestamps, sched->nr_timestamps);
}
if (sched->nr_lost_events && sched->nr_events) {
- printf(" INFO: %.3f%% lost events (%ld out of %ld, in %ld chunks)\n",
+ printf(" INFO: %.3f%% lost events (%lu out of %lu, in %lu chunks)\n",
(double)sched->nr_lost_events/(double)sched->nr_events * 100.0,
sched->nr_lost_events, sched->nr_events, sched->nr_lost_chunks);
}
if (sched->nr_context_switch_bugs && sched->nr_timestamps) {
- printf(" INFO: %.3f%% context switch bugs (%ld out of %ld)",
+ printf(" INFO: %.3f%% context switch bugs (%lu out of %lu)",
(double)sched->nr_context_switch_bugs/(double)sched->nr_timestamps*100.0,
sched->nr_context_switch_bugs, sched->nr_timestamps);
if (sched->nr_lost_events)
@@ -1575,16 +1575,16 @@ static int perf_sched__replay(struct perf_sched *sched)
if (perf_sched__read_events(sched, NULL))
return -1;

- printf("nr_run_events: %ld\n", sched->nr_run_events);
- printf("nr_sleep_events: %ld\n", sched->nr_sleep_events);
- printf("nr_wakeup_events: %ld\n", sched->nr_wakeup_events);
+ printf("nr_run_events: %lu\n", sched->nr_run_events);
+ printf("nr_sleep_events: %lu\n", sched->nr_sleep_events);
+ printf("nr_wakeup_events: %lu\n", sched->nr_wakeup_events);

if (sched->targetless_wakeups)
- printf("target-less wakeups: %ld\n", sched->targetless_wakeups);
+ printf("target-less wakeups: %lu\n", sched->targetless_wakeups);
if (sched->multitarget_wakeups)
- printf("multi-target wakeups: %ld\n", sched->multitarget_wakeups);
+ printf("multi-target wakeups: %lu\n", sched->multitarget_wakeups);
if (sched->nr_run_events_optimized)
- printf("run atoms optimized: %ld\n",
+ printf("run atoms optimized: %lu\n",
sched->nr_run_events_optimized);

print_task_traces(sched);
--
2.1.0


\
 
 \ /
  Last update: 2015-03-13 23:41    [W:0.065 / U:0.140 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site