diff options
Diffstat (limited to 'TAO/utils/logWalker/Log.h')
-rw-r--r-- | TAO/utils/logWalker/Log.h | 104 |
1 files changed, 61 insertions, 43 deletions
diff --git a/TAO/utils/logWalker/Log.h b/TAO/utils/logWalker/Log.h index 3aaffa8853d..1ee3c21231d 100644 --- a/TAO/utils/logWalker/Log.h +++ b/TAO/utils/logWalker/Log.h @@ -9,68 +9,86 @@ #include "ace/Containers.h" #include "ace/Synch.h" #include "ace/SString.h" +#include "ace/Time_Value.h" #include "PeerProcess.h" #include "HostProcess.h" +#include "GIOP_Buffer.h" class Session; class HostProcess; +class Invocation; typedef ACE_DLList<HostProcess> HostProcesses; +class Incident +{ +public: + ACE_CString timestamp_; + size_t offset_; + int thread_; + ACE_CString annotation_; + Invocation *invocation_; +}; + +typedef ACE_Unbounded_Queue<Incident> IncidentList; + + class Log { public: Log (Session &s); - ~Log(); - - bool init (const ACE_TCHAR *filename, const char *alias = ""); - - void summarize(void); - - void dump (ostream &strm); - -private: - typedef void (* parser_func)(Log *this_, char *line, size_t offset); - - struct parse_key - { - const char *text; - parser_func op; - }; - - bool get_pid_tid (long &pid, long &tid, char *line); - HostProcess *get_host (long pid); - void handle_msg_dump (char *line, size_t offset); - void parse_line (char* line, size_t offset); - - static void parse_handler_open (Log *this_, char *line, size_t offset); - static void parse_SSLIOP_handler_open (Log *this_, char *line, size_t offset); - static void parse_dump_msg (Log *this_, char *line, size_t offset); - static void parse_HEXDUMP (Log *this_, char *line, size_t offset); - static void parse_open_listener (Log *this_, char *line, size_t offset); - static void parse_got_existing (Log *this_, char *line, size_t offset); - static void parse_muxed_tms (Log *this_, char *line, size_t offset); - static void parse_exclusive_tms (Log *this_, char *line, size_t offset); - static void parse_process_parsed_msgs (Log *this_, char *line, size_t offset); - static void parse_wait_for_event (Log *this_, char *line, size_t offset); - static void parse_wait_on_read (Log *this_, char *line, size_t offset); - static void parse_cleanup_queue (Log *this_, char *line, size_t offset); - static void parse_close_connection (Log *this_, char *line, size_t offset); - static void parse_begin_connection (Log *this_, char *line, size_t offset); - static void parse_SSLIOP_begin_connection (Log *this_, char *line, size_t offset); - static void parse_SSLIOP_from_client (Log *this_, char *line, size_t offset); - static void parse_SSLIOP_from_server (Log *this_, char *line, size_t offset); - static void parse_local_addr (Log *this_, char *line, size_t offset); - static void parse_open_as_server (Log *this_, char *line, size_t offset); + virtual ~Log(void); + + bool process_file (const ACE_TCHAR *filename, const char *alias = ""); + +protected: + + virtual void parse_line (void); + + void get_preamble (void); + void get_timestamp (void); + void handle_msg_octets (void); + bool match_target(void); + + void parse_handler_open_i (bool is_ssl); + void parse_dump_giop_msg_i (void); + void parse_HEXDUMP_i (void); + void parse_open_listener_i (void); + void parse_got_existing_i (void); + void parse_muxed_tms_i (void); + void parse_exclusive_tms_i (void); + void parse_process_parsed_msgs_i (void); + void parse_wait_for_event_i (void); + void parse_wait_on_read_i (void); + void parse_cleanup_queue_i (void); + void parse_close_connection_i (void); + void parse_begin_connection_i (void); + void parse_local_addr_i (void); + void parse_connection_not_complete_i (void); + void parse_open_as_server_i (void); + void parse_wait_for_connection_i (void); + void parse_post_open_i (void); + void parse_notify_poa_helper_i (void); + void parse_notify_object_i (void); ACE_CString origin_; ACE_CString alias_; Session &session_; HostProcesses procs_; - Invocation::GIOP_Buffer* dump_target_; + GIOP_Buffer unknown_msg_; + GIOP_Buffer* dump_target_; ThreadList giop_waiters_; - + ACE_DLList<PeerProcess> conn_waiters_; + IncidentList history_; + + // parsed for every line + ACE_CString timestamp_; + char *line_; + char *info_; + size_t offset_; + HostProcess *hostproc_; + Thread *thr_; }; #endif // LOG_WALKER_LOG_H |