diff --git a/src/apps/debuganalyzer/gui/AbstractWaitObjectsPage.h b/src/apps/debuganalyzer/gui/AbstractWaitObjectsPage.h index ac448d87b1..a8b829da94 100644 --- a/src/apps/debuganalyzer/gui/AbstractWaitObjectsPage.h +++ b/src/apps/debuganalyzer/gui/AbstractWaitObjectsPage.h @@ -278,15 +278,16 @@ private: struct NodeContainerNode : Node { NodeContainerNode() : - fChildren(20, true) + fChildren(20) { } NodeContainerNode(BObjectList& nodes) : - fChildren(20, true) + fChildren(20) { - fChildren.AddList(&nodes); + for (int32 index = 0; index < nodes.CountItems(); index++) + fChildren.AddItem(nodes.ItemAt(index)); // compute total waits and total wait time fWaits = 0; @@ -341,7 +342,7 @@ private: } protected: - BObjectList fChildren; + BObjectList fChildren; int64 fWaits; nanotime_t fTotalWaitTime; }; @@ -354,8 +355,8 @@ private: model(model) { // create nodes for the wait object groups - BObjectList tempChildren; - BObjectList& children + BObjectList tempChildren; + BObjectList& children = groupByName ? tempChildren : NodeContainerNode::fChildren; int32 count = model->CountWaitObjectGroups(); for (int32 i = 0; i < count; i++) { @@ -368,6 +369,7 @@ private: if (groupByName) { if (children.CountItems() < 2) { NodeContainerNode::fChildren.AddList(&children); + children.MakeEmpty(false); return; } @@ -400,6 +402,8 @@ private: previousNode = node; } } + + tempChildren.MakeEmpty(false); } private: diff --git a/src/apps/debuganalyzer/gui/HeaderView.cpp b/src/apps/debuganalyzer/gui/HeaderView.cpp index e69385f31b..e33a29d91e 100644 --- a/src/apps/debuganalyzer/gui/HeaderView.cpp +++ b/src/apps/debuganalyzer/gui/HeaderView.cpp @@ -719,7 +719,7 @@ HeaderView::HeaderView() : BView("header view", B_WILL_DRAW | B_FULL_UPDATE_ON_RESIZE), fModel(NULL), - fHeaderEntries(10, true), + fHeaderEntries(10), fLayoutValid(false), fDefaultState(new DefaultState(this)), fState(fDefaultState) diff --git a/src/apps/debuganalyzer/gui/HeaderView.h b/src/apps/debuganalyzer/gui/HeaderView.h index 3aab912bae..699e580078 100644 --- a/src/apps/debuganalyzer/gui/HeaderView.h +++ b/src/apps/debuganalyzer/gui/HeaderView.h @@ -187,7 +187,7 @@ public: private: struct HeaderEntry; - typedef BObjectList HeaderEntryList; + typedef BObjectList HeaderEntryList; typedef BObjectList ListenerList; class State; diff --git a/src/apps/debuganalyzer/gui/chart/LegendChartAxis.cpp b/src/apps/debuganalyzer/gui/chart/LegendChartAxis.cpp index c8bbc34cff..d5d0d6e5e9 100644 --- a/src/apps/debuganalyzer/gui/chart/LegendChartAxis.cpp +++ b/src/apps/debuganalyzer/gui/chart/LegendChartAxis.cpp @@ -143,7 +143,7 @@ LegendChartAxis::LegendChartAxis(ChartAxisLegendSource* legendSource, fLocation(CHART_AXIS_BOTTOM), fRange(), fFrame(), - fLegends(20, true), + fLegends(20), fHorizontalSpacing(20), fVerticalSpacing(10), fLayoutValid(false) diff --git a/src/apps/debuganalyzer/gui/chart/LegendChartAxis.h b/src/apps/debuganalyzer/gui/chart/LegendChartAxis.h index 7976d7c014..d88a0b684e 100644 --- a/src/apps/debuganalyzer/gui/chart/LegendChartAxis.h +++ b/src/apps/debuganalyzer/gui/chart/LegendChartAxis.h @@ -30,7 +30,7 @@ public: private: struct LegendInfo; - typedef BObjectList LegendList; + typedef BObjectList LegendList; private: void _InvalidateLayout(); bool _ValidateLayout(BView* view); diff --git a/src/apps/debuganalyzer/model/Model.cpp b/src/apps/debuganalyzer/model/Model.cpp index 1a013190d3..f138504fea 100644 --- a/src/apps/debuganalyzer/model/Model.cpp +++ b/src/apps/debuganalyzer/model/Model.cpp @@ -320,7 +320,7 @@ Model::Thread::Thread(Team* team, const system_profiler_thread_added* event, fIOTime(0), fPreemptions(0), fIndex(-1), - fWaitObjectGroups(20, true) + fWaitObjectGroups(20) { } @@ -631,11 +631,11 @@ Model::Model(const char* dataSourceName, void* eventData, size_t eventDataSize, fBaseTime(0), fLastEventTime(0), fIdleTime(0), - fCPUs(20, true), - fTeams(20, true), - fThreads(20, true), - fWaitObjectGroups(20, true), - fIOSchedulers(10, true), + fCPUs(20), + fTeams(20), + fThreads(20), + fWaitObjectGroups(20), + fIOSchedulers(10), fSchedulingStates(100) { } diff --git a/src/apps/debuganalyzer/model/Model.h b/src/apps/debuganalyzer/model/Model.h index cb0c6bb19f..472ce025c0 100644 --- a/src/apps/debuganalyzer/model/Model.h +++ b/src/apps/debuganalyzer/model/Model.h @@ -135,11 +135,11 @@ public: // returns the closest previous state private: - typedef BObjectList CPUList; - typedef BObjectList TeamList; - typedef BObjectList ThreadList; - typedef BObjectList WaitObjectGroupList; - typedef BObjectList IOSchedulerList; + typedef BObjectList CPUList; + typedef BObjectList TeamList; + typedef BObjectList ThreadList; + typedef BObjectList WaitObjectGroupList; + typedef BObjectList IOSchedulerList; typedef BObjectList SchedulingStateList; private: @@ -505,7 +505,7 @@ public: const Thread* thread); private: - typedef BObjectList + typedef BObjectList ThreadWaitObjectGroupList; private: diff --git a/src/apps/debuganalyzer/model/ThreadModel.cpp b/src/apps/debuganalyzer/model/ThreadModel.cpp index 19ea353cf5..ccfca57a43 100644 --- a/src/apps/debuganalyzer/model/ThreadModel.cpp +++ b/src/apps/debuganalyzer/model/ThreadModel.cpp @@ -40,7 +40,7 @@ ThreadModel::ThreadModel(Model* model, Model::Thread* thread) : fModel(model), fThread(thread), - fWaitObjectGroups(10, true) + fWaitObjectGroups(10) { } diff --git a/src/apps/debuganalyzer/model/ThreadModel.h b/src/apps/debuganalyzer/model/ThreadModel.h index 1e5c500c4e..143a1516fd 100644 --- a/src/apps/debuganalyzer/model/ThreadModel.h +++ b/src/apps/debuganalyzer/model/ThreadModel.h @@ -40,7 +40,7 @@ public: int32 FindSchedulingEvent(nanotime_t time); private: - typedef BObjectList WaitObjectGroupList; + typedef BObjectList WaitObjectGroupList; typedef BObjectList EventList; private: