summaryrefslogtreecommitdiffstats
path: root/src/state.h
diff options
context:
space:
mode:
authorRobert Iannucci <robbie@rail.com>2012-11-09 20:07:12 (GMT)
committerRobert A Iannucci Jr <iannucci@chromium.org>2012-11-09 20:07:12 (GMT)
commita5bf183fd9ae7745effbce5dee1e76432c865d5a (patch)
tree910afe616b5043fc23cad216606942ed947f171a /src/state.h
parent09515ebc7fbf0aa9b8d037f6c43a2e95b2899f4a (diff)
downloadNinja-a5bf183fd9ae7745effbce5dee1e76432c865d5a.zip
Ninja-a5bf183fd9ae7745effbce5dee1e76432c865d5a.tar.gz
Ninja-a5bf183fd9ae7745effbce5dee1e76432c865d5a.tar.bz2
Dump pools with State
Diffstat (limited to 'src/state.h')
-rw-r--r--src/state.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/state.h b/src/state.h
index 349679a..c28407f 100644
--- a/src/state.h
+++ b/src/state.h
@@ -16,7 +16,7 @@
#define NINJA_STATE_H_
#include <map>
-#include <queue>
+#include <deque>
#include <set>
#include <string>
#include <vector>
@@ -56,6 +56,9 @@ struct Pool {
/// Pool will add zero or more edges to the ready_queue
void RetrieveReadyEdges(set<Edge*>* ready_queue);
+ /// Dump the Pool and it's edges (useful for debugging).
+ void Dump() const;
+
private:
int UnitsWaiting() { return delayed_.size(); }
@@ -64,7 +67,7 @@ private:
int current_use_;
int depth_;
- queue<Edge*> delayed_;
+ deque<Edge*> delayed_;
};
/// Global state (file status, loaded rules) for a single run.
@@ -94,7 +97,7 @@ struct State {
/// state where we haven't yet examined the disk for dirty state.
void Reset();
- /// Dump the nodes (useful for debugging).
+ /// Dump the nodes and Pools (useful for debugging).
void Dump();
/// @return the root node(s) of the graph. (Root nodes have no output edges).