Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 207153
b: refs/heads/master
c: c1c8f55
h: refs/heads/master
i:
  207151: a7bd46e
v: v3
  • Loading branch information
Jesper Nilsson committed Aug 4, 2010
1 parent 050a6f5 commit 21a62c5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 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: 72e08db187cbbfca00583c28b64ae81a35f4a287
refs/heads/master: c1c8f558749cbf2a7ed16b6ae6e19a4238b6fa33
15 changes: 7 additions & 8 deletions trunk/arch/cris/kernel/profile.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,11 @@

#define SAMPLE_BUFFER_SIZE 8192

static char* sample_buffer;
static char* sample_buffer_pos;
static char *sample_buffer;
static char *sample_buffer_pos;
static int prof_running = 0;

void
cris_profile_sample(struct pt_regs* regs)
void cris_profile_sample(struct pt_regs *regs)
{
if (!prof_running)
return;
Expand All @@ -24,7 +23,7 @@ cris_profile_sample(struct pt_regs* regs)
else
*(unsigned int*)sample_buffer_pos = 0;

*(unsigned int*)(sample_buffer_pos + 4) = instruction_pointer(regs);
*(unsigned int *)(sample_buffer_pos + 4) = instruction_pointer(regs);
sample_buffer_pos += 8;

if (sample_buffer_pos == sample_buffer + SAMPLE_BUFFER_SIZE)
Expand Down Expand Up @@ -54,15 +53,15 @@ write_cris_profile(struct file *file, const char __user *buf,
{
sample_buffer_pos = sample_buffer;
memset(sample_buffer, 0, SAMPLE_BUFFER_SIZE);
return count < SAMPLE_BUFFER_SIZE ? count : SAMPLE_BUFFER_SIZE;
}

static const struct file_operations cris_proc_profile_operations = {
.read = read_cris_profile,
.write = write_cris_profile,
};

static int
__init init_cris_profile(void)
static int __init init_cris_profile(void)
{
struct proc_dir_entry *entry;

Expand All @@ -82,5 +81,5 @@ __init init_cris_profile(void)

return 0;
}

__initcall(init_cris_profile);

0 comments on commit 21a62c5

Please sign in to comment.