Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 323809
b: refs/heads/master
c: 1d037ca
h: refs/heads/master
i:
  323807: 358bb72
v: v3
  • Loading branch information
Irina Tirdea authored and Arnaldo Carvalho de Melo committed Sep 11, 2012
1 parent b7c1534 commit afa457b
Show file tree
Hide file tree
Showing 77 changed files with 499 additions and 419 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7dbf4dcfe2987c35c2c4675cd7ae1b6006979176
refs/heads/master: 1d037ca1648b775277fc96401ec2aa233724906c
8 changes: 5 additions & 3 deletions trunk/tools/lib/traceevent/event-parse.c
Original file line number Diff line number Diff line change
Expand Up @@ -1824,7 +1824,7 @@ process_op(struct event_format *event, struct print_arg *arg, char **tok)
}

static enum event_type
process_entry(struct event_format *event __unused, struct print_arg *arg,
process_entry(struct event_format *event __maybe_unused, struct print_arg *arg,
char **tok)
{
enum event_type type;
Expand Down Expand Up @@ -2458,7 +2458,8 @@ process_paren(struct event_format *event, struct print_arg *arg, char **tok)


static enum event_type
process_str(struct event_format *event __unused, struct print_arg *arg, char **tok)
process_str(struct event_format *event __maybe_unused, struct print_arg *arg,
char **tok)
{
enum event_type type;
char *token;
Expand Down Expand Up @@ -3653,7 +3654,8 @@ static void free_args(struct print_arg *args)
}

static char *
get_bprint_format(void *data, int size __unused, struct event_format *event)
get_bprint_format(void *data, int size __maybe_unused,
struct event_format *event)
{
struct pevent *pevent = event->pevent;
unsigned long long addr;
Expand Down
4 changes: 2 additions & 2 deletions trunk/tools/lib/traceevent/event-parse.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
#include <stdarg.h>
#include <regex.h>

#ifndef __unused
#define __unused __attribute__ ((unused))
#ifndef __maybe_unused
#define __maybe_unused __attribute__((unused))
#endif

/* ----------------------- trace_seq ----------------------- */
Expand Down
3 changes: 2 additions & 1 deletion trunk/tools/perf/bench/bench.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@

extern int bench_sched_messaging(int argc, const char **argv, const char *prefix);
extern int bench_sched_pipe(int argc, const char **argv, const char *prefix);
extern int bench_mem_memcpy(int argc, const char **argv, const char *prefix __used);
extern int bench_mem_memcpy(int argc, const char **argv,
const char *prefix __maybe_unused);
extern int bench_mem_memset(int argc, const char **argv, const char *prefix);

#define BENCH_FORMAT_DEFAULT_STR "default"
Expand Down
2 changes: 1 addition & 1 deletion trunk/tools/perf/bench/mem-memcpy.c
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ static double do_memcpy_gettimeofday(memcpy_t fn, size_t len, bool prefault)
} while (0)

int bench_mem_memcpy(int argc, const char **argv,
const char *prefix __used)
const char *prefix __maybe_unused)
{
int i;
size_t len;
Expand Down
2 changes: 1 addition & 1 deletion trunk/tools/perf/bench/mem-memset.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ static double do_memset_gettimeofday(memset_t fn, size_t len, bool prefault)
} while (0)

int bench_mem_memset(int argc, const char **argv,
const char *prefix __used)
const char *prefix __maybe_unused)
{
int i;
size_t len;
Expand Down
2 changes: 1 addition & 1 deletion trunk/tools/perf/bench/sched-messaging.c
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ static const char * const bench_sched_message_usage[] = {
};

int bench_sched_messaging(int argc, const char **argv,
const char *prefix __used)
const char *prefix __maybe_unused)
{
unsigned int i, total_children;
struct timeval start, stop, diff;
Expand Down
6 changes: 3 additions & 3 deletions trunk/tools/perf/bench/sched-pipe.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ static const char * const bench_sched_pipe_usage[] = {
};

int bench_sched_pipe(int argc, const char **argv,
const char *prefix __used)
const char *prefix __maybe_unused)
{
int pipe_1[2], pipe_2[2];
int m = 0, i;
Expand All @@ -55,8 +55,8 @@ int bench_sched_pipe(int argc, const char **argv,
* discarding returned value of read(), write()
* causes error in building environment for perf
*/
int __used ret, wait_stat;
pid_t pid, retpid __used;
int __maybe_unused ret, wait_stat;
pid_t pid, retpid __maybe_unused;

argc = parse_options(argc, argv, options,
bench_sched_pipe_usage, 0);
Expand Down
2 changes: 1 addition & 1 deletion trunk/tools/perf/builtin-annotate.c
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ static const char * const annotate_usage[] = {
NULL
};

int cmd_annotate(int argc, const char **argv, const char *prefix __used)
int cmd_annotate(int argc, const char **argv, const char *prefix __maybe_unused)
{
struct perf_annotate annotate = {
.tool = {
Expand Down
2 changes: 1 addition & 1 deletion trunk/tools/perf/builtin-bench.c
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ static void all_subsystem(void)
all_suite(&subsystems[i]);
}

int cmd_bench(int argc, const char **argv, const char *prefix __used)
int cmd_bench(int argc, const char **argv, const char *prefix __maybe_unused)
{
int i, j, status = 0;

Expand Down
7 changes: 4 additions & 3 deletions trunk/tools/perf/builtin-buildid-cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ static int build_id_cache__add_file(const char *filename, const char *debugdir)
return err;
}

static int build_id_cache__remove_file(const char *filename __used,
const char *debugdir __used)
static int build_id_cache__remove_file(const char *filename __maybe_unused,
const char *debugdir __maybe_unused)
{
u8 build_id[BUILD_ID_SIZE];
char sbuild_id[BUILD_ID_SIZE * 2 + 1];
Expand Down Expand Up @@ -120,7 +120,8 @@ static int __cmd_buildid_cache(void)
return 0;
}

int cmd_buildid_cache(int argc, const char **argv, const char *prefix __used)
int cmd_buildid_cache(int argc, const char **argv,
const char *prefix __maybe_unused)
{
argc = parse_options(argc, argv, buildid_cache_options,
buildid_cache_usage, 0);
Expand Down
3 changes: 2 additions & 1 deletion trunk/tools/perf/builtin-buildid-list.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,8 @@ static int __cmd_buildid_list(void)
return perf_session__list_build_ids();
}

int cmd_buildid_list(int argc, const char **argv, const char *prefix __used)
int cmd_buildid_list(int argc, const char **argv,
const char *prefix __maybe_unused)
{
argc = parse_options(argc, argv, options, buildid_list_usage, 0);
setup_pager();
Expand Down
4 changes: 2 additions & 2 deletions trunk/tools/perf/builtin-diff.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ static int hists__add_entry(struct hists *self,
return -ENOMEM;
}

static int diff__process_sample_event(struct perf_tool *tool __used,
static int diff__process_sample_event(struct perf_tool *tool __maybe_unused,
union perf_event *event,
struct perf_sample *sample,
struct perf_evsel *evsel,
Expand Down Expand Up @@ -242,7 +242,7 @@ static const struct option options[] = {
OPT_END()
};

int cmd_diff(int argc, const char **argv, const char *prefix __used)
int cmd_diff(int argc, const char **argv, const char *prefix __maybe_unused)
{
sort_order = diff__default_sort_order;
argc = parse_options(argc, argv, options, diff_usage, 0);
Expand Down
2 changes: 1 addition & 1 deletion trunk/tools/perf/builtin-evlist.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ static const char * const evlist_usage[] = {
NULL
};

int cmd_evlist(int argc, const char **argv, const char *prefix __used)
int cmd_evlist(int argc, const char **argv, const char *prefix __maybe_unused)
{
struct perf_attr_details details = { .verbose = false, };
const char *input_name = NULL;
Expand Down
2 changes: 1 addition & 1 deletion trunk/tools/perf/builtin-help.c
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ static int show_html_page(const char *perf_cmd)
return 0;
}

int cmd_help(int argc, const char **argv, const char *prefix __used)
int cmd_help(int argc, const char **argv, const char *prefix __maybe_unused)
{
const char *alias;
int rc = 0;
Expand Down
24 changes: 13 additions & 11 deletions trunk/tools/perf/builtin-inject.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
static char const *input_name = "-";
static bool inject_build_ids;

static int perf_event__repipe_synth(struct perf_tool *tool __used,
static int perf_event__repipe_synth(struct perf_tool *tool __maybe_unused,
union perf_event *event,
struct machine *machine __used)
struct machine *machine __maybe_unused)
{
uint32_t size;
void *buf = event;
Expand All @@ -40,7 +40,8 @@ static int perf_event__repipe_synth(struct perf_tool *tool __used,

static int perf_event__repipe_op2_synth(struct perf_tool *tool,
union perf_event *event,
struct perf_session *session __used)
struct perf_session *session
__maybe_unused)
{
return perf_event__repipe_synth(tool, event, NULL);
}
Expand All @@ -52,13 +53,14 @@ static int perf_event__repipe_event_type_synth(struct perf_tool *tool,
}

static int perf_event__repipe_tracing_data_synth(union perf_event *event,
struct perf_session *session __used)
struct perf_session *session
__maybe_unused)
{
return perf_event__repipe_synth(NULL, event, NULL);
}

static int perf_event__repipe_attr(union perf_event *event,
struct perf_evlist **pevlist __used)
struct perf_evlist **pevlist __maybe_unused)
{
int ret;
ret = perf_event__process_attr(event, pevlist);
Expand All @@ -70,16 +72,16 @@ static int perf_event__repipe_attr(union perf_event *event,

static int perf_event__repipe(struct perf_tool *tool,
union perf_event *event,
struct perf_sample *sample __used,
struct perf_sample *sample __maybe_unused,
struct machine *machine)
{
return perf_event__repipe_synth(tool, event, machine);
}

static int perf_event__repipe_sample(struct perf_tool *tool,
union perf_event *event,
struct perf_sample *sample __used,
struct perf_evsel *evsel __used,
struct perf_sample *sample __maybe_unused,
struct perf_evsel *evsel __maybe_unused,
struct machine *machine)
{
return perf_event__repipe_synth(tool, event, machine);
Expand Down Expand Up @@ -163,7 +165,7 @@ static int dso__inject_build_id(struct dso *self, struct perf_tool *tool,
static int perf_event__inject_buildid(struct perf_tool *tool,
union perf_event *event,
struct perf_sample *sample,
struct perf_evsel *evsel __used,
struct perf_evsel *evsel __maybe_unused,
struct machine *machine)
{
struct addr_location al;
Expand Down Expand Up @@ -224,7 +226,7 @@ struct perf_tool perf_inject = {

extern volatile int session_done;

static void sig_handler(int sig __attribute__((__unused__)))
static void sig_handler(int sig __maybe_unused)
{
session_done = 1;
}
Expand Down Expand Up @@ -267,7 +269,7 @@ static const struct option options[] = {
OPT_END()
};

int cmd_inject(int argc, const char **argv, const char *prefix __used)
int cmd_inject(int argc, const char **argv, const char *prefix __maybe_unused)
{
argc = parse_options(argc, argv, options, report_usage, 0);

Expand Down
22 changes: 12 additions & 10 deletions trunk/tools/perf/builtin-kmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ static int perf_evsel__process_kmem_event(struct perf_evsel *evsel,
return 0;
}

static int process_sample_event(struct perf_tool *tool __used,
static int process_sample_event(struct perf_tool *tool __maybe_unused,
union perf_event *event,
struct perf_sample *sample,
struct perf_evsel *evsel,
Expand Down Expand Up @@ -672,8 +672,8 @@ static int setup_sorting(struct list_head *sort_list, const char *arg)
return 0;
}

static int parse_sort_opt(const struct option *opt __used,
const char *arg, int unset __used)
static int parse_sort_opt(const struct option *opt __maybe_unused,
const char *arg, int unset __maybe_unused)
{
if (!arg)
return -1;
Expand All @@ -686,22 +686,24 @@ static int parse_sort_opt(const struct option *opt __used,
return 0;
}

static int parse_caller_opt(const struct option *opt __used,
const char *arg __used, int unset __used)
static int parse_caller_opt(const struct option *opt __maybe_unused,
const char *arg __maybe_unused,
int unset __maybe_unused)
{
caller_flag = (alloc_flag + 1);
return 0;
}

static int parse_alloc_opt(const struct option *opt __used,
const char *arg __used, int unset __used)
static int parse_alloc_opt(const struct option *opt __maybe_unused,
const char *arg __maybe_unused,
int unset __maybe_unused)
{
alloc_flag = (caller_flag + 1);
return 0;
}

static int parse_line_opt(const struct option *opt __used,
const char *arg, int unset __used)
static int parse_line_opt(const struct option *opt __maybe_unused,
const char *arg, int unset __maybe_unused)
{
int lines;

Expand Down Expand Up @@ -771,7 +773,7 @@ static int __cmd_record(int argc, const char **argv)
return cmd_record(i, rec_argv, NULL);
}

int cmd_kmem(int argc, const char **argv, const char *prefix __used)
int cmd_kmem(int argc, const char **argv, const char *prefix __maybe_unused)
{
argc = parse_options(argc, argv, kmem_options, kmem_usage, 0);

Expand Down
2 changes: 1 addition & 1 deletion trunk/tools/perf/builtin-kvm.c
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ static int __cmd_buildid_list(int argc, const char **argv)
return cmd_buildid_list(i, rec_argv, NULL);
}

int cmd_kvm(int argc, const char **argv, const char *prefix __used)
int cmd_kvm(int argc, const char **argv, const char *prefix __maybe_unused)
{
perf_host = 0;
perf_guest = 1;
Expand Down
2 changes: 1 addition & 1 deletion trunk/tools/perf/builtin-list.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include "util/parse-events.h"
#include "util/cache.h"

int cmd_list(int argc, const char **argv, const char *prefix __used)
int cmd_list(int argc, const char **argv, const char *prefix __maybe_unused)
{
setup_pager();

Expand Down
4 changes: 2 additions & 2 deletions trunk/tools/perf/builtin-lock.c
Original file line number Diff line number Diff line change
Expand Up @@ -870,7 +870,7 @@ static int dump_info(void)
return rc;
}

static int process_sample_event(struct perf_tool *tool __used,
static int process_sample_event(struct perf_tool *tool __maybe_unused,
union perf_event *event,
struct perf_sample *sample,
struct perf_evsel *evsel,
Expand Down Expand Up @@ -1020,7 +1020,7 @@ static int __cmd_record(int argc, const char **argv)
return cmd_record(i, rec_argv, NULL);
}

int cmd_lock(int argc, const char **argv, const char *prefix __used)
int cmd_lock(int argc, const char **argv, const char *prefix __maybe_unused)
{
unsigned int i;
int rc = 0;
Expand Down
Loading

0 comments on commit afa457b

Please sign in to comment.