#ifndef _PERF_TARGET_H #define _PERF_TARGET_H #include #include struct target { const char *pid; const char *tid; const char *cpu_list; const char *uid_str; uid_t uid; bool system_wide; bool uses_mmap; bool default_per_cpu; bool per_thread; }; enum target_errno { TARGET_ERRNO__SUCCESS = 0, /* * Choose an arbitrary negative big number not to clash with standard * errno since SUS requires the errno has distinct positive values. * See 'Issue 6' in the link below. * * http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/errno.h.html */ __TARGET_ERRNO__START = -10000, /* for target__validate() */ TARGET_ERRNO__PID_OVERRIDE_CPU = __TARGET_ERRNO__START, TARGET_ERRNO__PID_OVERRIDE_UID, TARGET_ERRNO__UID_OVERRIDE_CPU, TARGET_ERRNO__PID_OVERRIDE_SYSTEM, TARGET_ERRNO__UID_OVERRIDE_SYSTEM, TARGET_ERRNO__SYSTEM_OVERRIDE_THREAD, /* for target__parse_uid() */ TARGET_ERRNO__INVALID_UID, TARGET_ERRNO__USER_NOT_FOUND, __TARGET_ERRNO__END, }; enum target_errno target__validate(struct target *target); enum target_errno target__parse_uid(struct target *target); int target__strerror(struct target *target, int errnum, char *buf, size_t buflen); static inline bool target__has_task(struct target *target) { return target->tid || target->pid || target->uid_str; } static inline bool target__has_cpu(struct target *target) { return target->system_wide || target->cpu_list; } static inline bool target__none(struct target *target) { return !target__has_task(target) && !target__has_cpu(target); } static inline bool target__uses_dummy_map(struct target *target) { bool use_dummy = false; if (target->default_per_cpu) use_dummy = target->per_thread ? true : false; else if (target__has_task(target) || (!target__has_cpu(target) && !target->uses_mmap)) use_dummy = true; return use_dummy; } #endif /* _PERF_TARGET_H */ 64c888c0cd0bd66c'>commitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-01-24 16:54:39 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2017-01-24 16:54:39 -0800
commit883af14e67e8b8702b5560aa64c888c0cd0bd66c (patch)
tree74e3a6b53f5fad9f7848ab1b9f6921b7012940a4 /net/l3mdev/Kconfig
parent0263d4ebd94b36280608e296cba39b924b6e832b (diff)
parentaab45453ff5c77200c6da4ac909f7a4392aed17e (diff)
Merge branch 'akpm' (patches from Andrew)
Merge fixes from Andrew Morton: "26 fixes" * emailed patches from Andrew Morton <akpm@linux-foundation.org>: (26 commits) MAINTAINERS: add Dan Streetman to zbud maintainers MAINTAINERS: add Dan Streetman to zswap maintainers mm: do not export ioremap_page_range symbol for external module mn10300: fix build error of missing fpu_save() romfs: use different way to generate fsid for BLOCK or MTD frv: add missing atomic64 operations mm, page_alloc: fix premature OOM when racing with cpuset mems update mm, page_alloc: move cpuset seqcount checking to slowpath mm, page_alloc: fix fast-path race with cpuset update or removal mm, page_alloc: fix check for NULL preferred_zone kernel/panic.c: add missing \n fbdev: color map copying bounds checking frv: add atomic64_add_unless() mm/mempolicy.c: do not put mempolicy before using its nodemask radix-tree: fix private list warnings Documentation/filesystems/proc.txt: add VmPin mm, memcg: do not retry precharge charges proc: add a schedule point in proc_pid_readdir() mm: alloc_contig: re-allow CMA to compact FS pages mm/slub.c: trace free objects at KERN_INFO ...
Diffstat (limited to 'net/l3mdev/Kconfig')