Revert "FileAnalysis: optimize get_file_handle event queueing."

This reverts commit fc267d010d.

There were some diffs caused by this in external test suites I'm
unsure about, I'm going to go over optimizations more closely in
a different branch.
This commit is contained in:
Jon Siwek 2013-04-03 09:49:39 -05:00
parent fc267d010d
commit 393d35dc60
10 changed files with 37 additions and 88 deletions

View file

@ -130,7 +130,6 @@ protected:
typedef set<string> StrSet;
typedef map<FileID, Info*> IDMap;
typedef queue<PendingFile*> PendingQueue;
typedef queue<int> HandleCache;
/**
* @return the Info object mapped to \a unique or a null pointer if analysis
@ -165,24 +164,22 @@ protected:
*/
bool IsIgnored(const string& unique);
/**
* Queues \c get_file_handle event in order to retrieve unique file handle.
* @return true if there is a handler for the event, else false.
*/
bool QueueHandleEvent(AnalyzerTag::Tag tag, Connection* conn,
bool is_orig);
/**
* @return whether file analysis is disabled for the given analyzer.
*/
static bool IsDisabled(AnalyzerTag::Tag tag);
/**
* Queues \c get_file_handle event in order to retrieve unique file handle.
* @return true if there is a handler for the event, else false.
*/
static bool QueueHandleEvent(AnalyzerTag::Tag tag, Connection* conn,
bool is_orig);
StrMap str_map; /**< Map unique strings to \c FileAnalysis::Info records. */
IDMap id_map; /**< Map file IDs to \c FileAnalysis::Info records. */
StrSet ignored; /**< Ignored files. Will be finally removed on EOF. */
PendingQueue pending; /**< Files awaiting a unique handle. */
HandleCache cache; /**< The number of times a received file handle can be
used to pop the #pending queue. */
static TableVal* disabled; /**< Table of disabled analyzers. */
};