Deleted Added
full compact
hwpmc_mod.c (175202) hwpmc_mod.c (175294)
1/*-
2 * Copyright (c) 2003-2007 Joseph Koshy
3 * Copyright (c) 2007 The FreeBSD Foundation
4 * All rights reserved.
5 *
6 * Portions of this software were developed by A. Joseph Koshy under
7 * sponsorship from the FreeBSD Foundation and Google, Inc.
8 *

--- 16 unchanged lines hidden (view full) ---

25 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28 * SUCH DAMAGE.
29 *
30 */
31
32#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2003-2007 Joseph Koshy
3 * Copyright (c) 2007 The FreeBSD Foundation
4 * All rights reserved.
5 *
6 * Portions of this software were developed by A. Joseph Koshy under
7 * sponsorship from the FreeBSD Foundation and Google, Inc.
8 *

--- 16 unchanged lines hidden (view full) ---

25 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28 * SUCH DAMAGE.
29 *
30 */
31
32#include <sys/cdefs.h>
33__FBSDID("$FreeBSD: head/sys/dev/hwpmc/hwpmc_mod.c 175202 2008-01-10 01:10:58Z attilio $");
33__FBSDID("$FreeBSD: head/sys/dev/hwpmc/hwpmc_mod.c 175294 2008-01-13 14:44:15Z attilio $");
34
35#include <sys/param.h>
36#include <sys/eventhandler.h>
37#include <sys/jail.h>
38#include <sys/kernel.h>
39#include <sys/kthread.h>
40#include <sys/limits.h>
41#include <sys/lock.h>

--- 631 unchanged lines hidden (view full) ---

673/*
674 * Get the file name for an executable. This is a simple wrapper
675 * around vn_fullpath(9).
676 */
677
678static void
679pmc_getfilename(struct vnode *v, char **fullpath, char **freepath)
680{
34
35#include <sys/param.h>
36#include <sys/eventhandler.h>
37#include <sys/jail.h>
38#include <sys/kernel.h>
39#include <sys/kthread.h>
40#include <sys/limits.h>
41#include <sys/lock.h>

--- 631 unchanged lines hidden (view full) ---

673/*
674 * Get the file name for an executable. This is a simple wrapper
675 * around vn_fullpath(9).
676 */
677
678static void
679pmc_getfilename(struct vnode *v, char **fullpath, char **freepath)
680{
681 struct thread *td;
682
681
683 td = curthread;
684 *fullpath = "unknown";
685 *freepath = NULL;
686 vn_lock(v, LK_CANRECURSE | LK_EXCLUSIVE | LK_RETRY);
682 *fullpath = "unknown";
683 *freepath = NULL;
684 vn_lock(v, LK_CANRECURSE | LK_EXCLUSIVE | LK_RETRY);
687 vn_fullpath(td, v, fullpath, freepath);
688 VOP_UNLOCK(v, 0, td);
685 vn_fullpath(curthread, v, fullpath, freepath);
686 VOP_UNLOCK(v, 0);
689}
690
691/*
692 * remove an process owning PMCs
693 */
694
695void
696pmc_remove_owner(struct pmc_owner *po)

--- 3931 unchanged lines hidden ---
687}
688
689/*
690 * remove an process owning PMCs
691 */
692
693void
694pmc_remove_owner(struct pmc_owner *po)

--- 3931 unchanged lines hidden ---