Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 338861
b: refs/heads/master
c: 0c1fe6b
h: refs/heads/master
i:
  338859: 7545c64
v: v3
  • Loading branch information
Arnaldo Carvalho de Melo committed Oct 6, 2012
1 parent 894accf commit 4cfca59
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 11 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: 6e92349d5a814a3f633a43d9d6bd3b199ef3ad72
refs/heads/master: 0c1fe6b2f30fa275d939071293b6e28771283f6d
2 changes: 0 additions & 2 deletions trunk/tools/perf/builtin-test.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ static int test__vmlinux_matches_kallsyms(void)
struct map *kallsyms_map, *vmlinux_map;
struct machine kallsyms, vmlinux;
enum map_type type = MAP__FUNCTION;
long page_size = sysconf(_SC_PAGE_SIZE);
struct ref_reloc_sym ref_reloc_sym = { .name = "_stext", };

/*
Expand Down Expand Up @@ -1007,7 +1006,6 @@ static void segfault_handler(int sig __maybe_unused,

static int __test__rdpmc(void)
{
long page_size = sysconf(_SC_PAGE_SIZE);
volatile int tmp = 0;
u64 i, loops = 1000;
int n;
Expand Down
2 changes: 2 additions & 0 deletions trunk/tools/perf/perf.c
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,8 @@ int main(int argc, const char **argv)
{
const char *cmd;

page_size = sysconf(_SC_PAGE_SIZE);

cmd = perf_extract_argv0_path(argv[0]);
if (!cmd)
cmd = "perf-help";
Expand Down
3 changes: 0 additions & 3 deletions trunk/tools/perf/util/evlist.c
Original file line number Diff line number Diff line change
Expand Up @@ -325,8 +325,6 @@ struct perf_evsel *perf_evlist__id2evsel(struct perf_evlist *evlist, u64 id)

union perf_event *perf_evlist__mmap_read(struct perf_evlist *evlist, int idx)
{
/* XXX Move this to perf.c, making it generally available */
unsigned int page_size = sysconf(_SC_PAGE_SIZE);
struct perf_mmap *md = &evlist->mmap[idx];
unsigned int head = perf_mmap__read_head(md);
unsigned int old = md->prev;
Expand Down Expand Up @@ -528,7 +526,6 @@ static int perf_evlist__mmap_per_thread(struct perf_evlist *evlist, int prot, in
int perf_evlist__mmap(struct perf_evlist *evlist, unsigned int pages,
bool overwrite)
{
unsigned int page_size = sysconf(_SC_PAGE_SIZE);
struct perf_evsel *evsel;
const struct cpu_map *cpus = evlist->cpus;
const struct thread_map *threads = evlist->threads;
Expand Down
4 changes: 1 addition & 3 deletions trunk/tools/perf/util/session.c
Original file line number Diff line number Diff line change
Expand Up @@ -1375,15 +1375,13 @@ int __perf_session__process_events(struct perf_session *session,
{
u64 head, page_offset, file_offset, file_pos, progress_next;
int err, mmap_prot, mmap_flags, map_idx = 0;
size_t page_size, mmap_size;
size_t mmap_size;
char *buf, *mmaps[8];
union perf_event *event;
uint32_t size;

perf_tool__fill_defaults(tool);

page_size = sysconf(_SC_PAGESIZE);

page_offset = page_size * (data_offset / page_size);
file_offset = page_offset;
head = data_offset - page_offset;
Expand Down
2 changes: 0 additions & 2 deletions trunk/tools/perf/util/trace-event-read.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@ int file_bigendian;
int host_bigendian;
static int long_size;

static unsigned long page_size;

static ssize_t calc_data_size;
static bool repipe;

Expand Down
2 changes: 2 additions & 0 deletions trunk/tools/perf/util/util.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
/*
* XXX We need to find a better place for these things...
*/
unsigned int page_size;

bool perf_host = true;
bool perf_guest = false;

Expand Down
2 changes: 2 additions & 0 deletions trunk/tools/perf/util/util.h
Original file line number Diff line number Diff line change
Expand Up @@ -263,4 +263,6 @@ char *rtrim(char *s);

void dump_stack(void);

extern unsigned int page_size;

#endif

0 comments on commit 4cfca59

Please sign in to comment.