Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 147482
b: refs/heads/master
c: a63eaf3
h: refs/heads/master
v: v3
  • Loading branch information
Paul Mackerras authored and Ingo Molnar committed May 22, 2009
1 parent 29bd190 commit 339426f
Show file tree
Hide file tree
Showing 8 changed files with 146 additions and 102 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: 34adc8062227f41b04ade0ff3fbd1dbe3002669e
refs/heads/master: a63eaf34ae60bdb067a354cc8def2e8f4a01f5f4
1 change: 1 addition & 0 deletions trunk/arch/x86/kernel/apic/apic.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
* Mikael Pettersson : PM converted to driver model.
*/

#include <linux/perf_counter.h>
#include <linux/kernel_stat.h>
#include <linux/mc146818rtc.h>
#include <linux/acpi_pmtmr.h>
Expand Down
13 changes: 0 additions & 13 deletions trunk/include/linux/init_task.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,18 +108,6 @@ extern struct group_info init_groups;

extern struct cred init_cred;

#ifdef CONFIG_PERF_COUNTERS
# define INIT_PERF_COUNTERS(tsk) \
.perf_counter_ctx.counter_list = \
LIST_HEAD_INIT(tsk.perf_counter_ctx.counter_list), \
.perf_counter_ctx.event_list = \
LIST_HEAD_INIT(tsk.perf_counter_ctx.event_list), \
.perf_counter_ctx.lock = \
__SPIN_LOCK_UNLOCKED(tsk.perf_counter_ctx.lock),
#else
# define INIT_PERF_COUNTERS(tsk)
#endif

/*
* INIT_TASK is used to set up the first task table, touch at
* your own risk!. Base=0, limit=0x1fffff (=2MB)
Expand Down Expand Up @@ -183,7 +171,6 @@ extern struct cred init_cred;
}, \
.dirties = INIT_PROP_LOCAL_SINGLE(dirties), \
INIT_IDS \
INIT_PERF_COUNTERS(tsk) \
INIT_TRACE_IRQFLAGS \
INIT_LOCKDEP \
INIT_FTRACE_GRAPH \
Expand Down
4 changes: 1 addition & 3 deletions trunk/include/linux/perf_counter.h
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,6 @@ struct perf_counter {
struct hw_perf_counter hw;

struct perf_counter_context *ctx;
struct task_struct *task;
struct file *filp;

struct perf_counter *parent;
Expand Down Expand Up @@ -498,7 +497,6 @@ struct perf_counter {
* Used as a container for task counters and CPU counters as well:
*/
struct perf_counter_context {
#ifdef CONFIG_PERF_COUNTERS
/*
* Protect the states of the counters in the list,
* nr_active, and the list:
Expand All @@ -516,14 +514,14 @@ struct perf_counter_context {
int nr_counters;
int nr_active;
int is_active;
atomic_t refcount;
struct task_struct *task;

/*
* Context clock, runs when context enabled.
*/
u64 time;
u64 timestamp;
#endif
};

/**
Expand Down
6 changes: 4 additions & 2 deletions trunk/include/linux/sched.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ struct sched_param {
#include <linux/path.h>
#include <linux/compiler.h>
#include <linux/completion.h>
#include <linux/perf_counter.h>
#include <linux/pid.h>
#include <linux/percpu.h>
#include <linux/topology.h>
Expand Down Expand Up @@ -99,6 +98,7 @@ struct robust_list_head;
struct bio;
struct bts_tracer;
struct fs_struct;
struct perf_counter_context;

/*
* List of flags we want to share for kernel threads,
Expand Down Expand Up @@ -1387,7 +1387,9 @@ struct task_struct {
struct list_head pi_state_list;
struct futex_pi_state *pi_state_cache;
#endif
struct perf_counter_context perf_counter_ctx;
#ifdef CONFIG_PERF_COUNTERS
struct perf_counter_context *perf_counter_ctxp;
#endif
#ifdef CONFIG_NUMA
struct mempolicy *mempolicy;
short il_next;
Expand Down
3 changes: 2 additions & 1 deletion trunk/kernel/exit.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
#include <linux/tracehook.h>
#include <linux/fs_struct.h>
#include <linux/init_task.h>
#include <linux/perf_counter.h>
#include <trace/sched.h>

#include <asm/uaccess.h>
Expand Down Expand Up @@ -159,7 +160,7 @@ static void delayed_put_task_struct(struct rcu_head *rhp)
struct task_struct *tsk = container_of(rhp, struct task_struct, rcu);

#ifdef CONFIG_PERF_COUNTERS
WARN_ON_ONCE(!list_empty(&tsk->perf_counter_ctx.counter_list));
WARN_ON_ONCE(tsk->perf_counter_ctxp);
#endif
trace_sched_process_free(tsk);
put_task_struct(tsk);
Expand Down
1 change: 1 addition & 0 deletions trunk/kernel/fork.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
#include <linux/fs_struct.h>
#include <trace/sched.h>
#include <linux/magic.h>
#include <linux/perf_counter.h>

#include <asm/pgtable.h>
#include <asm/pgalloc.h>
Expand Down
Loading

0 comments on commit 339426f

Please sign in to comment.