perf tools: Remove junk code in mmap size handling
[linux-2.6.git] / tools / perf / builtin-test.c
index 845b9bd..11e3c84 100644 (file)
@@ -290,7 +290,7 @@ static int test__open_syscall_event(void)
                goto out_thread_map_delete;
        }
 
-       if (perf_evsel__open_per_thread(evsel, threads, false, false) < 0) {
+       if (perf_evsel__open_per_thread(evsel, threads, false) < 0) {
                pr_debug("failed to open counter: %s, "
                         "tweak /proc/sys/kernel/perf_event_paranoid?\n",
                         strerror(errno));
@@ -303,7 +303,7 @@ static int test__open_syscall_event(void)
        }
 
        if (perf_evsel__read_on_cpu(evsel, 0, 0) < 0) {
-               pr_debug("perf_evsel__open_read_on_cpu\n");
+               pr_debug("perf_evsel__read_on_cpu\n");
                goto out_close_fd;
        }
 
@@ -365,7 +365,7 @@ static int test__open_syscall_event_on_all_cpus(void)
                goto out_thread_map_delete;
        }
 
-       if (perf_evsel__open(evsel, cpus, threads, false, false) < 0) {
+       if (perf_evsel__open(evsel, cpus, threads, false) < 0) {
                pr_debug("failed to open counter: %s, "
                         "tweak /proc/sys/kernel/perf_event_paranoid?\n",
                         strerror(errno));
@@ -418,7 +418,7 @@ static int test__open_syscall_event_on_all_cpus(void)
                        continue;
 
                if (perf_evsel__read_on_cpu(evsel, cpu, 0) < 0) {
-                       pr_debug("perf_evsel__open_read_on_cpu\n");
+                       pr_debug("perf_evsel__read_on_cpu\n");
                        err = -1;
                        break;
                }
@@ -509,7 +509,7 @@ static int test__basic_mmap(void)
                goto out_free_cpus;
        }
 
-       evlist = perf_evlist__new();
+       evlist = perf_evlist__new(cpus, threads);
        if (evlist == NULL) {
                pr_debug("perf_evlist__new\n");
                goto out_free_cpus;
@@ -529,7 +529,7 @@ static int test__basic_mmap(void)
 
                perf_evlist__add(evlist, evsels[i]);
 
-               if (perf_evsel__open(evsels[i], cpus, threads, false, false) < 0) {
+               if (perf_evsel__open(evsels[i], cpus, threads, false) < 0) {
                        pr_debug("failed to open counter: %s, "
                                 "tweak /proc/sys/kernel/perf_event_paranoid?\n",
                                 strerror(errno));
@@ -537,7 +537,7 @@ static int test__basic_mmap(void)
                }
        }
 
-       if (perf_evlist__mmap(evlist, cpus, threads, 128, true) < 0) {
+       if (perf_evlist__mmap(evlist, 128, true) < 0) {
                pr_debug("failed to mmap events: %d (%s)\n", errno,
                         strerror(errno));
                goto out_close_fd;
@@ -579,7 +579,7 @@ static int test__basic_mmap(void)
 
        err = 0;
 out_munmap:
-       perf_evlist__munmap(evlist, 1);
+       perf_evlist__munmap(evlist);
 out_close_fd:
        for (i = 0; i < nsyscalls; ++i)
                perf_evsel__close_fd(evsels[i], 1, threads->nr);