All of lore.kernel.org
 help / color / mirror / Atom feed
From: Luiz Capitulino <lcapitulino@redhat.com>
To: John Kacur <jkacur@redhat.com>
Cc: linux-rt-users@vger.kernel.org, williams@redhat.com
Subject: Re: [PATCH 3/4] cyclictest: move tracemark_fd handling to its own function
Date: Tue, 22 Mar 2016 10:42:33 -0400	[thread overview]
Message-ID: <20160322104233.2b0698ae@redhat.com> (raw)
In-Reply-To: <alpine.LFD.2.20.1603221534380.10687@riemann>

On Tue, 22 Mar 2016 15:35:55 +0100 (CET)
John Kacur <jkacur@redhat.com> wrote:

> 
> 
> On Thu, 17 Mar 2016, Luiz Capitulino wrote:
> 
> > A function added by the next commit will want to call
> > this code too.
> > 
> > Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
> > ---
> >  src/cyclictest/cyclictest.c | 22 ++++++++++++++--------
> >  1 file changed, 14 insertions(+), 8 deletions(-)
> > 
> > diff --git a/src/cyclictest/cyclictest.c b/src/cyclictest/cyclictest.c
> > index 4e80831..65f2aec 100644
> > --- a/src/cyclictest/cyclictest.c
> > +++ b/src/cyclictest/cyclictest.c
> > @@ -532,6 +532,19 @@ static void debugfs_prepare(void)
> >  		fileprefix = procfileprefix;
> >  }
> >  
> > +static void open_tracemark_fd(void)
> > +{
> > +	char path[MAX_PATH];
> > +
> > +	if (tracemark_fd >= 0)
> > +		return;
> > +
> > +	sprintf(path, "%s/%s", fileprefix, "trace_marker");
> > +	tracemark_fd = open(path, O_WRONLY);
> > +	if (tracemark_fd < 0)
> > +		warn("unable to open trace_marker file: %s\n", path);
> > +}
> > +
> >  static void setup_tracer(void)
> >  {
> >  	if (!tracelimit || notrace)
> > @@ -647,14 +660,7 @@ static void setup_tracer(void)
> >  				fatal("unable to open %s for tracing", path);
> >  		}
> >  
> > -		/* open the tracemark file descriptor */
> > -		if (tracemark_fd == -1) {
> > -			char path[MAX_PATH];
> > -			strcat(strcpy(path, fileprefix), "trace_marker");
> > -			if ((tracemark_fd = open(path, O_WRONLY)) == -1)
> > -				warn("unable to open trace_marker file: %s\n", path);
> > -		}
> > -
> > +		open_tracemark_fd();
> >  	} else {
> >  		setkernvar("trace_all_cpus", "1");
> >  		setkernvar("trace_freerunning", "1");
> > -- 
> > 2.1.0
> 
> Signed-off-by: John Kacur <jkacur@redhat.com>
> 
> But, once again, it didn't apply cleanly,

Yeah, I didn't know I had to use the devel branch. Do you want me
to re-send or did git solved the conflicts?

> and you should have included it
> with the next set off patches where it is required, because I was 
> scratching my head as to why I should include this until I looked there.

Which set of patches?

  reply	other threads:[~2016-03-22 14:42 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-17 18:30 [PATCH v2 0/4] cyclictest: improve running under trace-cmd Luiz Capitulino
2016-03-17 18:30 ` [PATCH 1/4] cyclictest: tracing(): check for notrace Luiz Capitulino
2016-03-22 14:37   ` John Kacur
2016-03-17 18:30 ` [PATCH 2/4] cyclictest: move debugfs init code to its own function Luiz Capitulino
2016-03-22 14:40   ` John Kacur
2016-03-17 18:30 ` [PATCH 3/4] cyclictest: move tracemark_fd handling " Luiz Capitulino
2016-03-22 14:35   ` John Kacur
2016-03-22 14:42     ` Luiz Capitulino [this message]
2016-03-17 18:30 ` [PATCH 4/4] cyclictest: add --tracemark option Luiz Capitulino
2016-03-22 14:57   ` John Kacur
2016-03-22 15:01     ` Luiz Capitulino
  -- strict thread matches above, loose matches on Subject: below --
2016-02-25 16:29 [PATCH 0/4] cyclictest: improve running under trace-cmd Luiz Capitulino
2016-02-25 16:29 ` [PATCH 3/4] cyclictest: move tracemark_fd handling to its own function Luiz Capitulino

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=20160322104233.2b0698ae@redhat.com \
    --to=lcapitulino@redhat.com \
    --cc=jkacur@redhat.com \
    --cc=linux-rt-users@vger.kernel.org \
    --cc=williams@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.