perf: Remove the kref from perfmon_session
authorBarret Rhoden <brho@cs.berkeley.edu>
Tue, 14 Jun 2016 19:16:14 +0000 (15:16 -0400)
committerBarret Rhoden <brho@cs.berkeley.edu>
Fri, 17 Jun 2016 16:17:54 +0000 (12:17 -0400)
commit189f81d04f04d73f66b0a665056913bc3529827a
tree9b6762496c1fd9b81f9128e32bd70db97d109dc0
parentb5e9fa4092747a3c4548a28e382bb34687c34aa3
perf: Remove the kref from perfmon_session

The sessions are 1:1 with perfmon_contexts.  The context in devarch is the
way in which to access the session, so we don't need to do any reference
counting.  Note that perfmon_get_session() was never called - we had no use
for it.

Likewise, arch_free_perf_context() should never be called with 0.  The one
time it is called, the caller checks.

Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
kern/arch/x86/devarch.c
kern/arch/x86/perfmon.c
kern/arch/x86/perfmon.h