linux-trace-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Slavomir Kaslev <kaslevs@vmware.com>
To: Yordan Karadzhov <ykaradzhov@vmware.com>
Cc: "rostedt@goodmis.org" <rostedt@goodmis.org>,
	"linux-trace-devel@vger.kernel.org" 
	<linux-trace-devel@vger.kernel.org>
Subject: Re: [PATCH v2 8/8] kernel-shark: Handle the case when the marker points to a filtered entry
Date: Fri, 19 Apr 2019 07:55:57 +0000	[thread overview]
Message-ID: <ff34ab566d2429281c581f5432eba95d91f99686.camel@vmware.com> (raw)
In-Reply-To: <b0021d24-65c0-7e97-6c23-a13732bc7760@vmware.com>

On Fri, 2019-04-19 at 07:46 +0000, Yordan Karadzhov wrote:
> 
> On 19.04.19 г. 10:29 ч., Slavomir Kaslev wrote:
> > On Thu, Apr 18, 2019 at 6:23 PM Yordan Karadzhov <
> > ykaradzhov@vmware.com> wrote:
> > > Markers can point to entries that are filtered out. When
> > > switching
> > > the marker it may happen that new Active Marker points to an
> > > entry
> > > that is filtered. In this case no actions must be taken and a
> > > warning
> > > message for the user must be displayed.
> > > 
> > > Signed-off-by: Yordan Karadzhov <ykaradzhov@vmware.com>
> > > ---
> > >   kernel-shark/src/KsTraceViewer.cpp | 27 +++++++++++++++++----
> > > ------
> > >   kernel-shark/src/KsTraceViewer.hpp |  2 ++
> > >   2 files changed, 19 insertions(+), 10 deletions(-)
> > > 
> > > diff --git a/kernel-shark/src/KsTraceViewer.cpp b/kernel-
> > > shark/src/KsTraceViewer.cpp
> > > index 04a38b8..85da64f 100644
> > > --- a/kernel-shark/src/KsTraceViewer.cpp
> > > +++ b/kernel-shark/src/KsTraceViewer.cpp
> > > @@ -61,7 +61,8 @@ KsTraceViewer::KsTraceViewer(QWidget *parent)
> > >     _graphFollowsCheckBox(this),
> > >     _graphFollows(true),
> > >     _mState(nullptr),
> > > -  _data(nullptr)
> > > +  _data(nullptr),
> > > +  _em(this)
> > >   {
> > >          this->setSizePolicy(QSizePolicy::Preferred,
> > > QSizePolicy::Maximum);
> > > 
> > > @@ -493,15 +494,21 @@ void KsTraceViewer::markSwitch()
> > >                  QModelIndex index =
> > >                          _proxyModel.mapFromSource(_model.index(r
> > > ow, 0));
> > > 
> > > -               /*
> > > -                * The row of the active marker will be colored
> > > according to
> > > -                * the assigned property of the current state of
> > > the Dual
> > > -                * marker. Auto-scrolling is temporarily disabled
> > > because we
> > > -                * do not want to scroll to the position of the
> > > marker yet.
> > > -                */
> > > -               _view.setAutoScroll(false);
> > > -               _view.selectRow(index.row());
> > > -               _view.setAutoScroll(true);
> > > +               if (index.isValid()) {
> > > +                       /*
> > > +                        * The row of the active marker will be
> > > colored according to
> > > +                        * the assigned property of the current
> > > state of the Dual
> > > +                        * marker. Auto-scrolling is temporarily
> > > disabled because we
> > > +                        * do not want to scroll to the position
> > > of the marker yet.
> > > +                        */
> > > +                       _view.setAutoScroll(false);
> > > +                       _view.selectRow(index.row());
> > > +                       _view.setAutoScroll(true);
> > > +               } else {
> > > +                       _view.clearSelection();
> > > +                       QString err("The marker's entry is
> > > filtered out.");
> > > +                       _em.showMessage(err);
> > 
> > When is this error message going to be cleared? I don't think it
> > changes atm unless a new error comes along.
> 
> The message will be displayed in a small widget (QErrorMessage).
> This 
> widget has an "OK" button and a "Show this message again" checkbox.
> 
> To clear the message you can either press "OK" or close the widget.
> If you uncheck the "Show this message again" checkbox, no message
> will 
> be shown next time when the error occurs.

That makes sense, in that case it lgtm

Reviewed-by: Slavomir Kaslev <kaslevs@vmware.com>

-- Slavi

  reply	other threads:[~2019-04-19 18:21 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-18 15:21 [PATCH v2 0/8] Various modifications and fixes toward KS 1.0 Yordan Karadzhov
2019-04-18 15:21 ` [PATCH v2 1/8] kernel-shark: Configuration information in ${HOME}/.cache/kernelshark Yordan Karadzhov
2019-04-19  7:19   ` Slavomir Kaslev
2019-04-19 18:18     ` Steven Rostedt
2019-04-18 15:21 ` [PATCH v2 2/8] kernel-shark: Remove the definition of KS_CONF_DIR Yordan Karadzhov
2019-04-18 15:21 ` [PATCH v2 3/8] kernel-shark: Add logic for the initial path of Open-File dialogs Yordan Karadzhov
2019-04-19  7:26   ` Slavomir Kaslev
2019-04-19 17:48     ` Steven Rostedt
2019-04-18 15:21 ` [PATCH v2 4/8] kernel-shark: Add logic for the plugins search path Yordan Karadzhov
2019-04-19  7:43   ` Slavomir Kaslev
2019-04-19 17:59     ` Steven Rostedt
2019-04-18 15:21 ` [PATCH v2 5/8] kernel-shark: Rename KS_DIR to KS_SOURCE_DIR Yordan Karadzhov
2019-04-18 15:21 ` [PATCH v2 6/8] kernel-shark: Load Last Session from command line Yordan Karadzhov
2019-04-18 15:21 ` [PATCH v2 7/8] kernel-shark: Use proper searching condition when the dataset is small Yordan Karadzhov
2019-04-18 15:21 ` [PATCH v2 8/8] kernel-shark: Handle the case when the marker points to a filtered entry Yordan Karadzhov
2019-04-19  7:29   ` Slavomir Kaslev
2019-04-19  7:46     ` Yordan Karadzhov
2019-04-19  7:55       ` Slavomir Kaslev [this message]
2019-04-19  8:07       ` Slavomir Kaslev
2019-04-19 18:03       ` Steven Rostedt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ff34ab566d2429281c581f5432eba95d91f99686.camel@vmware.com \
    --to=kaslevs@vmware.com \
    --cc=linux-trace-devel@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=ykaradzhov@vmware.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).