linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
To: Jiri Olsa <jolsa@redhat.com>
Cc: mingo@redhat.com, ak@linux.intel.com,
	Michael Ellerman <mpe@ellerman.id.au>,
	Arnaldo Carvalho de Melo <acme@kernel.org>,
	Paul Mackerras <paulus@samba.org>,
	namhyung@kernel.org, linuxppc-dev@lists.ozlabs.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/4] perf: jevents: Program to convert JSON file to C style file
Date: Fri, 22 May 2015 10:25:40 -0700	[thread overview]
Message-ID: <20150522172540.GA23163@us.ibm.com> (raw)
In-Reply-To: <20150522145628.GB16473@krava.redhat.com>

Jiri Olsa [jolsa@redhat.com] wrote:
| On Tue, May 19, 2015 at 05:02:08PM -0700, Sukadev Bhattiprolu wrote:
| 
| SNIP
| 
| > +int main(int argc, char *argv[])
| > +{
| > +	int rc;
| > +	int flags;
| 
| SNIP
| 
| > +
| > +	rc = uname(&uts);
| > +	if (rc < 0) {
| > +		printf("%s: uname() failed: %s\n", argv[0], strerror(errno));
| > +		goto empty_map;
| > +	}
| > +
| > +	/* TODO: Add other flavors of machine type here */
| > +	if (!strcmp(uts.machine, "ppc64"))
| > +		arch = "powerpc";
| > +	else if (!strcmp(uts.machine, "i686"))
| > +		arch = "x86";
| > +	else if (!strcmp(uts.machine, "x86_64"))
| > +		arch = "x86";
| > +	else {
| > +		printf("%s: Unknown architecture %s\n", argv[0], uts.machine);
| > +		goto empty_map;
| > +	}
| 
| hum, wouldnt it be easier to pass the arch directly from the Makefile,
| we should have it ready in the $(ARCH) variable..

Yes, I will do that and make all three args (arch, start_dir, output_file)
mandatory (jevents won't be run from command line often, it doesn't need
default args).

  reply	other threads:[~2015-05-22 17:26 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-20  0:02 [PATCH 0/4] perf: Add support for PMU events in JSON format Sukadev Bhattiprolu
2015-05-20  0:02 ` [PATCH 1/4] perf: Add jsmn `jasmine' JSON parser Sukadev Bhattiprolu
2015-05-20  0:02 ` [PATCH 2/4] perf: jevents: Program to convert JSON file to C style file Sukadev Bhattiprolu
2015-05-22 14:56   ` Jiri Olsa
2015-05-22 15:58     ` Sukadev Bhattiprolu
2015-05-22 17:33       ` Jiri Olsa
2015-05-22 18:01       ` Andi Kleen
2015-05-22 18:09         ` Sukadev Bhattiprolu
2015-05-22 21:28           ` Andi Kleen
2015-05-22 14:56   ` Jiri Olsa
2015-05-22 17:25     ` Sukadev Bhattiprolu [this message]
2015-05-27 13:54   ` Namhyung Kim
2015-05-27 14:40     ` Andi Kleen
2015-05-27 14:59       ` Namhyung Kim
2015-05-28 11:52         ` Jiri Olsa
2015-05-28 12:09           ` Ingo Molnar
2015-05-28 13:07             ` Ingo Molnar
2015-05-28 15:39               ` Andi Kleen
2015-05-29  7:27                 ` Ingo Molnar
2015-05-31 16:07                   ` Andi Kleen
2015-05-20  0:02 ` [PATCH 3/4] perf: Use pmu_events_map table to create event aliases Sukadev Bhattiprolu
2015-05-20 23:58   ` Andi Kleen
2015-05-21  0:19     ` Sukadev Bhattiprolu
2015-05-21  2:56       ` Andi Kleen
2015-05-21  5:02         ` Sukadev Bhattiprolu
2015-05-21 18:50           ` Andi Kleen
2015-05-20  0:02 ` [PATCH 4/4] perf: Add power8 PMU events in JSON format Sukadev Bhattiprolu
2015-05-27 13:59   ` Namhyung Kim
2015-05-27 14:41     ` Andi Kleen
2015-05-27 15:01       ` Namhyung Kim
2015-05-27 16:24         ` Andi Kleen
2015-05-27 20:24           ` Sukadev Bhattiprolu

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=20150522172540.GA23163@us.ibm.com \
    --to=sukadev@linux.vnet.ibm.com \
    --cc=acme@kernel.org \
    --cc=ak@linux.intel.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mingo@redhat.com \
    --cc=mpe@ellerman.id.au \
    --cc=namhyung@kernel.org \
    --cc=paulus@samba.org \
    /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).