Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 360154
b: refs/heads/master
c: 769bc1f
h: refs/heads/master
v: v3
  • Loading branch information
Vineet Gupta committed Feb 15, 2013
1 parent d2c1475 commit bec6e80
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 01b812bcce4920d9587fab7a964493d368be1522
refs/heads/master: 769bc1fd7b8591a312d4c5c8834bc6510272938e
1 change: 1 addition & 0 deletions trunk/arch/arc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ config ARC
select HAVE_ARCH_TRACEHOOK
select HAVE_GENERIC_HARDIRQS
select HAVE_MEMBLOCK
select HAVE_OPROFILE
select IRQ_DOMAIN
select MODULES_USE_ELF_RELA
select NO_BOOTMEM
Expand Down
2 changes: 2 additions & 0 deletions trunk/arch/arc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ ifneq ($(platform-y),)
core-y += arch/arc/plat-$(PLATFORM)/
endif

drivers-$(CONFIG_OPROFILE) += arch/arc/oprofile/

libs-y += arch/arc/lib/ $(LIBGCC)

#default target for make without any arguements.
Expand Down
9 changes: 9 additions & 0 deletions trunk/arch/arc/oprofile/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
obj-$(CONFIG_OPROFILE) += oprofile.o

DRIVER_OBJS = $(addprefix ../../../drivers/oprofile/, \
oprof.o cpu_buffer.o buffer_sync.o \
event_buffer.o oprofile_files.o \
oprofilefs.o oprofile_stats.o \
timer_int.o )

oprofile-y := $(DRIVER_OBJS) common.o
26 changes: 26 additions & 0 deletions trunk/arch/arc/oprofile/common.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/*
* Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* Based on orig code from @author John Levon <levon@movementarian.org>
*/

#include <linux/oprofile.h>
#include <linux/perf_event.h>

int __init oprofile_arch_init(struct oprofile_operations *ops)
{
/*
* A failure here, forces oprofile core to switch to Timer based PC
* sampling, which will happen if say perf is not enabled/available
*/
return oprofile_perf_init(ops);
}

void oprofile_arch_exit(void)
{
oprofile_perf_exit();
}

0 comments on commit bec6e80

Please sign in to comment.