• Home
  • Raw
  • Download

Lines Matching +full:protect +full:- +full:exec

4  *    Copyright (C) 2008-2009, Thomas Gleixner <tglx@linutronix.de>
5 * Copyright (C) 2008-2011, Red Hat, Inc., Ingo Molnar
6 * Copyright (C) 2008-2011, Red Hat, Inc., Peter Zijlstra
12 * For licencing details see kernel-base/COPYING
21 * Kernel-internal data types and definitions:
114 int idx; /* index in shared_regs->regs[] */
118 * struct hw_perf_event - performance event hardware details:
140 /* for tp_event->class */
185 #define PERF_HES_UPTODATE 0x02 /* event->count up-to-date */
249 * struct pmu - generic performance monitoring unit
261 * various common per-pmu feature flags
275 * Fully disable/enable this PMU, can be used to protect from the PMI
285 * -ENOENT -- @event is not for this PMU
287 * -ENODEV -- @event is for this PMU but PMU not present
288 * -EBUSY -- @event is for this PMU but PMU temporarily unavailable
289 * -EINVAL -- @event is for this PMU but @event is not valid
290 * -EOPNOTSUPP -- @event is for this PMU, @event is valid, but not supported
291 * -EACCESS -- @event is for this PMU, @event is valid, but no privilidges
293 * 0 -- @event is for this PMU and valid
307 * Flags for ->add()/->del()/ ->start()/->stop(). There are
316 * transaction, see the ->*_txn() methods.
325 * ->add() called without PERF_EF_START should result in the same state
326 * as ->add() followed by ->stop().
328 * ->del() must always PERF_EF_UPDATE stop an event. If it calls
329 * ->stop() that must deal with already being stopped without
339 * returns !0. ->start() will be used to continue.
344 * is on -- will be called from NMI context with the PMU generates
347 * ->stop() with PERF_EF_UPDATE will read the counter and update
348 * period/count values like ->read() would.
350 * ->start() with PERF_EF_RELOAD will reprogram the the counter
351 * value, must be preceded by a ->stop() with PERF_EF_UPDATE.
369 * Start the transaction, after this ->add() doesn't need to
376 * If ->start_txn() disabled the ->add() schedulability test
377 * then ->commit_txn() is required to perform one. On success
379 * open until ->cancel_txn() is called.
385 * Will cancel the transaction, assumes ->del() is called
386 * for each successful ->add() during the transaction.
394 * if no implementation is provided it will default to: event->hw.idx + 1.
399 * context-switches callback
410 * Set up pmu-private data structures for an AUX area
417 * Free pmu-private AUX data structures
424 * supplied filters are valid, -errno otherwise.
434 * translate hw-agnostic filters into hardware configuration in
437 * Runs as a part of filter sync sequence that is done in ->start()
447 * Filter events for PMU-specific reasons.
464 * struct perf_addr_filter - address range filter definition
466 * @inode: object file's inode for file-based filters
471 * This is a hardware-agnostic filter configuration as specified by the user.
482 * struct perf_addr_filters_head - container for address range filters
486 * @nr_file_filters: number of file-based filters
503 * enum perf_event_state - the states of an event:
506 PERF_EVENT_STATE_DEAD = -4,
507 PERF_EVENT_STATE_EXIT = -3,
508 PERF_EVENT_STATE_ERROR = -2,
509 PERF_EVENT_STATE_OFF = -1,
554 if ((event)->group_leader == (event)) \
555 list_for_each_entry((sibling), &(event)->sibling_list, sibling_list)
558 * struct perf_event - performance event kernel representation:
564 * modifications require ctx->lock
570 * Locked for modification by both ctx->mutex and ctx->lock; holding
608 * been scheduled in, if this is a per-task event)
620 * ctx_time already accounts for ctx->timestamp. Therefore to
642 * Protect attach/detach and child_list:
677 /* vma address array for file-based filders */
718 * struct perf_event_context - event context structure
725 * Protect the states of the events in the list,
730 * Protect the list of events. Locking either mutex or lock
781 * struct perf_event_cpu_context - per cpu event context structure
828 * This is a per-cpu dynamically allocated data structure.
849 ctx ? lockdep_is_held(&ctx->lock) in perf_cgroup_from_task()
963 data->addr = addr; in perf_sample_data_init()
964 data->raw = NULL; in perf_sample_data_init()
965 data->br_stack = NULL; in perf_sample_data_init()
966 data->period = period; in perf_sample_data_init()
967 data->weight = 0; in perf_sample_data_init()
968 data->data_src.val = PERF_MEM_NA; in perf_sample_data_init()
969 data->txn = 0; in perf_sample_data_init()
998 if (likely(event->overflow_handler == perf_event_output_forward)) in is_default_overflow_handler()
1000 if (unlikely(event->overflow_handler == perf_event_output_backward)) in is_default_overflow_handler()
1019 return event->attr.sample_period != 0; in is_sampling_event()
1027 return event->event_caps & PERF_EV_CAP_SOFTWARE; in is_software_event()
1035 return event->ctx->pmu->task_ctx_nr == perf_sw_context; in in_software_context()
1040 return pmu->capabilities & PERF_PMU_CAP_EXCLUSIVE; in is_exclusive_pmu()
1055 * - ip for PERF_SAMPLE_IP
1056 * - cs for user_mode() tests
1057 * - bp for callchains
1058 * - eflags, for future purposes, just in case
1103 task->sched_migrated = 1; in perf_event_task_migrate()
1112 if (perf_sw_migrate_enabled() && task->sched_migrated) { in perf_event_task_sched_in()
1117 task->sched_migrated = 0; in perf_event_task_sched_in()
1136 extern void perf_event_comm(struct task_struct *tsk, bool exec);
1157 if (ctx->contexts < sysctl_perf_event_max_contexts_per_stack) { in perf_callchain_store_context()
1158 struct perf_callchain_entry *entry = ctx->entry; in perf_callchain_store_context()
1159 entry->ip[entry->nr++] = ip; in perf_callchain_store_context()
1160 ++ctx->contexts; in perf_callchain_store_context()
1163 ctx->contexts_maxed = true; in perf_callchain_store_context()
1164 return -1; /* no more room, stop walking the stack */ in perf_callchain_store_context()
1170 if (ctx->nr < ctx->max_stack && !ctx->contexts_maxed) { in perf_callchain_store()
1171 struct perf_callchain_entry *entry = ctx->entry; in perf_callchain_store()
1172 entry->ip[entry->nr++] = ip; in perf_callchain_store()
1173 ++ctx->nr; in perf_callchain_store()
1176 return -1; /* no more room, stop walking the stack */ in perf_callchain_store()
1199 return sysctl_perf_event_paranoid > -1; in perf_paranoid_tracepoint_raw()
1230 return event->attr.sample_type & PERF_SAMPLE_BRANCH_STACK; in has_branch_stack()
1235 return event->attr.branch_sample_type != 0; in needs_branch_stack()
1240 return event->pmu->setup_aux; in has_aux()
1245 return !!event->attr.write_backward; in is_write_backward()
1250 return event->pmu->nr_addr_filters; in has_addr_filter()
1259 struct perf_addr_filters_head *ifh = &event->addr_filters; in perf_event_addr_filters()
1261 if (event->parent) in perf_event_addr_filters()
1262 ifh = &event->parent->addr_filters; in perf_event_addr_filters()
1301 unsigned long size) { return -EINVAL; } in perf_aux_output_skip()
1316 static inline struct file *perf_event_get(unsigned int fd) { return ERR_PTR(-EINVAL); } in perf_event_get()
1319 return ERR_PTR(-EINVAL); in perf_get_event()
1323 return ERR_PTR(-EINVAL); in perf_event_attrs()
1328 return -EINVAL; in perf_event_read_local()
1331 static inline int perf_event_task_disable(void) { return -EINVAL; } in perf_event_task_disable()
1332 static inline int perf_event_task_enable(void) { return -EINVAL; } in perf_event_task_enable()
1335 return -EINVAL; in perf_event_refresh()
1352 static inline void perf_event_comm(struct task_struct *tsk, bool exec) { } in perf_event_comm() argument
1356 static inline int perf_swevent_get_recursion_context(void) { return -1; } in perf_swevent_get_recursion_context()
1361 static inline int __perf_event_disable(void *info) { return -1; } in __perf_event_disable()
1374 return frag->pad < sizeof(u64); in perf_raw_frag_last()