Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1600501
| From | Arnaldo Carvalho de Melo <acme@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v8 4/6] perf tools: Add print support for namespace events |
| Date | 2017-03-14 15:40 +0100 |
| Message-ID | <tkVMd-1qV-3@gated-at.bofh.it> (permalink) |
| References | <tiuds-4ru-3@gated-at.bofh.it> <tiuds-4ru-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Em Wed, Mar 08, 2017 at 02:11:59AM +0530, Hari Bathini escreveu:
> +size_t perf_event__fprintf_namespaces(union perf_event *event, FILE *fp)
> +{
> + size_t ret = 0;
> + struct perf_ns_link_info *ns_link_info;
> + u32 nr_namespaces, idx;
> +
> + ns_link_info = event->namespaces.link_info;
> + nr_namespaces = event->namespaces.nr_namespaces;
> +
> + ret += fprintf(fp, " %d/%d - nr_namespaces: %u\n\t\t[",
> + event->namespaces.pid,
> + event->namespaces.tid,
> + nr_namespaces);
> +
> + for (idx = 0; idx < nr_namespaces; idx++) {
> + if (idx && (idx % 4 == 0))
> + ret += fprintf(fp, "\n\t\t ");
> +
> + ret += fprintf(fp, "%u/%s: %lu/0x%lx%s", idx,
> + perf_ns__name(idx), (u64)ns_link_info[idx].dev,
> + (u64)ns_link_info[idx].ino,
> + ((idx + 1) != nr_namespaces) ? ", " : "]\n");
Fails in some environments, such as debian:experimental-x-mipsel:
CC /tmp/build/perf/util/evlist.o
util/event.c: In function 'perf_event__fprintf_namespaces':
util/event.c:1129:33: error: format '%lu' expects argument of type 'long unsigned int', but argument 5 has type 'long long unsigned int' [-Werror=format=]
ret += fprintf(fp, "%u/%s: %lu/0x%lx%s", idx,
^
util/event.c:1129:39: error: format '%lx' expects argument of type 'long unsigned int', but argument 6 has type 'long long unsigned int' [-Werror=format=]
ret += fprintf(fp, "%u/%s: %lu/0x%lx%s", idx,
^
CC /tmp/build/perf/builtin-list.o
-------------------
Fixing this up to use PRIu64...
- Arnaldo
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
Re: [PATCH v8 4/6] perf tools: Add print support for namespace events Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-03-14 15:40 +0100
csiph-web