From 572a176d481c329b370ce52e7bec1a49ed76c225 Mon Sep 17 00:00:00 2001 From: Tim Moore Date: Tue, 1 Dec 2009 12:02:24 +0100 Subject: change time type from double to int64_t * grapher/Graph.hxx (Graph): Change variables holding the time limits of the displayed graph from double to int64_t. * grapher/Graph.cxx (Graph::draw): Do calculations of time differences using int64_t. (Graph::getExtents, Graph::setExtents): Change left and right arguments to int64_t. * grapher/GraphData.hxx (GraphDataBase): Change time type to int64_t. (GraphDataBase::elementAsString): New function. (GraphData::elementAsString): Implementation of that function. * grapher/StapParser.cxx (parseData): Parse time values from the stap script as 64 bit values. --- grapher/Graph.cxx | 37 ++++++++++++++++++++++--------------- grapher/Graph.hxx | 12 +++++++----- grapher/GraphData.hxx | 12 +++++++++++- grapher/StapParser.cxx | 6 +++--- grapher/StapParser.hxx | 2 +- 5 files changed, 44 insertions(+), 25 deletions(-) (limited to 'grapher') diff --git a/grapher/Graph.cxx b/grapher/Graph.cxx index a7fe6fcf..e9aacd55 100644 --- a/grapher/Graph.cxx +++ b/grapher/Graph.cxx @@ -30,7 +30,7 @@ namespace systemtap // line separation int linesPossible = (int)(_graphWidth / (_lineWidth + 2.0)); // Find latest time. - double latestTime = 0.0; + int64_t latestTime = 0; for (DatasetList::iterator ditr = _datasets.begin(), de = _datasets.end(); ditr != de; @@ -38,13 +38,13 @@ namespace systemtap { if (!(*ditr)->times.empty()) { - double lastDataTime = (*ditr)->times.back(); + int64_t lastDataTime = (*ditr)->times.back(); if (lastDataTime > latestTime) latestTime = lastDataTime; } } - double minDiff = 0.0; - double maxTotal = 0.0; + int64_t minDiff = 0; + int64_t maxTotal = 0; for (DatasetList::iterator ditr = _datasets.begin(), de = _datasets.end(); ditr != de; @@ -59,11 +59,11 @@ namespace systemtap ritr + 1 != gtimes.rend(); ritr++) { - double timeDiff = *ritr - *(ritr + 1); + int64_t timeDiff = *ritr - *(ritr + 1); if (timeDiff < minDiff || (timeDiff != 0 && minDiff == 0)) minDiff = timeDiff; if (minDiff != 0 - && (totalDiff + timeDiff) / minDiff > linesPossible) + && ((totalDiff + timeDiff) / minDiff + 1) > linesPossible) break; totalDiff += timeDiff; } @@ -75,10 +75,11 @@ namespace systemtap if (maxTotal != 0) _left = latestTime - maxTotal; else - _left = _right - 1.0; + _left = _right - 1; } cr->save(); - double horizScale = _zoomFactor * _graphWidth / ( _right - _left); + double horizScale + = _zoomFactor * _graphWidth / static_cast(_right - _left); cr->translate(20.0, 0.0); cr->set_line_width(_lineWidth); @@ -186,9 +187,10 @@ namespace systemtap } cr->restore(); // Draw axes - double diff = _right - _left; - double majorUnit = pow(10.0, floor(log(diff) / log(10.0))); - double startTime = ceil(_left / majorUnit) * majorUnit; + double diff = static_cast(_right - _left); + int64_t majorUnit + = static_cast(pow(10.0, floor(log(diff) / log(10.0)))); + int64_t startTime = (_left / majorUnit) * majorUnit; cr->save(); cr->set_source_rgba(1.0, 1.0, 1.0, .9); cr->set_line_cap(Cairo::LINE_CAP_BUTT); @@ -205,14 +207,14 @@ namespace systemtap dash[0] = _graphHeight / 10; cr->set_dash(dash, 0); double prevTextAdvance = 0; - for (double tickVal = startTime; tickVal <= _right; tickVal += majorUnit) + for (int64_t tickVal = startTime; tickVal <= _right; tickVal += majorUnit) { double x = (tickVal - _left) * horizScale + 20.0; cr->move_to(x, 0.0); cr->line_to(x, _graphHeight); cr->move_to(x, _graphHeight - 5); std::ostringstream stream; - stream << std::fixed << std::setprecision(0) << tickVal; + stream << tickVal; Cairo::TextExtents extents; cr->get_text_extents(stream.str(), extents); // Room for this label? @@ -239,7 +241,7 @@ namespace systemtap _datasets.push_back(data); } - void Graph::getExtents(double& left, double& right, double& top, + void Graph::getExtents(int64_t& left, int64_t& right, double& top, double& bottom) const { left = _left; @@ -248,7 +250,7 @@ namespace systemtap bottom = _bottom; } - void Graph::setExtents(double left, double right, double top, double bottom) + void Graph::setExtents(int64_t left, int64_t right, double top, double bottom) { _left = left; _right = right; @@ -260,4 +262,9 @@ namespace systemtap { return x >= _x0 && x < _x0 + _width && y >= _y0 && y < _y0 + _height; } + + int64_t Graph::getTimeAtPoint(double x) + { + return _left + (_right - _left) * ((x - 20.0)/_graphWidth); + } } diff --git a/grapher/Graph.hxx b/grapher/Graph.hxx index aad63767..e0e864d6 100644 --- a/grapher/Graph.hxx +++ b/grapher/Graph.hxx @@ -11,6 +11,7 @@ namespace systemtap class Graph : public CairoWidget { public: + typedef std::vector > DatasetList; friend class GraphWidget; Graph(double x = 0.0, double y = 0.0); virtual void draw(Cairo::RefPtr cr); @@ -20,9 +21,9 @@ namespace systemtap bool getAutoScaling() const { return _autoScaling; } void setAutoScaling(bool val) { _autoScaling = val; } void addGraphData(std::tr1::shared_ptr data); - void getExtents(double& left, double& right, double& top, double& bottom) + void getExtents(int64_t& left, int64_t& right, double& top, double& bottom) const; - void setExtents(double left, double right, double top, double bottom); + void setExtents(int64_t left, int64_t right, double top, double bottom); // extents of the whole graph area double _width; double _height; @@ -36,11 +37,12 @@ namespace systemtap bool _autoScrolling; double _zoomFactor; std::tr1::shared_ptr _playButton; + DatasetList& getDatasets() { return _datasets; } + int64_t getTimeAtPoint(double x); protected: - typedef std::vector > DatasetList; DatasetList _datasets; - double _left; - double _right; + int64_t _left; + int64_t _right; double _top; double _bottom; }; diff --git a/grapher/GraphData.hxx b/grapher/GraphData.hxx index 0e26fb4d..e06ffdb8 100644 --- a/grapher/GraphData.hxx +++ b/grapher/GraphData.hxx @@ -1,6 +1,9 @@ #ifndef SYSTEMTAP_GRAPHDATA_HXX #define SYSTEMTAP_GRAPHDATA_HXX 1 +#include + +#include #include #include #include @@ -18,12 +21,13 @@ namespace systemtap DOT, EVENT }; - typedef boost::circular_buffer TimeList; + typedef boost::circular_buffer TimeList; GraphDataBase(TimeList::capacity_type cap = 50000) : scale(1.0), style(BAR), times(cap) { color[0] = 0.0; color[1] = 1.0; color[2] = 0.0; } + virtual std::string elementAsString(size_t element) = 0; // size of grid square at "normal" viewing double scale; double color[3]; @@ -44,6 +48,12 @@ namespace systemtap : GraphDataBase(cap), data(cap) { } + std::string elementAsString(size_t element) + { + std::ostringstream stream; + stream << data[element]; + return stream.str(); + } DataList data; }; struct CSVData diff --git a/grapher/StapParser.cxx b/grapher/StapParser.cxx index 9e42dab6..ddc14b2d 100644 --- a/grapher/StapParser.cxx +++ b/grapher/StapParser.cxx @@ -25,7 +25,7 @@ vector commaSplit(const boost::sub_range& range) } void StapParser::parseData(shared_ptr gdata, - double time, const string& dataString) + int64_t time, const string& dataString) { std::istringstream stream(dataString); shared_ptr > dblptr; @@ -182,7 +182,7 @@ vector commaSplit(const boost::sub_range& range) { vector tokens = commaSplit(dataString); int i = 0; - double time; + int64_t time; vector::iterator tokIter = tokens.begin(); std::istringstream timeStream(*tokIter++); timeStream >> time; @@ -196,7 +196,7 @@ vector commaSplit(const boost::sub_range& range) } else { - double time; + int64_t time; string data; stream >> time >> data; parseData(itr->second, time, data); diff --git a/grapher/StapParser.hxx b/grapher/StapParser.hxx index 40add9fd..a77ad1bc 100644 --- a/grapher/StapParser.hxx +++ b/grapher/StapParser.hxx @@ -21,7 +21,7 @@ public: { } void parseData(std::tr1::shared_ptr gdata, - double time, const std::string& dataString); + int64_t time, const std::string& dataString); bool ioCallback(Glib::IOCondition ioCondition); bool errIoCallback(Glib::IOCondition ioCondition); int getErrFd() { return _errFd; } -- cgit From d293d53136fa7e6e7eda510847145edf4d3d7f55 Mon Sep 17 00:00:00 2001 From: Tim Moore Date: Tue, 1 Dec 2009 12:26:59 +0100 Subject: Add hover text to the graph. When the graph display is paused, leaving the mouse stationary over the graph will display the data point under the pointer. * grapher/CairoWidget.hxx (CairoTextBox): new class (CairoWidget, CairoPlayButton): refector some play button-specific things from CairoWidget to CairoPlayButton. * grapher/CairoWidget.cxx (CairoTextBox::draw): new function. * grapher/GraphWidget.hxx (GraphWidget): new members for supporting hover text. * grapher/GraphWidget.cxx (on_motion_notify_event): Set up hover text box. (establishHoverTimeout, onHoverTimeout, getGraphUnderPoint): new functions. --- grapher/CairoWidget.cxx | 21 ++++++++++ grapher/CairoWidget.hxx | 18 ++++++-- grapher/Graph.cxx | 2 +- grapher/GraphWidget.cxx | 108 +++++++++++++++++++++++++++++++----------------- grapher/GraphWidget.hxx | 7 ++++ 5 files changed, 114 insertions(+), 42 deletions(-) (limited to 'grapher') diff --git a/grapher/CairoWidget.cxx b/grapher/CairoWidget.cxx index 86498a4f..f627dfaa 100644 --- a/grapher/CairoWidget.cxx +++ b/grapher/CairoWidget.cxx @@ -39,4 +39,25 @@ namespace systemtap else return false; } + + void CairoTextBox::draw(Cairo::RefPtr cr) + { + if (!_visible) + return; + cr->save(); + Cairo::TextExtents extents; + cr->get_text_extents(contents, extents); + double width = extents.width, height = extents.height; + cr->move_to(_x0 - 2, _y0 - 2); + cr->line_to(_x0 + width + 2, _y0 - 2); + cr->line_to(_x0 + width + 2, _y0 + height + 2); + cr->line_to(_x0 - 2, _y0 + height + 2); + cr->close_path(); + cr->set_source_rgba(1.0, 1.0, 1.0, .8); + cr->fill(); + cr->set_source_rgba(0.0, 0.0, 0.0, 1.0); + cr->move_to(_x0, _y0 + height); + cr->show_text(contents); + cr->restore(); + } } diff --git a/grapher/CairoWidget.hxx b/grapher/CairoWidget.hxx index 077a4c7a..8cfb816a 100644 --- a/grapher/CairoWidget.hxx +++ b/grapher/CairoWidget.hxx @@ -8,7 +8,7 @@ namespace systemtap { public: CairoWidget(bool visible = false) - : _visible(visible), _size(50.0), _radius(5) + : _visible(visible) {} bool isVisible() const { return _visible; } void setVisible(bool visible) { _visible = visible; } @@ -28,15 +28,27 @@ namespace systemtap bool _visible; double _x0; double _y0; - double _size; - double _radius; }; class CairoPlayButton : public CairoWidget { public: + CairoPlayButton(bool visible = false) + : CairoWidget(visible), _size(50.0), _radius(5) + { + } virtual void draw(Cairo::RefPtr cr); virtual bool containsPoint(double x, double y); + protected: + double _size; + double _radius; + }; + + class CairoTextBox : public CairoWidget + { + public: + void draw(Cairo::RefPtr cr); + std::string contents; }; } #endif diff --git a/grapher/Graph.cxx b/grapher/Graph.cxx index e9aacd55..61b7e55c 100644 --- a/grapher/Graph.cxx +++ b/grapher/Graph.cxx @@ -14,7 +14,7 @@ namespace systemtap _graphWidth(580), _graphHeight(180), _lineWidth(2), _autoScaling(true), _autoScrolling(true), _zoomFactor(1.0), _playButton(new CairoPlayButton), - _left(0.0), _right(1.0), _top(5.0), _bottom(0.0) + _left(0), _right(1), _top(5.0), _bottom(0.0) { setOrigin(x, y); _graphX = x; diff --git a/grapher/GraphWidget.cxx b/grapher/GraphWidget.cxx index cee1a6d2..9a203d87 100644 --- a/grapher/GraphWidget.cxx +++ b/grapher/GraphWidget.cxx @@ -1,8 +1,10 @@ #include #include +#include #include #include +#include #include #include @@ -19,7 +21,8 @@ namespace systemtap GraphWidget::GraphWidget() - : _trackingDrag(false), _width(600), _height(200) + : _trackingDrag(false), _width(600), _height(200), _mouseX(0.0), + _mouseY(0.0) { add_events(Gdk::POINTER_MOTION_MASK | Gdk::BUTTON_PRESS_MASK | Gdk::BUTTON_RELEASE_MASK | Gdk::SCROLL_MASK); @@ -104,16 +107,6 @@ namespace systemtap return true; Cairo::RefPtr cr = window->create_cairo_context(); -#if 0 - if(event && !_autoScaling) - { - // clip to the area indicated by the expose event so that we only - // redraw the portion of the window that needs to be redrawn - cr->rectangle(event->area.x, event->area.y, - event->area.width, event->area.height); - cr->clip(); - } -#endif cr->save(); cr->set_source_rgba(0.0, 0.0, 0.0, 1.0); cr->paint(); @@ -126,28 +119,21 @@ namespace systemtap (*g)->draw(cr); cr->restore(); } + if (_hoverText && _hoverText->isVisible()) + _hoverText->draw(cr); return true; } bool GraphWidget::on_button_press_event(GdkEventButton* event) { - for (GraphList::iterator g = _graphs.begin(); g != _graphs.end(); ++g) + shared_ptr g = getGraphUnderPoint(event->x, event->y); + if (g) { - if (event->x >= (*g)->_graphX - && event->x < (*g)->_graphX + (*g)->_graphWidth - && event->y >= (*g)->_graphY - && event->y < (*g)->_graphY + (*g)->_graphHeight) + _activeGraph = g; + if (event->button == 3) { - _activeGraph = *g; - if (event->button == 3) - { - _dataDialog->show(); - return true; - } - else - { - break; - } + _dataDialog->show(); + return true; } } if (!_activeGraph) @@ -171,6 +157,7 @@ namespace systemtap _dragOriginY = event->y; _dragOrigLeft = _activeGraph->_left; _dragOrigRight = _activeGraph->_right; + establishHoverTimeout(); } return true; } @@ -191,27 +178,25 @@ namespace systemtap Glib::RefPtr win = get_window(); if(!win) return true; - double x = 0.0; - double y = 0.0; - // XXX Hint - if (event->is_hint) - { - } - else - { - x = event->x; - y = event->y; - } + _mouseX = event->x; + _mouseY = event->y; if (_trackingDrag && _activeGraph) { Gtk::Allocation allocation = get_allocation(); const int width = allocation.get_width(); - double motion = (x - _dragOriginX) / (double) width; + double motion = (_mouseX - _dragOriginX) / (double) width; double increment = motion * (_dragOrigLeft - _dragOrigRight); _activeGraph->_left = _dragOrigLeft + increment; _activeGraph->_right = _dragOrigRight + increment; queue_draw(); } + if (_hoverText && _hoverText->isVisible()) + { + _hoverText->setVisible(false); + queue_draw(); + } + establishHoverTimeout(); + return true; } @@ -282,4 +267,51 @@ namespace systemtap row[_dataColumns._graphData] = *itr; } } + + bool GraphWidget::onHoverTimeout() + { + shared_ptr g = getGraphUnderPoint(_mouseX, _mouseY); + if (g && !g->_autoScrolling) + { + if (!_hoverText) + _hoverText = shared_ptr(new CairoTextBox()); + _hoverText->setOrigin(_mouseX + 5, _mouseY - 5); + int64_t t = g->getTimeAtPoint(_mouseX); + Graph::DatasetList& dataSets = g->getDatasets(); + if (!dataSets.empty()) + { + shared_ptr gdbase = dataSets[0]; + GraphDataBase::TimeList::iterator itime + = std::lower_bound(gdbase->times.begin(), gdbase->times.end(), t); + if (itime != gdbase->times.end()) { + size_t index = distance(gdbase->times.begin(), itime); + _hoverText->contents = gdbase->elementAsString(index); + _hoverText->setVisible(true); + queue_draw(); + } + } + } + return false; + } + + shared_ptr GraphWidget::getGraphUnderPoint(double x, double y) + { + for (GraphList::iterator g = _graphs.begin(); g != _graphs.end(); ++g) + { + if (x >= (*g)->_graphX + && x < (*g)->_graphX + (*g)->_graphWidth + && y >= (*g)->_graphY + && y < (*g)->_graphY + (*g)->_graphHeight) + return *g; + } + return shared_ptr(); + } + + void GraphWidget::establishHoverTimeout() + { + if (_hover_timeout_connection.connected()) + _hover_timeout_connection.disconnect(); + _hover_timeout_connection = Glib::signal_timeout() + .connect(sigc::mem_fun(*this, &GraphWidget::onHoverTimeout), 1000); + } } diff --git a/grapher/GraphWidget.hxx b/grapher/GraphWidget.hxx index 876b6e09..61d50e70 100644 --- a/grapher/GraphWidget.hxx +++ b/grapher/GraphWidget.hxx @@ -65,8 +65,15 @@ namespace systemtap void onDataAdd(); void onDataRemove(); void onDataDialogOpen(); + bool onHoverTimeout(); DataModelColumns _dataColumns; Glib::RefPtr _listStore; + sigc::connection _hover_timeout_connection; + std::tr1::shared_ptr _hoverText; + double _mouseX; + double _mouseY; + std::tr1::shared_ptr getGraphUnderPoint(double x, double y); + void establishHoverTimeout(); }; } #endif // SYSTEMTAP_GRAPHWIDGET_H -- cgit From 0e8394b016a039931a338fd59e103346a50f5329 Mon Sep 17 00:00:00 2001 From: Tim Moore Date: Tue, 1 Dec 2009 12:54:25 +0100 Subject: some aesthetic tweaks to the grapher * grapher/Graph.cxx (draw): Draw tick labels (times) below the graph. * grapher/grapher.cxx (main): Open main window with a size big enough to display an entire graph. --- grapher/Graph.cxx | 2 +- grapher/grapher.cxx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'grapher') diff --git a/grapher/Graph.cxx b/grapher/Graph.cxx index 61b7e55c..1d478790 100644 --- a/grapher/Graph.cxx +++ b/grapher/Graph.cxx @@ -212,7 +212,6 @@ namespace systemtap double x = (tickVal - _left) * horizScale + 20.0; cr->move_to(x, 0.0); cr->line_to(x, _graphHeight); - cr->move_to(x, _graphHeight - 5); std::ostringstream stream; stream << tickVal; Cairo::TextExtents extents; @@ -220,6 +219,7 @@ namespace systemtap // Room for this label? if (x + extents.x_bearing > prevTextAdvance) { + cr->move_to(x, _graphHeight + 5 + extents.height); cr->show_text(stream.str()); prevTextAdvance = x + extents.x_advance; } diff --git a/grapher/grapher.cxx b/grapher/grapher.cxx index fe9880b2..969bc762 100644 --- a/grapher/grapher.cxx +++ b/grapher/grapher.cxx @@ -437,7 +437,7 @@ int main(int argc, char** argv) GrapherWindow win; win.set_title("Grapher"); - win.set_default_size(600, 200); + win.set_default_size(600, 250); launcher.setWinParams(&win, &win.w); win.setGraphicalLauncher(&launcher); -- cgit From 8d9d8fe1e78b91140f41bdd71351dbea007d70ec Mon Sep 17 00:00:00 2001 From: Dave Brolley Date: Tue, 1 Dec 2009 16:43:53 -0500 Subject: Regenerate autotools files using autoreconf to pick up latest Makefile.am changes. --- grapher/Makefile.in | 340 +++++++++++++++++++++++++++++++++------------------- 1 file changed, 216 insertions(+), 124 deletions(-) (limited to 'grapher') diff --git a/grapher/Makefile.in b/grapher/Makefile.in index 8b4d3b1d..34b0cd7a 100644 --- a/grapher/Makefile.in +++ b/grapher/Makefile.in @@ -1,8 +1,9 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. +# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -17,8 +18,9 @@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c @@ -42,9 +44,9 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = stapgraph.1 +CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" \ "$(DESTDIR)$(pkgdatadir)" -binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) PROGRAMS = $(bin_PROGRAMS) am__stapgraph_SOURCES_DIST = grapher.cxx StapParser.cxx Graph.cxx \ GraphWidget.cxx CairoWidget.cxx @@ -59,33 +61,64 @@ am__DEPENDENCIES_1 = @BUILD_GRAPHER_TRUE@stapgraph_DEPENDENCIES = $(am__DEPENDENCIES_1) stapgraph_LINK = $(CXXLD) $(stapgraph_CXXFLAGS) $(CXXFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ -DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles +am__mv = mv -f +AM_V_lt = $(am__v_lt_$(V)) +am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +am__v_lt_0 = --silent CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_CXX = $(am__v_CXX_$(V)) +am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY)) +am__v_CXX_0 = @echo " CXX " $@; +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ CXXLD = $(CXX) CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ -o $@ +AM_V_CXXLD = $(am__v_CXXLD_$(V)) +am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY)) +am__v_CXXLD_0 = @echo " CXXLD " $@; +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(stapgraph_SOURCES) DIST_SOURCES = $(am__stapgraph_SOURCES_DIST) -man1dir = $(mandir)/man1 -NROFF = nroff -MANS = $(man_MANS) -am__dist_pkgdata_DATA_DIST = graph-dialog.glade stap-start.glade am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; -dist_pkgdataDATA_INSTALL = $(INSTALL_DATA) +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +man1dir = $(mandir)/man1 +NROFF = nroff +MANS = $(man_MANS) +am__dist_pkgdata_DATA_DIST = graph-dialog.glade stap-start.glade DATA = $(dist_pkgdata_DATA) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -200,6 +233,7 @@ staplog_CPPFLAGS = @staplog_CPPFLAGS@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @BUILD_GRAPHER_TRUE@man_MANS = stapgraph.1 @@ -220,14 +254,14 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu grapher/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu grapher/Makefile + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu grapher/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu grapher/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ @@ -245,34 +279,49 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): stapgraph.1: $(top_builddir)/config.status $(srcdir)/stapgraph.1.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - if test -f $$p \ - ; then \ - f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ - $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ - else :; fi; \ - done + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + for p in $$list; do echo "$$p $$p"; done | \ + sed 's/$(EXEEXT)$$//' | \ + while read p p1; do if test -f $$p; \ + then echo "$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ + -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ + sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) files[d] = files[d] " " $$1; \ + else { print "f", $$3 "/" $$4, $$1; } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + } \ + ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ - rm -f "$(DESTDIR)$(bindir)/$$f"; \ - done + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ + -e 's/$$/$(EXEEXT)/' `; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) stapgraph$(EXEEXT): $(stapgraph_OBJECTS) $(stapgraph_DEPENDENCIES) @rm -f stapgraph$(EXEEXT) - $(stapgraph_LINK) $(stapgraph_OBJECTS) $(stapgraph_LDADD) $(LIBS) + $(AM_V_CXXLD)$(stapgraph_LINK) $(stapgraph_OBJECTS) $(stapgraph_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -287,200 +336,225 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stapgraph-grapher.Po@am__quote@ .cxx.o: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< .cxx.obj: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` stapgraph-grapher.o: grapher.cxx -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stapgraph_CPPFLAGS) $(CPPFLAGS) $(stapgraph_CXXFLAGS) $(CXXFLAGS) -MT stapgraph-grapher.o -MD -MP -MF $(DEPDIR)/stapgraph-grapher.Tpo -c -o stapgraph-grapher.o `test -f 'grapher.cxx' || echo '$(srcdir)/'`grapher.cxx -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/stapgraph-grapher.Tpo $(DEPDIR)/stapgraph-grapher.Po +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stapgraph_CPPFLAGS) $(CPPFLAGS) $(stapgraph_CXXFLAGS) $(CXXFLAGS) -MT stapgraph-grapher.o -MD -MP -MF $(DEPDIR)/stapgraph-grapher.Tpo -c -o stapgraph-grapher.o `test -f 'grapher.cxx' || echo '$(srcdir)/'`grapher.cxx +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stapgraph-grapher.Tpo $(DEPDIR)/stapgraph-grapher.Po +@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='grapher.cxx' object='stapgraph-grapher.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stapgraph_CPPFLAGS) $(CPPFLAGS) $(stapgraph_CXXFLAGS) $(CXXFLAGS) -c -o stapgraph-grapher.o `test -f 'grapher.cxx' || echo '$(srcdir)/'`grapher.cxx stapgraph-grapher.obj: grapher.cxx -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stapgraph_CPPFLAGS) $(CPPFLAGS) $(stapgraph_CXXFLAGS) $(CXXFLAGS) -MT stapgraph-grapher.obj -MD -MP -MF $(DEPDIR)/stapgraph-grapher.Tpo -c -o stapgraph-grapher.obj `if test -f 'grapher.cxx'; then $(CYGPATH_W) 'grapher.cxx'; else $(CYGPATH_W) '$(srcdir)/grapher.cxx'; fi` -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/stapgraph-grapher.Tpo $(DEPDIR)/stapgraph-grapher.Po +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stapgraph_CPPFLAGS) $(CPPFLAGS) $(stapgraph_CXXFLAGS) $(CXXFLAGS) -MT stapgraph-grapher.obj -MD -MP -MF $(DEPDIR)/stapgraph-grapher.Tpo -c -o stapgraph-grapher.obj `if test -f 'grapher.cxx'; then $(CYGPATH_W) 'grapher.cxx'; else $(CYGPATH_W) '$(srcdir)/grapher.cxx'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stapgraph-grapher.Tpo $(DEPDIR)/stapgraph-grapher.Po +@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='grapher.cxx' object='stapgraph-grapher.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stapgraph_CPPFLAGS) $(CPPFLAGS) $(stapgraph_CXXFLAGS) $(CXXFLAGS) -c -o stapgraph-grapher.obj `if test -f 'grapher.cxx'; then $(CYGPATH_W) 'grapher.cxx'; else $(CYGPATH_W) '$(srcdir)/grapher.cxx'; fi` stapgraph-StapParser.o: StapParser.cxx -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stapgraph_CPPFLAGS) $(CPPFLAGS) $(stapgraph_CXXFLAGS) $(CXXFLAGS) -MT stapgraph-StapParser.o -MD -MP -MF $(DEPDIR)/stapgraph-StapParser.Tpo -c -o stapgraph-StapParser.o `test -f 'StapParser.cxx' || echo '$(srcdir)/'`StapParser.cxx -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/stapgraph-StapParser.Tpo $(DEPDIR)/stapgraph-StapParser.Po +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stapgraph_CPPFLAGS) $(CPPFLAGS) $(stapgraph_CXXFLAGS) $(CXXFLAGS) -MT stapgraph-StapParser.o -MD -MP -MF $(DEPDIR)/stapgraph-StapParser.Tpo -c -o stapgraph-StapParser.o `test -f 'StapParser.cxx' || echo '$(srcdir)/'`StapParser.cxx +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stapgraph-StapParser.Tpo $(DEPDIR)/stapgraph-StapParser.Po +@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='StapParser.cxx' object='stapgraph-StapParser.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stapgraph_CPPFLAGS) $(CPPFLAGS) $(stapgraph_CXXFLAGS) $(CXXFLAGS) -c -o stapgraph-StapParser.o `test -f 'StapParser.cxx' || echo '$(srcdir)/'`StapParser.cxx stapgraph-StapParser.obj: StapParser.cxx -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stapgraph_CPPFLAGS) $(CPPFLAGS) $(stapgraph_CXXFLAGS) $(CXXFLAGS) -MT stapgraph-StapParser.obj -MD -MP -MF $(DEPDIR)/stapgraph-StapParser.Tpo -c -o stapgraph-StapParser.obj `if test -f 'StapParser.cxx'; then $(CYGPATH_W) 'StapParser.cxx'; else $(CYGPATH_W) '$(srcdir)/StapParser.cxx'; fi` -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/stapgraph-StapParser.Tpo $(DEPDIR)/stapgraph-StapParser.Po +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stapgraph_CPPFLAGS) $(CPPFLAGS) $(stapgraph_CXXFLAGS) $(CXXFLAGS) -MT stapgraph-StapParser.obj -MD -MP -MF $(DEPDIR)/stapgraph-StapParser.Tpo -c -o stapgraph-StapParser.obj `if test -f 'StapParser.cxx'; then $(CYGPATH_W) 'StapParser.cxx'; else $(CYGPATH_W) '$(srcdir)/StapParser.cxx'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stapgraph-StapParser.Tpo $(DEPDIR)/stapgraph-StapParser.Po +@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='StapParser.cxx' object='stapgraph-StapParser.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stapgraph_CPPFLAGS) $(CPPFLAGS) $(stapgraph_CXXFLAGS) $(CXXFLAGS) -c -o stapgraph-StapParser.obj `if test -f 'StapParser.cxx'; then $(CYGPATH_W) 'StapParser.cxx'; else $(CYGPATH_W) '$(srcdir)/StapParser.cxx'; fi` stapgraph-Graph.o: Graph.cxx -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stapgraph_CPPFLAGS) $(CPPFLAGS) $(stapgraph_CXXFLAGS) $(CXXFLAGS) -MT stapgraph-Graph.o -MD -MP -MF $(DEPDIR)/stapgraph-Graph.Tpo -c -o stapgraph-Graph.o `test -f 'Graph.cxx' || echo '$(srcdir)/'`Graph.cxx -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/stapgraph-Graph.Tpo $(DEPDIR)/stapgraph-Graph.Po +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stapgraph_CPPFLAGS) $(CPPFLAGS) $(stapgraph_CXXFLAGS) $(CXXFLAGS) -MT stapgraph-Graph.o -MD -MP -MF $(DEPDIR)/stapgraph-Graph.Tpo -c -o stapgraph-Graph.o `test -f 'Graph.cxx' || echo '$(srcdir)/'`Graph.cxx +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stapgraph-Graph.Tpo $(DEPDIR)/stapgraph-Graph.Po +@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Graph.cxx' object='stapgraph-Graph.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stapgraph_CPPFLAGS) $(CPPFLAGS) $(stapgraph_CXXFLAGS) $(CXXFLAGS) -c -o stapgraph-Graph.o `test -f 'Graph.cxx' || echo '$(srcdir)/'`Graph.cxx stapgraph-Graph.obj: Graph.cxx -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stapgraph_CPPFLAGS) $(CPPFLAGS) $(stapgraph_CXXFLAGS) $(CXXFLAGS) -MT stapgraph-Graph.obj -MD -MP -MF $(DEPDIR)/stapgraph-Graph.Tpo -c -o stapgraph-Graph.obj `if test -f 'Graph.cxx'; then $(CYGPATH_W) 'Graph.cxx'; else $(CYGPATH_W) '$(srcdir)/Graph.cxx'; fi` -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/stapgraph-Graph.Tpo $(DEPDIR)/stapgraph-Graph.Po +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stapgraph_CPPFLAGS) $(CPPFLAGS) $(stapgraph_CXXFLAGS) $(CXXFLAGS) -MT stapgraph-Graph.obj -MD -MP -MF $(DEPDIR)/stapgraph-Graph.Tpo -c -o stapgraph-Graph.obj `if test -f 'Graph.cxx'; then $(CYGPATH_W) 'Graph.cxx'; else $(CYGPATH_W) '$(srcdir)/Graph.cxx'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stapgraph-Graph.Tpo $(DEPDIR)/stapgraph-Graph.Po +@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Graph.cxx' object='stapgraph-Graph.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stapgraph_CPPFLAGS) $(CPPFLAGS) $(stapgraph_CXXFLAGS) $(CXXFLAGS) -c -o stapgraph-Graph.obj `if test -f 'Graph.cxx'; then $(CYGPATH_W) 'Graph.cxx'; else $(CYGPATH_W) '$(srcdir)/Graph.cxx'; fi` stapgraph-GraphWidget.o: GraphWidget.cxx -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stapgraph_CPPFLAGS) $(CPPFLAGS) $(stapgraph_CXXFLAGS) $(CXXFLAGS) -MT stapgraph-GraphWidget.o -MD -MP -MF $(DEPDIR)/stapgraph-GraphWidget.Tpo -c -o stapgraph-GraphWidget.o `test -f 'GraphWidget.cxx' || echo '$(srcdir)/'`GraphWidget.cxx -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/stapgraph-GraphWidget.Tpo $(DEPDIR)/stapgraph-GraphWidget.Po +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stapgraph_CPPFLAGS) $(CPPFLAGS) $(stapgraph_CXXFLAGS) $(CXXFLAGS) -MT stapgraph-GraphWidget.o -MD -MP -MF $(DEPDIR)/stapgraph-GraphWidget.Tpo -c -o stapgraph-GraphWidget.o `test -f 'GraphWidget.cxx' || echo '$(srcdir)/'`GraphWidget.cxx +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stapgraph-GraphWidget.Tpo $(DEPDIR)/stapgraph-GraphWidget.Po +@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='GraphWidget.cxx' object='stapgraph-GraphWidget.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stapgraph_CPPFLAGS) $(CPPFLAGS) $(stapgraph_CXXFLAGS) $(CXXFLAGS) -c -o stapgraph-GraphWidget.o `test -f 'GraphWidget.cxx' || echo '$(srcdir)/'`GraphWidget.cxx stapgraph-GraphWidget.obj: GraphWidget.cxx -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stapgraph_CPPFLAGS) $(CPPFLAGS) $(stapgraph_CXXFLAGS) $(CXXFLAGS) -MT stapgraph-GraphWidget.obj -MD -MP -MF $(DEPDIR)/stapgraph-GraphWidget.Tpo -c -o stapgraph-GraphWidget.obj `if test -f 'GraphWidget.cxx'; then $(CYGPATH_W) 'GraphWidget.cxx'; else $(CYGPATH_W) '$(srcdir)/GraphWidget.cxx'; fi` -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/stapgraph-GraphWidget.Tpo $(DEPDIR)/stapgraph-GraphWidget.Po +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stapgraph_CPPFLAGS) $(CPPFLAGS) $(stapgraph_CXXFLAGS) $(CXXFLAGS) -MT stapgraph-GraphWidget.obj -MD -MP -MF $(DEPDIR)/stapgraph-GraphWidget.Tpo -c -o stapgraph-GraphWidget.obj `if test -f 'GraphWidget.cxx'; then $(CYGPATH_W) 'GraphWidget.cxx'; else $(CYGPATH_W) '$(srcdir)/GraphWidget.cxx'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stapgraph-GraphWidget.Tpo $(DEPDIR)/stapgraph-GraphWidget.Po +@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='GraphWidget.cxx' object='stapgraph-GraphWidget.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stapgraph_CPPFLAGS) $(CPPFLAGS) $(stapgraph_CXXFLAGS) $(CXXFLAGS) -c -o stapgraph-GraphWidget.obj `if test -f 'GraphWidget.cxx'; then $(CYGPATH_W) 'GraphWidget.cxx'; else $(CYGPATH_W) '$(srcdir)/GraphWidget.cxx'; fi` stapgraph-CairoWidget.o: CairoWidget.cxx -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stapgraph_CPPFLAGS) $(CPPFLAGS) $(stapgraph_CXXFLAGS) $(CXXFLAGS) -MT stapgraph-CairoWidget.o -MD -MP -MF $(DEPDIR)/stapgraph-CairoWidget.Tpo -c -o stapgraph-CairoWidget.o `test -f 'CairoWidget.cxx' || echo '$(srcdir)/'`CairoWidget.cxx -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/stapgraph-CairoWidget.Tpo $(DEPDIR)/stapgraph-CairoWidget.Po +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stapgraph_CPPFLAGS) $(CPPFLAGS) $(stapgraph_CXXFLAGS) $(CXXFLAGS) -MT stapgraph-CairoWidget.o -MD -MP -MF $(DEPDIR)/stapgraph-CairoWidget.Tpo -c -o stapgraph-CairoWidget.o `test -f 'CairoWidget.cxx' || echo '$(srcdir)/'`CairoWidget.cxx +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stapgraph-CairoWidget.Tpo $(DEPDIR)/stapgraph-CairoWidget.Po +@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='CairoWidget.cxx' object='stapgraph-CairoWidget.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stapgraph_CPPFLAGS) $(CPPFLAGS) $(stapgraph_CXXFLAGS) $(CXXFLAGS) -c -o stapgraph-CairoWidget.o `test -f 'CairoWidget.cxx' || echo '$(srcdir)/'`CairoWidget.cxx stapgraph-CairoWidget.obj: CairoWidget.cxx -@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stapgraph_CPPFLAGS) $(CPPFLAGS) $(stapgraph_CXXFLAGS) $(CXXFLAGS) -MT stapgraph-CairoWidget.obj -MD -MP -MF $(DEPDIR)/stapgraph-CairoWidget.Tpo -c -o stapgraph-CairoWidget.obj `if test -f 'CairoWidget.cxx'; then $(CYGPATH_W) 'CairoWidget.cxx'; else $(CYGPATH_W) '$(srcdir)/CairoWidget.cxx'; fi` -@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/stapgraph-CairoWidget.Tpo $(DEPDIR)/stapgraph-CairoWidget.Po +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stapgraph_CPPFLAGS) $(CPPFLAGS) $(stapgraph_CXXFLAGS) $(CXXFLAGS) -MT stapgraph-CairoWidget.obj -MD -MP -MF $(DEPDIR)/stapgraph-CairoWidget.Tpo -c -o stapgraph-CairoWidget.obj `if test -f 'CairoWidget.cxx'; then $(CYGPATH_W) 'CairoWidget.cxx'; else $(CYGPATH_W) '$(srcdir)/CairoWidget.cxx'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stapgraph-CairoWidget.Tpo $(DEPDIR)/stapgraph-CairoWidget.Po +@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='CairoWidget.cxx' object='stapgraph-CairoWidget.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stapgraph_CPPFLAGS) $(CPPFLAGS) $(stapgraph_CXXFLAGS) $(CXXFLAGS) -c -o stapgraph-CairoWidget.obj `if test -f 'CairoWidget.cxx'; then $(CYGPATH_W) 'CairoWidget.cxx'; else $(CYGPATH_W) '$(srcdir)/CairoWidget.cxx'; fi` -install-man1: $(man1_MANS) $(man_MANS) +install-man1: $(man_MANS) @$(NORMAL_INSTALL) test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)" - @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \ - l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ - for i in $$l2; do \ - case "$$i" in \ - *.1*) list="$$list $$i" ;; \ - esac; \ + @list=''; test -n "$(man1dir)" || exit 0; \ + { for i in $$list; do echo "$$i"; done; \ + l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ + sed -n '/\.1[a-z]*$$/p'; \ + } | while read p; do \ + if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; echo "$$p"; \ + done | \ + sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ + -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ + sed 'N;N;s,\n, ,g' | { \ + list=; while read file base inst; do \ + if test "$$base" = "$$inst"; then list="$$list $$file"; else \ + echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ + $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \ + fi; \ done; \ - for i in $$list; do \ - if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ - else file=$$i; fi; \ - ext=`echo $$i | sed -e 's/^.*\\.//'`; \ - case "$$ext" in \ - 1*) ;; \ - *) ext='1' ;; \ - esac; \ - inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ - inst=`echo $$inst | sed -e 's/^.*\///'`; \ - inst=`echo $$inst | sed '$(transform)'`.$$ext; \ - echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ - $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst"; \ - done + for i in $$list; do echo "$$i"; done | $(am__base_list) | \ + while read files; do \ + test -z "$$files" || { \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \ + done; } + uninstall-man1: @$(NORMAL_UNINSTALL) - @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \ - l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ - for i in $$l2; do \ - case "$$i" in \ - *.1*) list="$$list $$i" ;; \ - esac; \ - done; \ - for i in $$list; do \ - ext=`echo $$i | sed -e 's/^.*\\.//'`; \ - case "$$ext" in \ - 1*) ;; \ - *) ext='1' ;; \ - esac; \ - inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ - inst=`echo $$inst | sed -e 's/^.*\///'`; \ - inst=`echo $$inst | sed '$(transform)'`.$$ext; \ - echo " rm -f '$(DESTDIR)$(man1dir)/$$inst'"; \ - rm -f "$(DESTDIR)$(man1dir)/$$inst"; \ - done + @list=''; test -n "$(man1dir)" || exit 0; \ + files=`{ for i in $$list; do echo "$$i"; done; \ + l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ + sed -n '/\.1[a-z]*$$/p'; \ + } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ + -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ + test -z "$$files" || { \ + echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(man1dir)" && rm -f $$files; } install-dist_pkgdataDATA: $(dist_pkgdata_DATA) @$(NORMAL_INSTALL) test -z "$(pkgdatadir)" || $(MKDIR_P) "$(DESTDIR)$(pkgdatadir)" - @list='$(dist_pkgdata_DATA)'; for p in $$list; do \ + @list='$(dist_pkgdata_DATA)'; test -n "$(pkgdatadir)" || list=; \ + for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(dist_pkgdataDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgdatadir)/$$f'"; \ - $(dist_pkgdataDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgdatadir)/$$f"; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgdatadir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgdatadir)" || exit $$?; \ done uninstall-dist_pkgdataDATA: @$(NORMAL_UNINSTALL) - @list='$(dist_pkgdata_DATA)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(pkgdatadir)/$$f'"; \ - rm -f "$(DESTDIR)$(pkgdatadir)/$$f"; \ - done + @list='$(dist_pkgdata_DATA)'; test -n "$(pkgdatadir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(pkgdatadir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(pkgdatadir)" && rm -f $$files ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) - tags=; \ + set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique + $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) + @list='$(MANS)'; if test -n "$$list"; then \ + list=`for p in $$list; do \ + if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ + if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \ + if test -n "$$list" && \ + grep 'ab help2man is required to generate this page' $$list >/dev/null; then \ + echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \ + grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \ + echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \ + echo " typically \`make maintainer-clean' will remove them" >&2; \ + exit 1; \ + else :; fi; \ + else :; fi @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -496,13 +570,17 @@ distdir: $(DISTFILES) if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @@ -533,6 +611,7 @@ clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -553,6 +632,8 @@ dvi-am: html: html-am +html-am: + info: info-am info-am: @@ -561,18 +642,28 @@ install-data-am: install-dist_pkgdataDATA install-man install-dvi: install-dvi-am +install-dvi-am: + install-exec-am: install-binPROGRAMS install-html: install-html-am +install-html-am: + install-info: install-info-am +install-info-am: + install-man: install-man1 install-pdf: install-pdf-am +install-pdf-am: + install-ps: install-ps-am +install-ps-am: + installcheck-am: maintainer-clean: maintainer-clean-am @@ -613,6 +704,7 @@ uninstall-man: uninstall-man1 ps ps-am tags uninstall uninstall-am uninstall-binPROGRAMS \ uninstall-dist_pkgdataDATA uninstall-man uninstall-man1 + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: -- cgit From 06e217d9990635be43a59233d75c504385d1e243 Mon Sep 17 00:00:00 2001 From: Tim Moore Date: Tue, 1 Dec 2009 13:34:12 +0100 Subject: Account for zoom factor when choosing hover text * grapher/Graph.cxx (getTimeAtPoint): Divide by _zoomFactor too. --- grapher/Graph.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'grapher') diff --git a/grapher/Graph.cxx b/grapher/Graph.cxx index 1d478790..e7c03bd1 100644 --- a/grapher/Graph.cxx +++ b/grapher/Graph.cxx @@ -96,11 +96,11 @@ namespace systemtap cr->translate(0.0, _graphHeight); cr->scale(1.0, -1.0); GraphDataBase::TimeList::iterator lower - = std::lower_bound(graphData->times.begin(), graphData->times.end(), - _left); + = lower_bound(graphData->times.begin(), graphData->times.end(), + _left); GraphDataBase::TimeList::iterator upper - = std::upper_bound(graphData->times.begin(), graphData->times.end(), - _right); + = upper_bound(graphData->times.begin(), graphData->times.end(), + _right); // event bar if (graphData->style == GraphDataBase::EVENT) { @@ -265,6 +265,6 @@ namespace systemtap int64_t Graph::getTimeAtPoint(double x) { - return _left + (_right - _left) * ((x - 20.0)/_graphWidth); + return _left + (_right - _left) * ((x - 20.0)/(_zoomFactor * _graphWidth)); } } -- cgit From 6197b0dc80c4f87000d26213293fe2cb72fbe081 Mon Sep 17 00:00:00 2001 From: Tim Moore Date: Tue, 1 Dec 2009 19:05:09 +0100 Subject: Refactor drawing of different styles of graph into classes * grapher/GraphStyle.cxx: New file * grapher/GraphStyle.hxx: New file * grapher/Graph(draw): Move much drawing code to GraphStyle::draw --- grapher/Graph.cxx | 66 +------------------------ grapher/GraphData.hxx | 12 ++--- grapher/GraphStyle.cxx | 131 +++++++++++++++++++++++++++++++++++++++++++++++++ grapher/GraphStyle.hxx | 43 ++++++++++++++++ grapher/Makefile.am | 2 +- grapher/Makefile.in | 24 +++++++-- grapher/StapParser.cxx | 4 +- 7 files changed, 204 insertions(+), 78 deletions(-) create mode 100644 grapher/GraphStyle.cxx create mode 100644 grapher/GraphStyle.hxx (limited to 'grapher') diff --git a/grapher/Graph.cxx b/grapher/Graph.cxx index e7c03bd1..4b5b8eb6 100644 --- a/grapher/Graph.cxx +++ b/grapher/Graph.cxx @@ -88,74 +88,10 @@ namespace systemtap ++itr) { shared_ptr graphData = *itr; - shared_ptr > realData - = dynamic_pointer_cast >(*itr); - shared_ptr > stringData - = dynamic_pointer_cast >(*itr); cr->save(); cr->translate(0.0, _graphHeight); cr->scale(1.0, -1.0); - GraphDataBase::TimeList::iterator lower - = lower_bound(graphData->times.begin(), graphData->times.end(), - _left); - GraphDataBase::TimeList::iterator upper - = upper_bound(graphData->times.begin(), graphData->times.end(), - _right); - // event bar - if (graphData->style == GraphDataBase::EVENT) - { - double eventHeight = _graphHeight * (graphData->scale / 100.0); - cr->save(); - cr->set_line_width(3 * _lineWidth); - cr->set_source_rgba(graphData->color[0], graphData->color[1], - graphData->color[2], .33); - cr->move_to(0, eventHeight); - cr->line_to(_graphWidth, eventHeight); - cr->stroke(); - cr->restore(); - } - for (GraphDataBase::TimeList::iterator ditr = lower, de = upper; - ditr != de; - ++ditr) - { - size_t dataIndex = ditr - graphData->times.begin(); - cr->set_source_rgba(graphData->color[0], graphData->color[1], - graphData->color[2], 1.0); - if (graphData->style == GraphDataBase::BAR && realData) - { - cr->move_to((*ditr - _left) * horizScale, 0); - cr->line_to((*ditr - _left) * horizScale, - realData->data[dataIndex] * _graphHeight - / graphData->scale); - cr->stroke(); - } - else if (graphData->style == GraphDataBase::DOT && realData) - { - cr->arc((*ditr - _left) * horizScale, - realData->data[dataIndex] * _graphHeight / graphData->scale, - _lineWidth / 2.0, 0.0, M_PI * 2.0); - cr->fill(); - } - else if (graphData->style == GraphDataBase::EVENT && stringData) - { - double eventHeight = _graphHeight * (graphData->scale / 100.0); - cr->save(); - cr->select_font_face("Sans", Cairo::FONT_SLANT_NORMAL, - Cairo::FONT_WEIGHT_NORMAL); - cr->set_font_size(12.0); - cr->save(); - cr->scale(1.0, -1.0); - cr->move_to((*ditr - _left) * horizScale, - -eventHeight -3.0 * _lineWidth - 2.0); - cr->show_text(stringData->data[dataIndex]); - cr->restore(); - cr->rectangle((*ditr - _left) * horizScale - 1.5 * _lineWidth, - eventHeight - 1.5 * _lineWidth, - 3.0 * _lineWidth, 3.0 * _lineWidth); - cr->fill(); - cr->restore(); - } - } + graphData->style->draw(graphData, this, cr); cr->restore(); cr->save(); cr->select_font_face("Sans", Cairo::FONT_SLANT_NORMAL, diff --git a/grapher/GraphData.hxx b/grapher/GraphData.hxx index e06ffdb8..9a267fc5 100644 --- a/grapher/GraphData.hxx +++ b/grapher/GraphData.hxx @@ -11,19 +11,17 @@ #include +#include "GraphStyle.hxx" + namespace systemtap { struct GraphDataBase { virtual ~GraphDataBase() {} - enum Style - { BAR, - DOT, - EVENT - }; + typedef boost::circular_buffer TimeList; GraphDataBase(TimeList::capacity_type cap = 50000) - : scale(1.0), style(BAR), times(cap) + : scale(1.0), style(&GraphStyleBar::instance), times(cap) { color[0] = 0.0; color[1] = 1.0; color[2] = 0.0; } @@ -31,7 +29,7 @@ namespace systemtap // size of grid square at "normal" viewing double scale; double color[3]; - Style style; + GraphStyle* style; std::string title; std::string xAxisText; std::string yAxisText; diff --git a/grapher/GraphStyle.cxx b/grapher/GraphStyle.cxx new file mode 100644 index 00000000..887ed55f --- /dev/null +++ b/grapher/GraphStyle.cxx @@ -0,0 +1,131 @@ +#include "GraphStyle.hxx" + +#include "GraphData.hxx" +#include "Graph.hxx" + +namespace systemtap +{ + using namespace std; + using namespace tr1; + + GraphStyleBar GraphStyleBar::instance; + + void GraphStyleBar::draw(std::tr1::shared_ptr graphData, + Graph* graph, Cairo::RefPtr cr) + { + shared_ptr > realData + = dynamic_pointer_cast >(graphData); + if (!realData) + return; + int64_t left, right; + double top, bottom; + graph->getExtents(left, right, top, bottom); + double horizScale = (graph->_zoomFactor * graph->_graphWidth + / static_cast(right - left)); + GraphDataBase::TimeList::iterator lower + = lower_bound(graphData->times.begin(), graphData->times.end(), left); + GraphDataBase::TimeList::iterator upper + = upper_bound(graphData->times.begin(), graphData->times.end(), right); + for (GraphDataBase::TimeList::iterator ditr = lower, de = upper; + ditr != de; + ++ditr) + { + size_t dataIndex = ditr - graphData->times.begin(); + cr->set_source_rgba(graphData->color[0], graphData->color[1], + graphData->color[2], 1.0); + cr->move_to((*ditr - left) * horizScale, 0); + cr->line_to((*ditr - left) * horizScale, + realData->data[dataIndex] * graph->_graphHeight + / graphData->scale); + cr->stroke(); + } + } + + GraphStyleDot GraphStyleDot::instance; + + void GraphStyleDot::draw(std::tr1::shared_ptr graphData, + Graph* graph, Cairo::RefPtr cr) + { + shared_ptr > realData + = dynamic_pointer_cast >(graphData); + if (!realData) + return; + int64_t left, right; + double top, bottom; + graph->getExtents(left, right, top, bottom); + double horizScale = (graph->_zoomFactor * graph->_graphWidth + / static_cast(right - left)); + GraphDataBase::TimeList::iterator lower + = lower_bound(graphData->times.begin(), graphData->times.end(), left); + GraphDataBase::TimeList::iterator upper + = upper_bound(graphData->times.begin(), graphData->times.end(), right); + cr->set_source_rgba(graphData->color[0], graphData->color[1], + graphData->color[2], 1.0); + + for (GraphDataBase::TimeList::iterator ditr = lower, de = upper; + ditr != de; + ++ditr) + { + size_t dataIndex = ditr - graphData->times.begin(); + cr->arc((*ditr - left) * horizScale, + (realData->data[dataIndex] + * graph->_graphHeight / graphData->scale), + graph->_lineWidth / 2.0, 0.0, M_PI * 2.0); + cr->fill(); + } + } + + GraphStyleEvent GraphStyleEvent::instance; + + void GraphStyleEvent::draw(std::tr1::shared_ptr graphData, + Graph* graph, Cairo::RefPtr cr) + { + shared_ptr > stringData + = dynamic_pointer_cast >(graphData); + if (!stringData) + return; + int64_t left, right; + double top, bottom; + graph->getExtents(left, right, top, bottom); + double horizScale = (graph->_zoomFactor * graph->_graphWidth + / static_cast(right - left)); + double eventHeight = graph->_graphHeight * (graphData->scale / 100.0); + cr->save(); + cr->set_line_width(3 * graph->_lineWidth); + cr->set_source_rgba(graphData->color[0], graphData->color[1], + graphData->color[2], .33); + cr->move_to(0, eventHeight); + cr->line_to(graph->_graphWidth, eventHeight); + cr->stroke(); + cr->restore(); + GraphDataBase::TimeList::iterator lower + = lower_bound(graphData->times.begin(), graphData->times.end(), left); + GraphDataBase::TimeList::iterator upper + = upper_bound(graphData->times.begin(), graphData->times.end(), right); + for (GraphDataBase::TimeList::iterator ditr = lower, de = upper; + ditr != de; + ++ditr) + { + size_t dataIndex = ditr - graphData->times.begin(); + double eventHeight = graph->_graphHeight * (graphData->scale / 100.0); + cr->save(); + cr->select_font_face("Sans", Cairo::FONT_SLANT_NORMAL, + Cairo::FONT_WEIGHT_NORMAL); + cr->set_font_size(12.0); + cr->set_source_rgba(graphData->color[0], graphData->color[1], + graphData->color[2], 1.0); + cr->save(); + cr->scale(1.0, -1.0); + cr->move_to((*ditr - left) * horizScale, + -eventHeight - 3.0 * graph->_lineWidth - 2.0); + cr->show_text(stringData->data[dataIndex]); + cr->restore(); + cr->rectangle((*ditr - left) * horizScale - 1.5 * graph->_lineWidth, + eventHeight - 1.5 * graph->_lineWidth, + 3.0 * graph->_lineWidth, 3.0 * graph->_lineWidth); + cr->fill(); + cr->restore(); + } + } + +} diff --git a/grapher/GraphStyle.hxx b/grapher/GraphStyle.hxx new file mode 100644 index 00000000..4a0cd955 --- /dev/null +++ b/grapher/GraphStyle.hxx @@ -0,0 +1,43 @@ +#ifndef SYSTEMTAP_GRAPHSTYLE_HXX +#define SYSTEMTAP_GRAPHSTYLE_HXX 1 +#include + +#include + +namespace systemtap +{ + class GraphDataBase; + class Graph; + + class GraphStyle + { + public: + virtual void draw(std::tr1::shared_ptr graphData, + Graph* graph, Cairo::RefPtr cr) = 0; + }; + + class GraphStyleBar : public GraphStyle + { + public: + virtual void draw(std::tr1::shared_ptr graphData, + Graph* graph, Cairo::RefPtr cr); + static GraphStyleBar instance; + }; + + class GraphStyleDot : public GraphStyle + { + public: + virtual void draw(std::tr1::shared_ptr graphData, + Graph* graph, Cairo::RefPtr cr); + static GraphStyleDot instance; + }; + + class GraphStyleEvent : public GraphStyle + { + public: + virtual void draw(std::tr1::shared_ptr graphData, + Graph* graph, Cairo::RefPtr cr); + static GraphStyleEvent instance; + }; +} +#endif diff --git a/grapher/Makefile.am b/grapher/Makefile.am index 73f4cd8c..5bca286a 100644 --- a/grapher/Makefile.am +++ b/grapher/Makefile.am @@ -7,7 +7,7 @@ man_MANS = stapgraph.1 # the libglade ones. stapgraph_CPPFLAGS = -DPKGDATADIR='"${pkgdatadir}"' stapgraph_CXXFLAGS = $(libglade_CFLAGS) -Wall -Werror -stapgraph_SOURCES = grapher.cxx StapParser.cxx Graph.cxx GraphWidget.cxx CairoWidget.cxx +stapgraph_SOURCES = grapher.cxx StapParser.cxx Graph.cxx GraphWidget.cxx CairoWidget.cxx GraphStyle.cxx stapgraph_LDADD = $(libglade_LIBS) dist_pkgdata_DATA = graph-dialog.glade stap-start.glade endif diff --git a/grapher/Makefile.in b/grapher/Makefile.in index 34b0cd7a..f06402bc 100644 --- a/grapher/Makefile.in +++ b/grapher/Makefile.in @@ -49,13 +49,14 @@ am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" \ "$(DESTDIR)$(pkgdatadir)" PROGRAMS = $(bin_PROGRAMS) am__stapgraph_SOURCES_DIST = grapher.cxx StapParser.cxx Graph.cxx \ - GraphWidget.cxx CairoWidget.cxx + GraphWidget.cxx CairoWidget.cxx GraphStyle.cxx @BUILD_GRAPHER_TRUE@am_stapgraph_OBJECTS = \ @BUILD_GRAPHER_TRUE@ stapgraph-grapher.$(OBJEXT) \ @BUILD_GRAPHER_TRUE@ stapgraph-StapParser.$(OBJEXT) \ @BUILD_GRAPHER_TRUE@ stapgraph-Graph.$(OBJEXT) \ @BUILD_GRAPHER_TRUE@ stapgraph-GraphWidget.$(OBJEXT) \ -@BUILD_GRAPHER_TRUE@ stapgraph-CairoWidget.$(OBJEXT) +@BUILD_GRAPHER_TRUE@ stapgraph-CairoWidget.$(OBJEXT) \ +@BUILD_GRAPHER_TRUE@ stapgraph-GraphStyle.$(OBJEXT) stapgraph_OBJECTS = $(am_stapgraph_OBJECTS) am__DEPENDENCIES_1 = @BUILD_GRAPHER_TRUE@stapgraph_DEPENDENCIES = $(am__DEPENDENCIES_1) @@ -243,7 +244,7 @@ top_srcdir = @top_srcdir@ # the libglade ones. @BUILD_GRAPHER_TRUE@stapgraph_CPPFLAGS = -DPKGDATADIR='"${pkgdatadir}"' @BUILD_GRAPHER_TRUE@stapgraph_CXXFLAGS = $(libglade_CFLAGS) -Wall -Werror -@BUILD_GRAPHER_TRUE@stapgraph_SOURCES = grapher.cxx StapParser.cxx Graph.cxx GraphWidget.cxx CairoWidget.cxx +@BUILD_GRAPHER_TRUE@stapgraph_SOURCES = grapher.cxx StapParser.cxx Graph.cxx GraphWidget.cxx CairoWidget.cxx GraphStyle.cxx @BUILD_GRAPHER_TRUE@stapgraph_LDADD = $(libglade_LIBS) @BUILD_GRAPHER_TRUE@dist_pkgdata_DATA = graph-dialog.glade stap-start.glade all: all-am @@ -331,6 +332,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stapgraph-CairoWidget.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stapgraph-Graph.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stapgraph-GraphStyle.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stapgraph-GraphWidget.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stapgraph-StapParser.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stapgraph-grapher.Po@am__quote@ @@ -430,6 +432,22 @@ stapgraph-CairoWidget.obj: CairoWidget.cxx @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='CairoWidget.cxx' object='stapgraph-CairoWidget.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stapgraph_CPPFLAGS) $(CPPFLAGS) $(stapgraph_CXXFLAGS) $(CXXFLAGS) -c -o stapgraph-CairoWidget.obj `if test -f 'CairoWidget.cxx'; then $(CYGPATH_W) 'CairoWidget.cxx'; else $(CYGPATH_W) '$(srcdir)/CairoWidget.cxx'; fi` + +stapgraph-GraphStyle.o: GraphStyle.cxx +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stapgraph_CPPFLAGS) $(CPPFLAGS) $(stapgraph_CXXFLAGS) $(CXXFLAGS) -MT stapgraph-GraphStyle.o -MD -MP -MF $(DEPDIR)/stapgraph-GraphStyle.Tpo -c -o stapgraph-GraphStyle.o `test -f 'GraphStyle.cxx' || echo '$(srcdir)/'`GraphStyle.cxx +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stapgraph-GraphStyle.Tpo $(DEPDIR)/stapgraph-GraphStyle.Po +@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='GraphStyle.cxx' object='stapgraph-GraphStyle.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stapgraph_CPPFLAGS) $(CPPFLAGS) $(stapgraph_CXXFLAGS) $(CXXFLAGS) -c -o stapgraph-GraphStyle.o `test -f 'GraphStyle.cxx' || echo '$(srcdir)/'`GraphStyle.cxx + +stapgraph-GraphStyle.obj: GraphStyle.cxx +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stapgraph_CPPFLAGS) $(CPPFLAGS) $(stapgraph_CXXFLAGS) $(CXXFLAGS) -MT stapgraph-GraphStyle.obj -MD -MP -MF $(DEPDIR)/stapgraph-GraphStyle.Tpo -c -o stapgraph-GraphStyle.obj `if test -f 'GraphStyle.cxx'; then $(CYGPATH_W) 'GraphStyle.cxx'; else $(CYGPATH_W) '$(srcdir)/GraphStyle.cxx'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stapgraph-GraphStyle.Tpo $(DEPDIR)/stapgraph-GraphStyle.Po +@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='GraphStyle.cxx' object='stapgraph-GraphStyle.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stapgraph_CPPFLAGS) $(CPPFLAGS) $(stapgraph_CXXFLAGS) $(CXXFLAGS) -c -o stapgraph-GraphStyle.obj `if test -f 'GraphStyle.cxx'; then $(CYGPATH_W) 'GraphStyle.cxx'; else $(CYGPATH_W) '$(srcdir)/GraphStyle.cxx'; fi` install-man1: $(man_MANS) @$(NORMAL_INSTALL) test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)" diff --git a/grapher/StapParser.cxx b/grapher/StapParser.cxx index ddc14b2d..af5f2d7d 100644 --- a/grapher/StapParser.cxx +++ b/grapher/StapParser.cxx @@ -102,7 +102,7 @@ vector commaSplit(const boost::sub_range& range) std::tr1::shared_ptr > dataSet(new GraphData); if (style == "dot") - dataSet->style = GraphDataBase::DOT; + dataSet->style = &GraphStyleDot::instance; dataSet->color[0] = (hexColor >> 16) / 255.0; dataSet->color[1] = ((hexColor >> 8) & 0xff) / 255.0; dataSet->color[2] = (hexColor & 0xff) / 255.0; @@ -114,7 +114,7 @@ vector commaSplit(const boost::sub_range& range) { std::tr1::shared_ptr > dataSet(new GraphData); - dataSet->style = GraphDataBase::EVENT; + dataSet->style = &GraphStyleEvent::instance; dataSet->color[0] = (hexColor >> 16) / 255.0; dataSet->color[1] = ((hexColor >> 8) & 0xff) / 255.0; dataSet->color[2] = (hexColor & 0xff) / 255.0; -- cgit From c10fce7d6aaa57a4f94f9d7aeea906597456f7ce Mon Sep 17 00:00:00 2001 From: Tim Moore Date: Wed, 2 Dec 2009 19:27:07 +0100 Subject: Make the hover text conform to data displayed. Start of code to be more selective about the association between the hover text and the underling graph. Also, show the data set name in hover text. * grapher/GraphStyle.hxx (dataIndexAtPoint): New virtual function. * grapher/GraphStyle.cxx (dataIndexAtPoint): Implementation for bar graphs * grapher/GraphWidget.cxx (onHoverTimeout): Use dataIndexAtPoint. --- grapher/Graph.cxx | 18 ++++++++++-------- grapher/Graph.hxx | 2 ++ grapher/GraphData.hxx | 1 + grapher/GraphStyle.cxx | 26 ++++++++++++++++++++++++++ grapher/GraphStyle.hxx | 23 +++++++++++++++++------ grapher/GraphWidget.cxx | 27 +++++++++++++++------------ grapher/StapParser.cxx | 2 ++ 7 files changed, 73 insertions(+), 26 deletions(-) (limited to 'grapher') diff --git a/grapher/Graph.cxx b/grapher/Graph.cxx index 4b5b8eb6..55ffcdf2 100644 --- a/grapher/Graph.cxx +++ b/grapher/Graph.cxx @@ -13,7 +13,8 @@ namespace systemtap : _width(600), _height(200), _graphX(0), _graphY(0), _graphWidth(580), _graphHeight(180), _lineWidth(2), _autoScaling(true), _autoScrolling(true), - _zoomFactor(1.0), _playButton(new CairoPlayButton), + _zoomFactor(1.0), _xOffset(20.0), _yOffset(0.0), + _playButton(new CairoPlayButton), _left(0), _right(1), _top(5.0), _bottom(0.0) { setOrigin(x, y); @@ -80,7 +81,7 @@ namespace systemtap cr->save(); double horizScale = _zoomFactor * _graphWidth / static_cast(_right - _left); - cr->translate(20.0, 0.0); + cr->translate(_xOffset, _yOffset); cr->set_line_width(_lineWidth); for (DatasetList::iterator itr = _datasets.begin(), e = _datasets.end(); @@ -134,9 +135,9 @@ namespace systemtap cr->select_font_face("Sans", Cairo::FONT_SLANT_NORMAL, Cairo::FONT_WEIGHT_NORMAL); cr->set_font_size(10.0); - cr->move_to(20.0, 0.0); - cr->line_to(20.0, _height); - cr->move_to(20.0, _graphHeight); + cr->move_to(_xOffset, _yOffset); + cr->line_to(_xOffset, _height); + cr->move_to(_xOffset, _graphHeight); cr->line_to(_graphWidth, _graphHeight); cr->stroke(); std::valarray dash(1); @@ -145,8 +146,8 @@ namespace systemtap double prevTextAdvance = 0; for (int64_t tickVal = startTime; tickVal <= _right; tickVal += majorUnit) { - double x = (tickVal - _left) * horizScale + 20.0; - cr->move_to(x, 0.0); + double x = (tickVal - _left) * horizScale + _xOffset; + cr->move_to(x, _yOffset); cr->line_to(x, _graphHeight); std::ostringstream stream; stream << tickVal; @@ -201,6 +202,7 @@ namespace systemtap int64_t Graph::getTimeAtPoint(double x) { - return _left + (_right - _left) * ((x - 20.0)/(_zoomFactor * _graphWidth)); + return (_left + + (_right - _left) * ((x - _xOffset)/(_zoomFactor * _graphWidth))); } } diff --git a/grapher/Graph.hxx b/grapher/Graph.hxx index e0e864d6..b9efb2a2 100644 --- a/grapher/Graph.hxx +++ b/grapher/Graph.hxx @@ -36,6 +36,8 @@ namespace systemtap bool _autoScaling; bool _autoScrolling; double _zoomFactor; + double _xOffset; + double _yOffset; std::tr1::shared_ptr _playButton; DatasetList& getDatasets() { return _datasets; } int64_t getTimeAtPoint(double x); diff --git a/grapher/GraphData.hxx b/grapher/GraphData.hxx index 9a267fc5..04f415f3 100644 --- a/grapher/GraphData.hxx +++ b/grapher/GraphData.hxx @@ -27,6 +27,7 @@ namespace systemtap } virtual std::string elementAsString(size_t element) = 0; // size of grid square at "normal" viewing + std::string name; double scale; double color[3]; GraphStyle* style; diff --git a/grapher/GraphStyle.cxx b/grapher/GraphStyle.cxx index 887ed55f..55fc73f4 100644 --- a/grapher/GraphStyle.cxx +++ b/grapher/GraphStyle.cxx @@ -8,6 +8,9 @@ namespace systemtap using namespace std; using namespace tr1; + typedef pair TimeListPair; + GraphStyleBar GraphStyleBar::instance; void GraphStyleBar::draw(std::tr1::shared_ptr graphData, @@ -41,6 +44,29 @@ namespace systemtap } } + ssize_t GraphStyleBar::dataIndexAtPoint(double x, double y, + shared_ptr graphData, + shared_ptr graph) + { + shared_ptr > realData + = dynamic_pointer_cast >(graphData); + if (!realData) + return -1; + int64_t left, right; + double top, bottom; + graph->getExtents(left, right, top, bottom); + double t = graph->getTimeAtPoint(x); + TimeListPair range + = equal_range(graphData->times.begin(), graphData->times.end(), t); + size_t dataIndex = distance(graphData->times.begin(), range.first); + double val = realData->data[dataIndex]; + double ycoord = val * graph->_graphHeight / graphData->scale; + if (y >= graph->_yOffset + graph->_graphHeight - ycoord) + return static_cast(dataIndex); + else + return -1; + } + GraphStyleDot GraphStyleDot::instance; void GraphStyleDot::draw(std::tr1::shared_ptr graphData, diff --git a/grapher/GraphStyle.hxx b/grapher/GraphStyle.hxx index 4a0cd955..9625f451 100644 --- a/grapher/GraphStyle.hxx +++ b/grapher/GraphStyle.hxx @@ -14,29 +14,40 @@ namespace systemtap public: virtual void draw(std::tr1::shared_ptr graphData, Graph* graph, Cairo::RefPtr cr) = 0; + virtual ssize_t dataIndexAtPoint(double x, double y, + std::tr1::shared_ptr + graphData, + std::tr1::shared_ptr graph) + { + return -1; + } }; class GraphStyleBar : public GraphStyle { public: - virtual void draw(std::tr1::shared_ptr graphData, - Graph* graph, Cairo::RefPtr cr); + void draw(std::tr1::shared_ptr graphData, + Graph* graph, Cairo::RefPtr cr); + static GraphStyleBar instance; + ssize_t dataIndexAtPoint(double x, double y, + std::tr1::shared_ptr graphData, + std::tr1::shared_ptr graph); }; class GraphStyleDot : public GraphStyle { public: - virtual void draw(std::tr1::shared_ptr graphData, - Graph* graph, Cairo::RefPtr cr); + void draw(std::tr1::shared_ptr graphData, + Graph* graph, Cairo::RefPtr cr); static GraphStyleDot instance; }; class GraphStyleEvent : public GraphStyle { public: - virtual void draw(std::tr1::shared_ptr graphData, - Graph* graph, Cairo::RefPtr cr); + void draw(std::tr1::shared_ptr graphData, + Graph* graph, Cairo::RefPtr cr); static GraphStyleEvent instance; }; } diff --git a/grapher/GraphWidget.cxx b/grapher/GraphWidget.cxx index 9a203d87..9067988a 100644 --- a/grapher/GraphWidget.cxx +++ b/grapher/GraphWidget.cxx @@ -276,20 +276,23 @@ namespace systemtap if (!_hoverText) _hoverText = shared_ptr(new CairoTextBox()); _hoverText->setOrigin(_mouseX + 5, _mouseY - 5); - int64_t t = g->getTimeAtPoint(_mouseX); Graph::DatasetList& dataSets = g->getDatasets(); - if (!dataSets.empty()) - { - shared_ptr gdbase = dataSets[0]; - GraphDataBase::TimeList::iterator itime - = std::lower_bound(gdbase->times.begin(), gdbase->times.end(), t); - if (itime != gdbase->times.end()) { - size_t index = distance(gdbase->times.begin(), itime); - _hoverText->contents = gdbase->elementAsString(index); - _hoverText->setVisible(true); - queue_draw(); + for (Graph::DatasetList::reverse_iterator ritr = dataSets.rbegin(), + end = dataSets.rend(); + ritr != end; + ++ritr) + { + ssize_t index + = (*ritr)->style->dataIndexAtPoint(_mouseX, _mouseY, *ritr, g); + if (index >= 0) + { + _hoverText->contents = (*ritr)->name + + ": " + (*ritr)->elementAsString(index); + _hoverText->setVisible(true); + queue_draw(); + break; } - } + } } return false; } diff --git a/grapher/StapParser.cxx b/grapher/StapParser.cxx index af5f2d7d..6218e229 100644 --- a/grapher/StapParser.cxx +++ b/grapher/StapParser.cxx @@ -101,6 +101,7 @@ vector commaSplit(const boost::sub_range& range) { std::tr1::shared_ptr > dataSet(new GraphData); + dataSet->name = setName; if (style == "dot") dataSet->style = &GraphStyleDot::instance; dataSet->color[0] = (hexColor >> 16) / 255.0; @@ -114,6 +115,7 @@ vector commaSplit(const boost::sub_range& range) { std::tr1::shared_ptr > dataSet(new GraphData); + dataSet->name = setName; dataSet->style = &GraphStyleEvent::instance; dataSet->color[0] = (hexColor >> 16) / 255.0; dataSet->color[1] = ((hexColor >> 8) & 0xff) / 255.0; -- cgit