LCOV - code coverage report
Current view: top level - mnt/wasteland/wcohen/systemtap_write/systemtap - remote.h (source / functions) Hit Total Coverage
Test: stap.info Lines: 6 6 100.0 %
Date: 2013-03-08 Functions: 6 7 85.7 %
Branches: 3 6 50.0 %

           Branch data     Line data    Source code
       1                 :            : // systemtap remote execution
       2                 :            : // Copyright (C) 2010-2011 Red Hat Inc.
       3                 :            : //
       4                 :            : // This file is part of systemtap, and is free software.  You can
       5                 :            : // redistribute it and/or modify it under the terms of the GNU General
       6                 :            : // Public License (GPL); either version 2, or (at your option) any
       7                 :            : // later version.
       8                 :            : 
       9                 :            : #ifndef REMOTE_H
      10                 :            : #define REMOTE_H
      11                 :            : 
      12                 :            : #include <string>
      13                 :            : #include <vector>
      14                 :            : 
      15                 :            : extern "C" {
      16                 :            : #include <poll.h>
      17                 :            : }
      18                 :            : 
      19                 :            : #include "session.h"
      20                 :            : 
      21                 :            : class remote {
      22                 :            :   private:
      23                 :        473 :     virtual int prepare() { return 0; }
      24                 :            :     virtual int start() = 0;
      25                 :            :     virtual int finish() = 0;
      26                 :            : 
      27                 :        478 :     virtual void prepare_poll(std::vector<pollfd>&) {}
      28                 :          5 :     virtual void handle_poll(std::vector<pollfd>&) {}
      29                 :            : 
      30                 :            :   protected:
      31                 :            :     systemtap_session* s;
      32                 :            :     std::string prefix; // stap --remote-prefix
      33                 :            :     std::string staprun_r_arg; // PR13354 data: remote_uri()/remote_idx()
      34                 :            : 
      35         [ +  - ]:       2214 :     remote(systemtap_session& s): s(&s) {}
      36                 :            : 
      37                 :            :   public:
      38                 :            :     static remote* create(systemtap_session& s, const std::string& uri, int idx);
      39                 :            :     static int run(const std::vector<remote*>& remotes);
      40                 :            : 
      41                 :       2213 :     systemtap_session* get_session() { return s; }
      42                 :            : 
      43 [ +  - ][ -  + ]:       2205 :     virtual ~remote() {}
      44                 :            : };
      45                 :            : 
      46                 :            : #endif // REMOTE_H
      47                 :            : 
      48                 :            : /* vim: set sw=2 ts=8 cino=>4,n-2,{2,^-2,t0,(0,u0,w1,M1 : */

Generated by: LCOV version 1.9