From 3c3d2b85cd919d0b23aa22e2188d2ae85941f83c Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Sat, 18 Apr 2009 10:08:06 +0000 Subject: [PATCH] * Moved the time_stats tool to src/bin/debug. * Fixed some gcc 4 warnings. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30236 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/bin/debug/Jamfile | 1 + .../debug/time_stats}/time_stats.cpp | 16 ++++++++-------- src/tests/system/kernel/Jamfile | 2 -- 3 files changed, 9 insertions(+), 10 deletions(-) rename src/{tests/system/kernel => bin/debug/time_stats}/time_stats.cpp (98%) diff --git a/src/bin/debug/Jamfile b/src/bin/debug/Jamfile index 0759ab5e50..0a493bd701 100644 --- a/src/bin/debug/Jamfile +++ b/src/bin/debug/Jamfile @@ -10,3 +10,4 @@ StaticLibrary debug_utils.a : debug_utils.cpp ; HaikuSubInclude ltrace ; HaikuSubInclude profile ; HaikuSubInclude strace ; +HaikuSubInclude time_stats ; diff --git a/src/tests/system/kernel/time_stats.cpp b/src/bin/debug/time_stats/time_stats.cpp similarity index 98% rename from src/tests/system/kernel/time_stats.cpp rename to src/bin/debug/time_stats/time_stats.cpp index 9997988b7e..dc2c24d24c 100644 --- a/src/tests/system/kernel/time_stats.cpp +++ b/src/bin/debug/time_stats/time_stats.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2008, Ingo Weinhold, ingo_weinhold@gmx.de. + * Copyright 2008-2009, Ingo Weinhold, ingo_weinhold@gmx.de. * Distributed under the terms of the MIT License. */ @@ -92,8 +92,8 @@ struct WaitObjectGroupingComparator { const scheduling_analysis_thread_wait_object* b) { return a->wait_object->type < b->wait_object->type - || a->wait_object->type == b->wait_object->type - && strcmp(a->wait_object->name, b->wait_object->name) < 0; + || (a->wait_object->type == b->wait_object->type + && strcmp(a->wait_object->name, b->wait_object->name) < 0); } }; @@ -407,8 +407,8 @@ do_timing_analysis(int argc, const char* const* argv, bool schedulingAnalysis, int32 finalI = 0; while (initialI < initialUsageCount || finalI < finalUsageCount) { if (initialI >= initialUsageCount - || finalI < finalUsageCount - && initialUsage[initialI].thread > finalUsage[finalI].thread) { + || (finalI < finalUsageCount + && initialUsage[initialI].thread > finalUsage[finalI].thread)) { // new thread memcpy(&sortedThreads[sortedThreadCount], &finalUsage[finalI], sizeof(thread_info)); @@ -418,8 +418,8 @@ do_timing_analysis(int argc, const char* const* argv, bool schedulingAnalysis, } if (finalI >= finalUsageCount - || initialI < initialUsageCount - && initialUsage[initialI].thread < finalUsage[finalI].thread) { + || (initialI < initialUsageCount + && initialUsage[initialI].thread < finalUsage[finalI].thread)) { // gone thread memcpy(&goneThreads[goneThreadCount], &initialUsage[initialI], sizeof(thread_info)); @@ -452,7 +452,7 @@ do_timing_analysis(int argc, const char* const* argv, bool schedulingAnalysis, printf("\nTotal run time: %lld us\n", runTime); printf("Thread time statistics in us:\n\n"); printf(" thread name kernel user " - " total in %\n"); + " total in %%\n"); printf("-------------------------------------------------------------------" "------------------\n"); diff --git a/src/tests/system/kernel/Jamfile b/src/tests/system/kernel/Jamfile index fd85348d33..7d65ec63db 100644 --- a/src/tests/system/kernel/Jamfile +++ b/src/tests/system/kernel/Jamfile @@ -48,8 +48,6 @@ SetSupportedPlatformsForTarget syscall_time : $(HAIKU_BEOS_COMPATIBLE_PLATFORMS) ; SimpleTest syscall_time : syscall_time.cpp ; -SimpleTest time_stats : time_stats.cpp ; - SimpleTest transfer_area_test : transfer_area_test.cpp ; SimpleTest wait_test_1 : wait_test_1.c ;