linux/kernel/events/core.c
<<
>>
Prefs
   1/*
   2 * Performance events core code:
   3 *
   4 *  Copyright (C) 2008 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 <pzijlstr@redhat.com>
   7 *  Copyright  ©  2009 Paul Mackerras, IBM Corp. <paulus@au1.ibm.com>
   8 *
   9 * For licensing details see kernel-base/COPYING
  10 */
  11
  12#include <linux/fs.h>
  13#include <linux/mm.h>
  14#include <linux/cpu.h>
  15#include <linux/smp.h>
  16#include <linux/idr.h>
  17#include <linux/file.h>
  18#include <linux/poll.h>
  19#include <linux/slab.h>
  20#include <linux/hash.h>
  21#include <linux/sysfs.h>
  22#include <linux/dcache.h>
  23#include <linux/percpu.h>
  24#include <linux/ptrace.h>
  25#include <linux/reboot.h>
  26#include <linux/vmstat.h>
  27#include <linux/device.h>
  28#include <linux/export.h>
  29#include <linux/vmalloc.h>
  30#include <linux/hardirq.h>
  31#include <linux/rculist.h>
  32#include <linux/uaccess.h>
  33#include <linux/syscalls.h>
  34#include <linux/anon_inodes.h>
  35#include <linux/kernel_stat.h>
  36#include <linux/perf_event.h>
  37#include <linux/ftrace_event.h>
  38#include <linux/hw_breakpoint.h>
  39
  40#include "internal.h"
  41
  42#include <asm/irq_regs.h>
  43
  44struct remote_function_call {
  45        struct task_struct      *p;
  46        int                     (*func)(void *info);
  47        void                    *info;
  48        int                     ret;
  49};
  50
  51static void remote_function(void *data)
  52{
  53        struct remote_function_call *tfc = data;
  54        struct task_struct *p = tfc->p;
  55
  56        if (p) {
  57                tfc->ret = -EAGAIN;
  58                if (task_cpu(p) != smp_processor_id() || !task_curr(p))
  59                        return;
  60        }
  61
  62        tfc->ret = tfc->func(tfc->info);
  63}
  64
  65/**
  66 * task_function_call - call a function on the cpu on which a task runs
  67 * @p:          the task to evaluate
  68 * @func:       the function to be called
  69 * @info:       the function call argument
  70 *
  71 * Calls the function @func when the task is currently running. This might
  72 * be on the current CPU, which just calls the function directly
  73 *
  74 * returns: @func return value, or
  75 *          -ESRCH  - when the process isn't running
  76 *          -EAGAIN - when the process moved away
  77 */
  78static int
  79task_function_call(struct task_struct *p, int (*func) (void *info), void *info)
  80{
  81        struct remote_function_call data = {
  82                .p      = p,
  83                .func   = func,
  84                .info   = info,
  85                .ret    = -ESRCH, /* No such (running) process */
  86        };
  87
  88        if (task_curr(p))
  89                smp_call_function_single(task_cpu(p), remote_function, &data, 1);
  90
  91        return data.ret;
  92}
  93
  94/**
  95 * cpu_function_call - call a function on the cpu
  96 * @func:       the function to be called
  97 * @info:       the function call argument
  98 *
  99 * Calls the function @func on the remote cpu.
 100 *
 101 * returns: @func return value or -ENXIO when the cpu is offline
 102 */
 103static int cpu_function_call(int cpu, int (*func) (void *info), void *info)
 104{
 105        struct remote_function_call data = {
 106                .p      = NULL,
 107                .func   = func,
 108                .info   = info,
 109                .ret    = -ENXIO, /* No such CPU */
 110        };
 111
 112        smp_call_function_single(cpu, remote_function, &data, 1);
 113
 114        return data.ret;
 115}
 116
 117#define PERF_FLAG_ALL (PERF_FLAG_FD_NO_GROUP |\
 118                       PERF_FLAG_FD_OUTPUT  |\
 119                       PERF_FLAG_PID_CGROUP)
 120
 121/*
 122 * branch priv levels that need permission checks
 123 */
 124#define PERF_SAMPLE_BRANCH_PERM_PLM \
 125        (PERF_SAMPLE_BRANCH_KERNEL |\
 126         PERF_SAMPLE_BRANCH_HV)
 127
 128enum event_type_t {
 129        EVENT_FLEXIBLE = 0x1,
 130        EVENT_PINNED = 0x2,
 131        EVENT_ALL = EVENT_FLEXIBLE | EVENT_PINNED,
 132};
 133
 134/*
 135 * perf_sched_events : >0 events exist
 136 * perf_cgroup_events: >0 per-cpu cgroup events exist on this cpu
 137 */
 138struct static_key_deferred perf_sched_events __read_mostly;
 139static DEFINE_PER_CPU(atomic_t, perf_cgroup_events);
 140static DEFINE_PER_CPU(atomic_t, perf_branch_stack_events);
 141
 142static atomic_t nr_mmap_events __read_mostly;
 143static atomic_t nr_comm_events __read_mostly;
 144static atomic_t nr_task_events __read_mostly;
 145
 146static LIST_HEAD(pmus);
 147static DEFINE_MUTEX(pmus_lock);
 148static struct srcu_struct pmus_srcu;
 149
 150/*
 151 * perf event paranoia level:
 152 *  -1 - not paranoid at all
 153 *   0 - disallow raw tracepoint access for unpriv
 154 *   1 - disallow cpu events for unpriv
 155 *   2 - disallow kernel profiling for unpriv
 156 */
 157int sysctl_perf_event_paranoid __read_mostly = 1;
 158
 159/* Minimum for 512 kiB + 1 user control page */
 160int sysctl_perf_event_mlock __read_mostly = 512 + (PAGE_SIZE / 1024); /* 'free' kiB per user */
 161
 162/*
 163 * max perf event sample rate
 164 */
 165#define DEFAULT_MAX_SAMPLE_RATE 100000
 166int sysctl_perf_event_sample_rate __read_mostly = DEFAULT_MAX_SAMPLE_RATE;
 167static int max_samples_per_tick __read_mostly =
 168        DIV_ROUND_UP(DEFAULT_MAX_SAMPLE_RATE, HZ);
 169
 170int perf_proc_update_handler(struct ctl_table *table, int write,
 171                void __user *buffer, size_t *lenp,
 172                loff_t *ppos)
 173{
 174        int ret = proc_dointvec(table, write, buffer, lenp, ppos);
 175
 176        if (ret || !write)
 177                return ret;
 178
 179        max_samples_per_tick = DIV_ROUND_UP(sysctl_perf_event_sample_rate, HZ);
 180
 181        return 0;
 182}
 183
 184static atomic64_t perf_event_id;
 185
 186static void cpu_ctx_sched_out(struct perf_cpu_context *cpuctx,
 187                              enum event_type_t event_type);
 188
 189static void cpu_ctx_sched_in(struct perf_cpu_context *cpuctx,
 190                             enum event_type_t event_type,
 191                             struct task_struct *task);
 192
 193static void update_context_time(struct perf_event_context *ctx);
 194static u64 perf_event_time(struct perf_event *event);
 195
 196static void ring_buffer_attach(struct perf_event *event,
 197                               struct ring_buffer *rb);
 198
 199void __weak perf_event_print_debug(void)        { }
 200
 201extern __weak const char *perf_pmu_name(void)
 202{
 203        return "pmu";
 204}
 205
 206static inline u64 perf_clock(void)
 207{
 208        return local_clock();
 209}
 210
 211static inline struct perf_cpu_context *
 212__get_cpu_context(struct perf_event_context *ctx)
 213{
 214        return this_cpu_ptr(ctx->pmu->pmu_cpu_context);
 215}
 216
 217static void perf_ctx_lock(struct perf_cpu_context *cpuctx,
 218                          struct perf_event_context *ctx)
 219{
 220        raw_spin_lock(&cpuctx->ctx.lock);
 221        if (ctx)
 222                raw_spin_lock(&ctx->lock);
 223}
 224
 225static void perf_ctx_unlock(struct perf_cpu_context *cpuctx,
 226                            struct perf_event_context *ctx)
 227{
 228        if (ctx)
 229                raw_spin_unlock(&ctx->lock);
 230        raw_spin_unlock(&cpuctx->ctx.lock);
 231}
 232
 233#ifdef CONFIG_CGROUP_PERF
 234
 235/*
 236 * Must ensure cgroup is pinned (css_get) before calling
 237 * this function. In other words, we cannot call this function
 238 * if there is no cgroup event for the current CPU context.
 239 */
 240static inline struct perf_cgroup *
 241perf_cgroup_from_task(struct task_struct *task)
 242{
 243        return container_of(task_subsys_state(task, perf_subsys_id),
 244                        struct perf_cgroup, css);
 245}
 246
 247static inline bool
 248perf_cgroup_match(struct perf_event *event)
 249{
 250        struct perf_event_context *ctx = event->ctx;
 251        struct perf_cpu_context *cpuctx = __get_cpu_context(ctx);
 252
 253        return !event->cgrp || event->cgrp == cpuctx->cgrp;
 254}
 255
 256static inline bool perf_tryget_cgroup(struct perf_event *event)
 257{
 258        return css_tryget(&event->cgrp->css);
 259}
 260
 261static inline void perf_put_cgroup(struct perf_event *event)
 262{
 263        css_put(&event->cgrp->css);
 264}
 265
 266static inline void perf_detach_cgroup(struct perf_event *event)
 267{
 268        perf_put_cgroup(event);
 269        event->cgrp = NULL;
 270}
 271
 272static inline int is_cgroup_event(struct perf_event *event)
 273{
 274        return event->cgrp != NULL;
 275}
 276
 277static inline u64 perf_cgroup_event_time(struct perf_event *event)
 278{
 279        struct perf_cgroup_info *t;
 280
 281        t = per_cpu_ptr(event->cgrp->info, event->cpu);
 282        return t->time;
 283}
 284
 285static inline void __update_cgrp_time(struct perf_cgroup *cgrp)
 286{
 287        struct perf_cgroup_info *info;
 288        u64 now;
 289
 290        now = perf_clock();
 291
 292        info = this_cpu_ptr(cgrp->info);
 293
 294        info->time += now - info->timestamp;
 295        info->timestamp = now;
 296}
 297
 298static inline void update_cgrp_time_from_cpuctx(struct perf_cpu_context *cpuctx)
 299{
 300        struct perf_cgroup *cgrp_out = cpuctx->cgrp;
 301        if (cgrp_out)
 302                __update_cgrp_time(cgrp_out);
 303}
 304
 305static inline void update_cgrp_time_from_event(struct perf_event *event)
 306{
 307        struct perf_cgroup *cgrp;
 308
 309        /*
 310         * ensure we access cgroup data only when needed and
 311         * when we know the cgroup is pinned (css_get)
 312         */
 313        if (!is_cgroup_event(event))
 314                return;
 315
 316        cgrp = perf_cgroup_from_task(current);
 317        /*
 318         * Do not update time when cgroup is not active
 319         */
 320        if (cgrp == event->cgrp)
 321                __update_cgrp_time(event->cgrp);
 322}
 323
 324static inline void
 325perf_cgroup_set_timestamp(struct task_struct *task,
 326                          struct perf_event_context *ctx)
 327{
 328        struct perf_cgroup *cgrp;
 329        struct perf_cgroup_info *info;
 330
 331        /*
 332         * ctx->lock held by caller
 333         * ensure we do not access cgroup data
 334         * unless we have the cgroup pinned (css_get)
 335         */
 336        if (!task || !ctx->nr_cgroups)
 337                return;
 338
 339        cgrp = perf_cgroup_from_task(task);
 340        info = this_cpu_ptr(cgrp->info);
 341        info->timestamp = ctx->timestamp;
 342}
 343
 344#define PERF_CGROUP_SWOUT       0x1 /* cgroup switch out every event */
 345#define PERF_CGROUP_SWIN        0x2 /* cgroup switch in events based on task */
 346
 347/*
 348 * reschedule events based on the cgroup constraint of task.
 349 *
 350 * mode SWOUT : schedule out everything
 351 * mode SWIN : schedule in based on cgroup for next
 352 */
 353void perf_cgroup_switch(struct task_struct *task, int mode)
 354{
 355        struct perf_cpu_context *cpuctx;
 356        struct pmu *pmu;
 357        unsigned long flags;
 358
 359        /*
 360         * disable interrupts to avoid geting nr_cgroup
 361         * changes via __perf_event_disable(). Also
 362         * avoids preemption.
 363         */
 364        local_irq_save(flags);
 365
 366        /*
 367         * we reschedule only in the presence of cgroup
 368         * constrained events.
 369         */
 370        rcu_read_lock();
 371
 372        list_for_each_entry_rcu(pmu, &pmus, entry) {
 373                cpuctx = this_cpu_ptr(pmu->pmu_cpu_context);
 374
 375                /*
 376                 * perf_cgroup_events says at least one
 377                 * context on this CPU has cgroup events.
 378                 *
 379                 * ctx->nr_cgroups reports the number of cgroup
 380                 * events for a context.
 381                 */
 382                if (cpuctx->ctx.nr_cgroups > 0) {
 383                        perf_ctx_lock(cpuctx, cpuctx->task_ctx);
 384                        perf_pmu_disable(cpuctx->ctx.pmu);
 385
 386                        if (mode & PERF_CGROUP_SWOUT) {
 387                                cpu_ctx_sched_out(cpuctx, EVENT_ALL);
 388                                /*
 389                                 * must not be done before ctxswout due
 390                                 * to event_filter_match() in event_sched_out()
 391                                 */
 392                                cpuctx->cgrp = NULL;
 393                        }
 394
 395                        if (mode & PERF_CGROUP_SWIN) {
 396                                WARN_ON_ONCE(cpuctx->cgrp);
 397                                /* set cgrp before ctxsw in to
 398                                 * allow event_filter_match() to not
 399                                 * have to pass task around
 400                                 */
 401                                cpuctx->cgrp = perf_cgroup_from_task(task);
 402                                cpu_ctx_sched_in(cpuctx, EVENT_ALL, task);
 403                        }
 404                        perf_pmu_enable(cpuctx->ctx.pmu);
 405                        perf_ctx_unlock(cpuctx, cpuctx->task_ctx);
 406                }
 407        }
 408
 409        rcu_read_unlock();
 410
 411        local_irq_restore(flags);
 412}
 413
 414static inline void perf_cgroup_sched_out(struct task_struct *task,
 415                                         struct task_struct *next)
 416{
 417        struct perf_cgroup *cgrp1;
 418        struct perf_cgroup *cgrp2 = NULL;
 419
 420        /*
 421         * we come here when we know perf_cgroup_events > 0
 422         */
 423        cgrp1 = perf_cgroup_from_task(task);
 424
 425        /*
 426         * next is NULL when called from perf_event_enable_on_exec()
 427         * that will systematically cause a cgroup_switch()
 428         */
 429        if (next)
 430                cgrp2 = perf_cgroup_from_task(next);
 431
 432        /*
 433         * only schedule out current cgroup events if we know
 434         * that we are switching to a different cgroup. Otherwise,
 435         * do no touch the cgroup events.
 436         */
 437        if (cgrp1 != cgrp2)
 438                perf_cgroup_switch(task, PERF_CGROUP_SWOUT);
 439}
 440
 441static inline void perf_cgroup_sched_in(struct task_struct *prev,
 442                                        struct task_struct *task)
 443{
 444        struct perf_cgroup *cgrp1;
 445        struct perf_cgroup *cgrp2 = NULL;
 446
 447        /*
 448         * we come here when we know perf_cgroup_events > 0
 449         */
 450        cgrp1 = perf_cgroup_from_task(task);
 451
 452        /* prev can never be NULL */
 453        cgrp2 = perf_cgroup_from_task(prev);
 454
 455        /*
 456         * only need to schedule in cgroup events if we are changing
 457         * cgroup during ctxsw. Cgroup events were not scheduled
 458         * out of ctxsw out if that was not the case.
 459         */
 460        if (cgrp1 != cgrp2)
 461                perf_cgroup_switch(task, PERF_CGROUP_SWIN);
 462}
 463
 464static inline int perf_cgroup_connect(int fd, struct perf_event *event,
 465                                      struct perf_event_attr *attr,
 466                                      struct perf_event *group_leader)
 467{
 468        struct perf_cgroup *cgrp;
 469        struct cgroup_subsys_state *css;
 470        struct file *file;
 471        int ret = 0, fput_needed;
 472
 473        file = fget_light(fd, &fput_needed);
 474        if (!file)
 475                return -EBADF;
 476
 477        css = cgroup_css_from_dir(file, perf_subsys_id);
 478        if (IS_ERR(css)) {
 479                ret = PTR_ERR(css);
 480                goto out;
 481        }
 482
 483        cgrp = container_of(css, struct perf_cgroup, css);
 484        event->cgrp = cgrp;
 485
 486        /* must be done before we fput() the file */
 487        if (!perf_tryget_cgroup(event)) {
 488                event->cgrp = NULL;
 489                ret = -ENOENT;
 490                goto out;
 491        }
 492
 493        /*
 494         * all events in a group must monitor
 495         * the same cgroup because a task belongs
 496         * to only one perf cgroup at a time
 497         */
 498        if (group_leader && group_leader->cgrp != cgrp) {
 499                perf_detach_cgroup(event);
 500                ret = -EINVAL;
 501        }
 502out:
 503        fput_light(file, fput_needed);
 504        return ret;
 505}
 506
 507static inline void
 508perf_cgroup_set_shadow_time(struct perf_event *event, u64 now)
 509{
 510        struct perf_cgroup_info *t;
 511        t = per_cpu_ptr(event->cgrp->info, event->cpu);
 512        event->shadow_ctx_time = now - t->timestamp;
 513}
 514
 515static inline void
 516perf_cgroup_defer_enabled(struct perf_event *event)
 517{
 518        /*
 519         * when the current task's perf cgroup does not match
 520         * the event's, we need to remember to call the
 521         * perf_mark_enable() function the first time a task with
 522         * a matching perf cgroup is scheduled in.
 523         */
 524        if (is_cgroup_event(event) && !perf_cgroup_match(event))
 525                event->cgrp_defer_enabled = 1;
 526}
 527
 528static inline void
 529perf_cgroup_mark_enabled(struct perf_event *event,
 530                         struct perf_event_context *ctx)
 531{
 532        struct perf_event *sub;
 533        u64 tstamp = perf_event_time(event);
 534
 535        if (!event->cgrp_defer_enabled)
 536                return;
 537
 538        event->cgrp_defer_enabled = 0;
 539
 540        event->tstamp_enabled = tstamp - event->total_time_enabled;
 541        list_for_each_entry(sub, &event->sibling_list, group_entry) {
 542                if (sub->state >= PERF_EVENT_STATE_INACTIVE) {
 543                        sub->tstamp_enabled = tstamp - sub->total_time_enabled;
 544                        sub->cgrp_defer_enabled = 0;
 545                }
 546        }
 547}
 548#else /* !CONFIG_CGROUP_PERF */
 549
 550static inline bool
 551perf_cgroup_match(struct perf_event *event)
 552{
 553        return true;
 554}
 555
 556static inline void perf_detach_cgroup(struct perf_event *event)
 557{}
 558
 559static inline int is_cgroup_event(struct perf_event *event)
 560{
 561        return 0;
 562}
 563
 564static inline u64 perf_cgroup_event_cgrp_time(struct perf_event *event)
 565{
 566        return 0;
 567}
 568
 569static inline void update_cgrp_time_from_event(struct perf_event *event)
 570{
 571}
 572
 573static inline void update_cgrp_time_from_cpuctx(struct perf_cpu_context *cpuctx)
 574{
 575}
 576
 577static inline void perf_cgroup_sched_out(struct task_struct *task,
 578                                         struct task_struct *next)
 579{
 580}
 581
 582static inline void perf_cgroup_sched_in(struct task_struct *prev,
 583                                        struct task_struct *task)
 584{
 585}
 586
 587static inline int perf_cgroup_connect(pid_t pid, struct perf_event *event,
 588                                      struct perf_event_attr *attr,
 589                                      struct perf_event *group_leader)
 590{
 591        return -EINVAL;
 592}
 593
 594static inline void
 595perf_cgroup_set_timestamp(struct task_struct *task,
 596                          struct perf_event_context *ctx)
 597{
 598}
 599
 600void
 601perf_cgroup_switch(struct task_struct *task, struct task_struct *next)
 602{
 603}
 604
 605static inline void
 606perf_cgroup_set_shadow_time(struct perf_event *event, u64 now)
 607{
 608}
 609
 610static inline u64 perf_cgroup_event_time(struct perf_event *event)
 611{
 612        return 0;
 613}
 614
 615static inline void
 616perf_cgroup_defer_enabled(struct perf_event *event)
 617{
 618}
 619
 620static inline void
 621perf_cgroup_mark_enabled(struct perf_event *event,
 622                         struct perf_event_context *ctx)
 623{
 624}
 625#endif
 626
 627void perf_pmu_disable(struct pmu *pmu)
 628{
 629        int *count = this_cpu_ptr(pmu->pmu_disable_count);
 630        if (!(*count)++)
 631                pmu->pmu_disable(pmu);
 632}
 633
 634void perf_pmu_enable(struct pmu *pmu)
 635{
 636        int *count = this_cpu_ptr(pmu->pmu_disable_count);
 637        if (!--(*count))
 638                pmu->pmu_enable(pmu);
 639}
 640
 641static DEFINE_PER_CPU(struct list_head, rotation_list);
 642
 643/*
 644 * perf_pmu_rotate_start() and perf_rotate_context() are fully serialized
 645 * because they're strictly cpu affine and rotate_start is called with IRQs
 646 * disabled, while rotate_context is called from IRQ context.
 647 */
 648static void perf_pmu_rotate_start(struct pmu *pmu)
 649{
 650        struct perf_cpu_context *cpuctx = this_cpu_ptr(pmu->pmu_cpu_context);
 651        struct list_head *head = &__get_cpu_var(rotation_list);
 652
 653        WARN_ON(!irqs_disabled());
 654
 655        if (list_empty(&cpuctx->rotation_list))
 656                list_add(&cpuctx->rotation_list, head);
 657}
 658
 659static void get_ctx(struct perf_event_context *ctx)
 660{
 661        WARN_ON(!atomic_inc_not_zero(&ctx->refcount));
 662}
 663
 664static void put_ctx(struct perf_event_context *ctx)
 665{
 666        if (atomic_dec_and_test(&ctx->refcount)) {
 667                if (ctx->parent_ctx)
 668                        put_ctx(ctx->parent_ctx);
 669                if (ctx->task)
 670                        put_task_struct(ctx->task);
 671                kfree_rcu(ctx, rcu_head);
 672        }
 673}
 674
 675static void unclone_ctx(struct perf_event_context *ctx)
 676{
 677        if (ctx->parent_ctx) {
 678                put_ctx(ctx->parent_ctx);
 679                ctx->parent_ctx = NULL;
 680        }
 681}
 682
 683static u32 perf_event_pid(struct perf_event *event, struct task_struct *p)
 684{
 685        /*
 686         * only top level events have the pid namespace they were created in
 687         */
 688        if (event->parent)
 689                event = event->parent;
 690
 691        return task_tgid_nr_ns(p, event->ns);
 692}
 693
 694static u32 perf_event_tid(struct perf_event *event, struct task_struct *p)
 695{
 696        /*
 697         * only top level events have the pid namespace they were created in
 698         */
 699        if (event->parent)
 700                event = event->parent;
 701
 702        return task_pid_nr_ns(p, event->ns);
 703}
 704
 705/*
 706 * If we inherit events we want to return the parent event id
 707 * to userspace.
 708 */
 709static u64 primary_event_id(struct perf_event *event)
 710{
 711        u64 id = event->id;
 712
 713        if (event->parent)
 714                id = event->parent->id;
 715
 716        return id;
 717}
 718
 719/*
 720 * Get the perf_event_context for a task and lock it.
 721 * This has to cope with with the fact that until it is locked,
 722 * the context could get moved to another task.
 723 */
 724static struct perf_event_context *
 725perf_lock_task_context(struct task_struct *task, int ctxn, unsigned long *flags)
 726{
 727        struct perf_event_context *ctx;
 728
 729        rcu_read_lock();
 730retry:
 731        ctx = rcu_dereference(task->perf_event_ctxp[ctxn]);
 732        if (ctx) {
 733                /*
 734                 * If this context is a clone of another, it might
 735                 * get swapped for another underneath us by
 736                 * perf_event_task_sched_out, though the
 737                 * rcu_read_lock() protects us from any context
 738                 * getting freed.  Lock the context and check if it
 739                 * got swapped before we could get the lock, and retry
 740                 * if so.  If we locked the right context, then it
 741                 * can't get swapped on us any more.
 742                 */
 743                raw_spin_lock_irqsave(&ctx->lock, *flags);
 744                if (ctx != rcu_dereference(task->perf_event_ctxp[ctxn])) {
 745                        raw_spin_unlock_irqrestore(&ctx->lock, *flags);
 746                        goto retry;
 747                }
 748
 749                if (!atomic_inc_not_zero(&ctx->refcount)) {
 750                        raw_spin_unlock_irqrestore(&ctx->lock, *flags);
 751                        ctx = NULL;
 752                }
 753        }
 754        rcu_read_unlock();
 755        return ctx;
 756}
 757
 758/*
 759 * Get the context for a task and increment its pin_count so it
 760 * can't get swapped to another task.  This also increments its
 761 * reference count so that the context can't get freed.
 762 */
 763static struct perf_event_context *
 764perf_pin_task_context(struct task_struct *task, int ctxn)
 765{
 766        struct perf_event_context *ctx;
 767        unsigned long flags;
 768
 769        ctx = perf_lock_task_context(task, ctxn, &flags);
 770        if (ctx) {
 771                ++ctx->pin_count;
 772                raw_spin_unlock_irqrestore(&ctx->lock, flags);
 773        }
 774        return ctx;
 775}
 776
 777static void perf_unpin_context(struct perf_event_context *ctx)
 778{
 779        unsigned long flags;
 780
 781        raw_spin_lock_irqsave(&ctx->lock, flags);
 782        --ctx->pin_count;
 783        raw_spin_unlock_irqrestore(&ctx->lock, flags);
 784}
 785
 786/*
 787 * Update the record of the current time in a context.
 788 */
 789static void update_context_time(struct perf_event_context *ctx)
 790{
 791        u64 now = perf_clock();
 792
 793        ctx->time += now - ctx->timestamp;
 794        ctx->timestamp = now;
 795}
 796
 797static u64 perf_event_time(struct perf_event *event)
 798{
 799        struct perf_event_context *ctx = event->ctx;
 800
 801        if (is_cgroup_event(event))
 802                return perf_cgroup_event_time(event);
 803
 804        return ctx ? ctx->time : 0;
 805}
 806
 807/*
 808 * Update the total_time_enabled and total_time_running fields for a event.
 809 * The caller of this function needs to hold the ctx->lock.
 810 */
 811static void update_event_times(struct perf_event *event)
 812{
 813        struct perf_event_context *ctx = event->ctx;
 814        u64 run_end;
 815
 816        if (event->state < PERF_EVENT_STATE_INACTIVE ||
 817            event->group_leader->state < PERF_EVENT_STATE_INACTIVE)
 818                return;
 819        /*
 820         * in cgroup mode, time_enabled represents
 821         * the time the event was enabled AND active
 822         * tasks were in the monitored cgroup. This is
 823         * independent of the activity of the context as
 824         * there may be a mix of cgroup and non-cgroup events.
 825         *
 826         * That is why we treat cgroup events differently
 827         * here.
 828         */
 829        if (is_cgroup_event(event))
 830                run_end = perf_cgroup_event_time(event);
 831        else if (ctx->is_active)
 832                run_end = ctx->time;
 833        else
 834                run_end = event->tstamp_stopped;
 835
 836        event->total_time_enabled = run_end - event->tstamp_enabled;
 837
 838        if (event->state == PERF_EVENT_STATE_INACTIVE)
 839                run_end = event->tstamp_stopped;
 840        else
 841                run_end = perf_event_time(event);
 842
 843        event->total_time_running = run_end - event->tstamp_running;
 844
 845}
 846
 847/*
 848 * Update total_time_enabled and total_time_running for all events in a group.
 849 */
 850static void update_group_times(struct perf_event *leader)
 851{
 852        struct perf_event *event;
 853
 854        update_event_times(leader);
 855        list_for_each_entry(event, &leader->sibling_list, group_entry)
 856                update_event_times(event);
 857}
 858
 859static struct list_head *
 860ctx_group_list(struct perf_event *event, struct perf_event_context *ctx)
 861{
 862        if (event->attr.pinned)
 863                return &ctx->pinned_groups;
 864        else
 865                return &ctx->flexible_groups;
 866}
 867
 868/*
 869 * Add a event from the lists for its context.
 870 * Must be called with ctx->mutex and ctx->lock held.
 871 */
 872static void
 873list_add_event(struct perf_event *event, struct perf_event_context *ctx)
 874{
 875        WARN_ON_ONCE(event->attach_state & PERF_ATTACH_CONTEXT);
 876        event->attach_state |= PERF_ATTACH_CONTEXT;
 877
 878        /*
 879         * If we're a stand alone event or group leader, we go to the context
 880         * list, group events are kept attached to the group so that
 881         * perf_group_detach can, at all times, locate all siblings.
 882         */
 883        if (event->group_leader == event) {
 884                struct list_head *list;
 885
 886                if (is_software_event(event))
 887                        event->group_flags |= PERF_GROUP_SOFTWARE;
 888
 889                list = ctx_group_list(event, ctx);
 890                list_add_tail(&event->group_entry, list);
 891        }
 892
 893        if (is_cgroup_event(event))
 894                ctx->nr_cgroups++;
 895
 896        if (has_branch_stack(event))
 897                ctx->nr_branch_stack++;
 898
 899        list_add_rcu(&event->event_entry, &ctx->event_list);
 900        if (!ctx->nr_events)
 901                perf_pmu_rotate_start(ctx->pmu);
 902        ctx->nr_events++;
 903        if (event->attr.inherit_stat)
 904                ctx->nr_stat++;
 905}
 906
 907/*
 908 * Called at perf_event creation and when events are attached/detached from a
 909 * group.
 910 */
 911static void perf_event__read_size(struct perf_event *event)
 912{
 913        int entry = sizeof(u64); /* value */
 914        int size = 0;
 915        int nr = 1;
 916
 917        if (event->attr.read_format & PERF_FORMAT_TOTAL_TIME_ENABLED)
 918                size += sizeof(u64);
 919
 920        if (event->attr.read_format & PERF_FORMAT_TOTAL_TIME_RUNNING)
 921                size += sizeof(u64);
 922
 923        if (event->attr.read_format & PERF_FORMAT_ID)
 924                entry += sizeof(u64);
 925
 926        if (event->attr.read_format & PERF_FORMAT_GROUP) {
 927                nr += event->group_leader->nr_siblings;
 928                size += sizeof(u64);
 929        }
 930
 931        size += entry * nr;
 932        event->read_size = size;
 933}
 934
 935static void perf_event__header_size(struct perf_event *event)
 936{
 937        struct perf_sample_data *data;
 938        u64 sample_type = event->attr.sample_type;
 939        u16 size = 0;
 940
 941        perf_event__read_size(event);
 942
 943        if (sample_type & PERF_SAMPLE_IP)
 944                size += sizeof(data->ip);
 945
 946        if (sample_type & PERF_SAMPLE_ADDR)
 947                size += sizeof(data->addr);
 948
 949        if (sample_type & PERF_SAMPLE_PERIOD)
 950                size += sizeof(data->period);
 951
 952        if (sample_type & PERF_SAMPLE_READ)
 953                size += event->read_size;
 954
 955        event->header_size = size;
 956}
 957
 958static void perf_event__id_header_size(struct perf_event *event)
 959{
 960        struct perf_sample_data *data;
 961        u64 sample_type = event->attr.sample_type;
 962        u16 size = 0;
 963
 964        if (sample_type & PERF_SAMPLE_TID)
 965                size += sizeof(data->tid_entry);
 966
 967        if (sample_type & PERF_SAMPLE_TIME)
 968                size += sizeof(data->time);
 969
 970        if (sample_type & PERF_SAMPLE_ID)
 971                size += sizeof(data->id);
 972
 973        if (sample_type & PERF_SAMPLE_STREAM_ID)
 974                size += sizeof(data->stream_id);
 975
 976        if (sample_type & PERF_SAMPLE_CPU)
 977                size += sizeof(data->cpu_entry);
 978
 979        event->id_header_size = size;
 980}
 981
 982static void perf_group_attach(struct perf_event *event)
 983{
 984        struct perf_event *group_leader = event->group_leader, *pos;
 985
 986        /*
 987         * We can have double attach due to group movement in perf_event_open.
 988         */
 989        if (event->attach_state & PERF_ATTACH_GROUP)
 990                return;
 991
 992        event->attach_state |= PERF_ATTACH_GROUP;
 993
 994        if (group_leader == event)
 995                return;
 996
 997        if (group_leader->group_flags & PERF_GROUP_SOFTWARE &&
 998                        !is_software_event(event))
 999                group_leader->group_flags &= ~PERF_GROUP_SOFTWARE;
1000
1001        list_add_tail(&event->group_entry, &group_leader->sibling_list);
1002        group_leader->nr_siblings++;
1003
1004        perf_event__header_size(group_leader);
1005
1006        list_for_each_entry(pos, &group_leader->sibling_list, group_entry)
1007                perf_event__header_size(pos);
1008}
1009
1010/*
1011 * Remove a event from the lists for its context.
1012 * Must be called with ctx->mutex and ctx->lock held.
1013 */
1014static void
1015list_del_event(struct perf_event *event, struct perf_event_context *ctx)
1016{
1017        struct perf_cpu_context *cpuctx;
1018        /*
1019         * We can have double detach due to exit/hot-unplug + close.
1020         */
1021        if (!(event->attach_state & PERF_ATTACH_CONTEXT))
1022                return;
1023
1024        event->attach_state &= ~PERF_ATTACH_CONTEXT;
1025
1026        if (is_cgroup_event(event)) {
1027                ctx->nr_cgroups--;
1028                cpuctx = __get_cpu_context(ctx);
1029                /*
1030                 * if there are no more cgroup events
1031                 * then cler cgrp to avoid stale pointer
1032                 * in update_cgrp_time_from_cpuctx()
1033                 */
1034                if (!ctx->nr_cgroups)
1035                        cpuctx->cgrp = NULL;
1036        }
1037
1038        if (has_branch_stack(event))
1039                ctx->nr_branch_stack--;
1040
1041        ctx->nr_events--;
1042        if (event->attr.inherit_stat)
1043                ctx->nr_stat--;
1044
1045        list_del_rcu(&event->event_entry);
1046
1047        if (event->group_leader == event)
1048                list_del_init(&event->group_entry);
1049
1050        update_group_times(event);
1051
1052        /*
1053         * If event was in error state, then keep it
1054         * that way, otherwise bogus counts will be
1055         * returned on read(). The only way to get out
1056         * of error state is by explicit re-enabling
1057         * of the event
1058         */
1059        if (event->state > PERF_EVENT_STATE_OFF)
1060                event->state = PERF_EVENT_STATE_OFF;
1061}
1062
1063static void perf_group_detach(struct perf_event *event)
1064{
1065        struct perf_event *sibling, *tmp;
1066        struct list_head *list = NULL;
1067
1068        /*
1069         * We can have double detach due to exit/hot-unplug + close.
1070         */
1071        if (!(event->attach_state & PERF_ATTACH_GROUP))
1072                return;
1073
1074        event->attach_state &= ~PERF_ATTACH_GROUP;
1075
1076        /*
1077         * If this is a sibling, remove it from its group.
1078         */
1079        if (event->group_leader != event) {
1080                list_del_init(&event->group_entry);
1081                event->group_leader->nr_siblings--;
1082                goto out;
1083        }
1084
1085        if (!list_empty(&event->group_entry))
1086                list = &event->group_entry;
1087
1088        /*
1089         * If this was a group event with sibling events then
1090         * upgrade the siblings to singleton events by adding them
1091         * to whatever list we are on.
1092         */
1093        list_for_each_entry_safe(sibling, tmp, &event->sibling_list, group_entry) {
1094                if (list)
1095                        list_move_tail(&sibling->group_entry, list);
1096                sibling->group_leader = sibling;
1097
1098                /* Inherit group flags from the previous leader */
1099                sibling->group_flags = event->group_flags;
1100        }
1101
1102out:
1103        perf_event__header_size(event->group_leader);
1104
1105        list_for_each_entry(tmp, &event->group_leader->sibling_list, group_entry)
1106                perf_event__header_size(tmp);
1107}
1108
1109static inline int
1110event_filter_match(struct perf_event *event)
1111{
1112        return (event->cpu == -1 || event->cpu == smp_processor_id())
1113            && perf_cgroup_match(event);
1114}
1115
1116static void
1117event_sched_out(struct perf_event *event,
1118                  struct perf_cpu_context *cpuctx,
1119                  struct perf_event_context *ctx)
1120{
1121        u64 tstamp = perf_event_time(event);
1122        u64 delta;
1123        /*
1124         * An event which could not be activated because of
1125         * filter mismatch still needs to have its timings
1126         * maintained, otherwise bogus information is return
1127         * via read() for time_enabled, time_running:
1128         */
1129        if (event->state == PERF_EVENT_STATE_INACTIVE
1130            && !event_filter_match(event)) {
1131                delta = tstamp - event->tstamp_stopped;
1132                event->tstamp_running += delta;
1133                event->tstamp_stopped = tstamp;
1134        }
1135
1136        if (event->state != PERF_EVENT_STATE_ACTIVE)
1137                return;
1138
1139        event->state = PERF_EVENT_STATE_INACTIVE;
1140        if (event->pending_disable) {
1141                event->pending_disable = 0;
1142                event->state = PERF_EVENT_STATE_OFF;
1143        }
1144        event->tstamp_stopped = tstamp;
1145        event->pmu->del(event, 0);
1146        event->oncpu = -1;
1147
1148        if (!is_software_event(event))
1149                cpuctx->active_oncpu--;
1150        ctx->nr_active--;
1151        if (event->attr.freq && event->attr.sample_freq)
1152                ctx->nr_freq--;
1153        if (event->attr.exclusive || !cpuctx->active_oncpu)
1154                cpuctx->exclusive = 0;
1155}
1156
1157static void
1158group_sched_out(struct perf_event *group_event,
1159                struct perf_cpu_context *cpuctx,
1160                struct perf_event_context *ctx)
1161{
1162        struct perf_event *event;
1163        int state = group_event->state;
1164
1165        event_sched_out(group_event, cpuctx, ctx);
1166
1167        /*
1168         * Schedule out siblings (if any):
1169         */
1170        list_for_each_entry(event, &group_event->sibling_list, group_entry)
1171                event_sched_out(event, cpuctx, ctx);
1172
1173        if (state == PERF_EVENT_STATE_ACTIVE && group_event->attr.exclusive)
1174                cpuctx->exclusive = 0;
1175}
1176
1177/*
1178 * Cross CPU call to remove a performance event
1179 *
1180 * We disable the event on the hardware level first. After that we
1181 * remove it from the context list.
1182 */
1183static int __perf_remove_from_context(void *info)
1184{
1185        struct perf_event *event = info;
1186        struct perf_event_context *ctx = event->ctx;
1187        struct perf_cpu_context *cpuctx = __get_cpu_context(ctx);
1188
1189        raw_spin_lock(&ctx->lock);
1190        event_sched_out(event, cpuctx, ctx);
1191        list_del_event(event, ctx);
1192        if (!ctx->nr_events && cpuctx->task_ctx == ctx) {
1193                ctx->is_active = 0;
1194                cpuctx->task_ctx = NULL;
1195        }
1196        raw_spin_unlock(&ctx->lock);
1197
1198        return 0;
1199}
1200
1201
1202/*
1203 * Remove the event from a task's (or a CPU's) list of events.
1204 *
1205 * CPU events are removed with a smp call. For task events we only
1206 * call when the task is on a CPU.
1207 *
1208 * If event->ctx is a cloned context, callers must make sure that
1209 * every task struct that event->ctx->task could possibly point to
1210 * remains valid.  This is OK when called from perf_release since
1211 * that only calls us on the top-level context, which can't be a clone.
1212 * When called from perf_event_exit_task, it's OK because the
1213 * context has been detached from its task.
1214 */
1215static void perf_remove_from_context(struct perf_event *event)
1216{
1217        struct perf_event_context *ctx = event->ctx;
1218        struct task_struct *task = ctx->task;
1219
1220        lockdep_assert_held(&ctx->mutex);
1221
1222        if (!task) {
1223                /*
1224                 * Per cpu events are removed via an smp call and
1225                 * the removal is always successful.
1226                 */
1227                cpu_function_call(event->cpu, __perf_remove_from_context, event);
1228                return;
1229        }
1230
1231retry:
1232        if (!task_function_call(task, __perf_remove_from_context, event))
1233                return;
1234
1235        raw_spin_lock_irq(&ctx->lock);
1236        /*
1237         * If we failed to find a running task, but find the context active now
1238         * that we've acquired the ctx->lock, retry.
1239         */
1240        if (ctx->is_active) {
1241                raw_spin_unlock_irq(&ctx->lock);
1242                goto retry;
1243        }
1244
1245        /*
1246         * Since the task isn't running, its safe to remove the event, us
1247         * holding the ctx->lock ensures the task won't get scheduled in.
1248         */
1249        list_del_event(event, ctx);
1250        raw_spin_unlock_irq(&ctx->lock);
1251}
1252
1253/*
1254 * Cross CPU call to disable a performance event
1255 */
1256int __perf_event_disable(void *info)
1257{
1258        struct perf_event *event = info;
1259        struct perf_event_context *ctx = event->ctx;
1260        struct perf_cpu_context *cpuctx = __get_cpu_context(ctx);
1261
1262        /*
1263         * If this is a per-task event, need to check whether this
1264         * event's task is the current task on this cpu.
1265         *
1266         * Can trigger due to concurrent perf_event_context_sched_out()
1267         * flipping contexts around.
1268         */
1269        if (ctx->task && cpuctx->task_ctx != ctx)
1270                return -EINVAL;
1271
1272        raw_spin_lock(&ctx->lock);
1273
1274        /*
1275         * If the event is on, turn it off.
1276         * If it is in error state, leave it in error state.
1277         */
1278        if (event->state >= PERF_EVENT_STATE_INACTIVE) {
1279                update_context_time(ctx);
1280                update_cgrp_time_from_event(event);
1281                update_group_times(event);
1282                if (event == event->group_leader)
1283                        group_sched_out(event, cpuctx, ctx);
1284                else
1285                        event_sched_out(event, cpuctx, ctx);
1286                event->state = PERF_EVENT_STATE_OFF;
1287        }
1288
1289        raw_spin_unlock(&ctx->lock);
1290
1291        return 0;
1292}
1293
1294/*
1295 * Disable a event.
1296 *
1297 * If event->ctx is a cloned context, callers must make sure that
1298 * every task struct that event->ctx->task could possibly point to
1299 * remains valid.  This condition is satisifed when called through
1300 * perf_event_for_each_child or perf_event_for_each because they
1301 * hold the top-level event's child_mutex, so any descendant that
1302 * goes to exit will block in sync_child_event.
1303 * When called from perf_pending_event it's OK because event->ctx
1304 * is the current context on this CPU and preemption is disabled,
1305 * hence we can't get into perf_event_task_sched_out for this context.
1306 */
1307void perf_event_disable(struct perf_event *event)
1308{
1309        struct perf_event_context *ctx = event->ctx;
1310        struct task_struct *task = ctx->task;
1311
1312        if (!task) {
1313                /*
1314                 * Disable the event on the cpu that it's on
1315                 */
1316                cpu_function_call(event->cpu, __perf_event_disable, event);
1317                return;
1318        }
1319
1320retry:
1321        if (!task_function_call(task, __perf_event_disable, event))
1322                return;
1323
1324        raw_spin_lock_irq(&ctx->lock);
1325        /*
1326         * If the event is still active, we need to retry the cross-call.
1327         */
1328        if (event->state == PERF_EVENT_STATE_ACTIVE) {
1329                raw_spin_unlock_irq(&ctx->lock);
1330                /*
1331                 * Reload the task pointer, it might have been changed by
1332                 * a concurrent perf_event_context_sched_out().
1333                 */
1334                task = ctx->task;
1335                goto retry;
1336        }
1337
1338        /*
1339         * Since we have the lock this context can't be scheduled
1340         * in, so we can change the state safely.
1341         */
1342        if (event->state == PERF_EVENT_STATE_INACTIVE) {
1343                update_group_times(event);
1344                event->state = PERF_EVENT_STATE_OFF;
1345        }
1346        raw_spin_unlock_irq(&ctx->lock);
1347}
1348EXPORT_SYMBOL_GPL(perf_event_disable);
1349
1350static void perf_set_shadow_time(struct perf_event *event,
1351                                 struct perf_event_context *ctx,
1352                                 u64 tstamp)
1353{
1354        /*
1355         * use the correct time source for the time snapshot
1356         *
1357         * We could get by without this by leveraging the
1358         * fact that to get to this function, the caller
1359         * has most likely already called update_context_time()
1360         * and update_cgrp_time_xx() and thus both timestamp
1361         * are identical (or very close). Given that tstamp is,
1362         * already adjusted for cgroup, we could say that:
1363         *    tstamp - ctx->timestamp
1364         * is equivalent to
1365         *    tstamp - cgrp->timestamp.
1366         *
1367         * Then, in perf_output_read(), the calculation would
1368         * work with no changes because:
1369         * - event is guaranteed scheduled in
1370         * - no scheduled out in between
1371         * - thus the timestamp would be the same
1372         *
1373         * But this is a bit hairy.
1374         *
1375         * So instead, we have an explicit cgroup call to remain
1376         * within the time time source all along. We believe it
1377         * is cleaner and simpler to understand.
1378         */
1379        if (is_cgroup_event(event))
1380                perf_cgroup_set_shadow_time(event, tstamp);
1381        else
1382                event->shadow_ctx_time = tstamp - ctx->timestamp;
1383}
1384
1385#define MAX_INTERRUPTS (~0ULL)
1386
1387static void perf_log_throttle(struct perf_event *event, int enable);
1388
1389static int
1390event_sched_in(struct perf_event *event,
1391                 struct perf_cpu_context *cpuctx,
1392                 struct perf_event_context *ctx)
1393{
1394        u64 tstamp = perf_event_time(event);
1395
1396        if (event->state <= PERF_EVENT_STATE_OFF)
1397                return 0;
1398
1399        event->state = PERF_EVENT_STATE_ACTIVE;
1400        event->oncpu = smp_processor_id();
1401
1402        /*
1403         * Unthrottle events, since we scheduled we might have missed several
1404         * ticks already, also for a heavily scheduling task there is little
1405         * guarantee it'll get a tick in a timely manner.
1406         */
1407        if (unlikely(event->hw.interrupts == MAX_INTERRUPTS)) {
1408                perf_log_throttle(event, 1);
1409                event->hw.interrupts = 0;
1410        }
1411
1412        /*
1413         * The new state must be visible before we turn it on in the hardware:
1414         */
1415        smp_wmb();
1416
1417        if (event->pmu->add(event, PERF_EF_START)) {
1418                event->state = PERF_EVENT_STATE_INACTIVE;
1419                event->oncpu = -1;
1420                return -EAGAIN;
1421        }
1422
1423        event->tstamp_running += tstamp - event->tstamp_stopped;
1424
1425        perf_set_shadow_time(event, ctx, tstamp);
1426
1427        if (!is_software_event(event))
1428                cpuctx->active_oncpu++;
1429        ctx->nr_active++;
1430        if (event->attr.freq && event->attr.sample_freq)
1431                ctx->nr_freq++;
1432
1433        if (event->attr.exclusive)
1434                cpuctx->exclusive = 1;
1435
1436        return 0;
1437}
1438
1439static int
1440group_sched_in(struct perf_event *group_event,
1441               struct perf_cpu_context *cpuctx,
1442               struct perf_event_context *ctx)
1443{
1444        struct perf_event *event, *partial_group = NULL;
1445        struct pmu *pmu = group_event->pmu;
1446        u64 now = ctx->time;
1447        bool simulate = false;
1448
1449        if (group_event->state == PERF_EVENT_STATE_OFF)
1450                return 0;
1451
1452        pmu->start_txn(pmu);
1453
1454        if (event_sched_in(group_event, cpuctx, ctx)) {
1455                pmu->cancel_txn(pmu);
1456                return -EAGAIN;
1457        }
1458
1459        /*
1460         * Schedule in siblings as one group (if any):
1461         */
1462        list_for_each_entry(event, &group_event->sibling_list, group_entry) {
1463                if (event_sched_in(event, cpuctx, ctx)) {
1464                        partial_group = event;
1465                        goto group_error;
1466                }
1467        }
1468
1469        if (!pmu->commit_txn(pmu))
1470                return 0;
1471
1472group_error:
1473        /*
1474         * Groups can be scheduled in as one unit only, so undo any
1475         * partial group before returning:
1476         * The events up to the failed event are scheduled out normally,
1477         * tstamp_stopped will be updated.
1478         *
1479         * The failed events and the remaining siblings need to have
1480         * their timings updated as if they had gone thru event_sched_in()
1481         * and event_sched_out(). This is required to get consistent timings
1482         * across the group. This also takes care of the case where the group
1483         * could never be scheduled by ensuring tstamp_stopped is set to mark
1484         * the time the event was actually stopped, such that time delta
1485         * calculation in update_event_times() is correct.
1486         */
1487        list_for_each_entry(event, &group_event->sibling_list, group_entry) {
1488                if (event == partial_group)
1489                        simulate = true;
1490
1491                if (simulate) {
1492                        event->tstamp_running += now - event->tstamp_stopped;
1493                        event->tstamp_stopped = now;
1494                } else {
1495                        event_sched_out(event, cpuctx, ctx);
1496                }
1497        }
1498        event_sched_out(group_event, cpuctx, ctx);
1499
1500        pmu->cancel_txn(pmu);
1501
1502        return -EAGAIN;
1503}
1504
1505/*
1506 * Work out whether we can put this event group on the CPU now.
1507 */
1508static int group_can_go_on(struct perf_event *event,
1509                           struct perf_cpu_context *cpuctx,
1510                           int can_add_hw)
1511{
1512        /*
1513         * Groups consisting entirely of software events can always go on.
1514         */
1515        if (event->group_flags & PERF_GROUP_SOFTWARE)
1516                return 1;
1517        /*
1518         * If an exclusive group is already on, no other hardware
1519         * events can go on.
1520         */
1521        if (cpuctx->exclusive)
1522                return 0;
1523        /*
1524         * If this group is exclusive and there are already
1525         * events on the CPU, it can't go on.
1526         */
1527        if (event->attr.exclusive && cpuctx->active_oncpu)
1528                return 0;
1529        /*
1530         * Otherwise, try to add it if all previous groups were able
1531         * to go on.
1532         */
1533        return can_add_hw;
1534}
1535
1536static void add_event_to_ctx(struct perf_event *event,
1537                               struct perf_event_context *ctx)
1538{
1539        u64 tstamp = perf_event_time(event);
1540
1541        list_add_event(event, ctx);
1542        perf_group_attach(event);
1543        event->tstamp_enabled = tstamp;
1544        event->tstamp_running = tstamp;
1545        event->tstamp_stopped = tstamp;
1546}
1547
1548static void task_ctx_sched_out(struct perf_event_context *ctx);
1549static void
1550ctx_sched_in(struct perf_event_context *ctx,
1551             struct perf_cpu_context *cpuctx,
1552             enum event_type_t event_type,
1553             struct task_struct *task);
1554
1555static void perf_event_sched_in(struct perf_cpu_context *cpuctx,
1556                                struct perf_event_context *ctx,
1557                                struct task_struct *task)
1558{
1559        cpu_ctx_sched_in(cpuctx, EVENT_PINNED, task);
1560        if (ctx)
1561                ctx_sched_in(ctx, cpuctx, EVENT_PINNED, task);
1562        cpu_ctx_sched_in(cpuctx, EVENT_FLEXIBLE, task);
1563        if (ctx)
1564                ctx_sched_in(ctx, cpuctx, EVENT_FLEXIBLE, task);
1565}
1566
1567/*
1568 * Cross CPU call to install and enable a performance event
1569 *
1570 * Must be called with ctx->mutex held
1571 */
1572static int  __perf_install_in_context(void *info)
1573{
1574        struct perf_event *event = info;
1575        struct perf_event_context *ctx = event->ctx;
1576        struct perf_cpu_context *cpuctx = __get_cpu_context(ctx);
1577        struct perf_event_context *task_ctx = cpuctx->task_ctx;
1578        struct task_struct *task = current;
1579
1580        perf_ctx_lock(cpuctx, task_ctx);
1581        perf_pmu_disable(cpuctx->ctx.pmu);
1582
1583        /*
1584         * If there was an active task_ctx schedule it out.
1585         */
1586        if (task_ctx)
1587                task_ctx_sched_out(task_ctx);
1588
1589        /*
1590         * If the context we're installing events in is not the
1591         * active task_ctx, flip them.
1592         */
1593        if (ctx->task && task_ctx != ctx) {
1594                if (task_ctx)
1595                        raw_spin_unlock(&task_ctx->lock);
1596                raw_spin_lock(&ctx->lock);
1597                task_ctx = ctx;
1598        }
1599
1600        if (task_ctx) {
1601                cpuctx->task_ctx = task_ctx;
1602                task = task_ctx->task;
1603        }
1604
1605        cpu_ctx_sched_out(cpuctx, EVENT_ALL);
1606
1607        update_context_time(ctx);
1608        /*
1609         * update cgrp time only if current cgrp
1610         * matches event->cgrp. Must be done before
1611         * calling add_event_to_ctx()
1612         */
1613        update_cgrp_time_from_event(event);
1614
1615        add_event_to_ctx(event, ctx);
1616
1617        /*
1618         * Schedule everything back in
1619         */
1620        perf_event_sched_in(cpuctx, task_ctx, task);
1621
1622        perf_pmu_enable(cpuctx->ctx.pmu);
1623        perf_ctx_unlock(cpuctx, task_ctx);
1624
1625        return 0;
1626}
1627
1628/*
1629 * Attach a performance event to a context
1630 *
1631 * First we add the event to the list with the hardware enable bit
1632 * in event->hw_config cleared.
1633 *
1634 * If the event is attached to a task which is on a CPU we use a smp
1635 * call to enable it in the task context. The task might have been
1636 * scheduled away, but we check this in the smp call again.
1637 */
1638static void
1639perf_install_in_context(struct perf_event_context *ctx,
1640                        struct perf_event *event,
1641                        int cpu)
1642{
1643        struct task_struct *task = ctx->task;
1644
1645        lockdep_assert_held(&ctx->mutex);
1646
1647        event->ctx = ctx;
1648        e" name="L1641">1641                        int 1639task_ctx != 1639cpuctx->>16501651             struct6pmu->1652             enum <6 href6"+code=event_type_t >
1653             struct6
e sviaout.kernel/evencore.c#L1571" id="L1571" class="line" nam6="L1554">1654
1655static void 
1656                   6     6      struct cpu_funccorr_el/e(cpuctx, task_ctx<="sref">__perf_install_in_context(void *task_ctx<1657                   6     6      struct 1658{
1659        1660        if (ctx_s/co) {
1661                pmu->(cpuctx, href="kernel/events/core.c="sref">task_ctx<="sref">__perf_install_in_context(void *task_ctx<1662        1663        if (1664                ctx_s/code=ctx" cl_irq{
ctx->mutex);
 href="kernel/events/core.c#L1597" id="L1597" class="line" nam6="L1565">1665}
1666

1667/*<6span>
1668 * 6ross CPU call to install and         *core.c#L1638" id="L1638" class="line" name="L1569">1669 *<669puctx" class="sr>ctx->mutex);
is_n>
1670 * 67uct ctx_s/code=ctx" clas_irq{
ctx->mutex);
 href="kernel/events/core.c#L1597" id="L1597" class="line" nam6="L1571">1671 */67 
even="kernes/co, /co) core.c#L1637" id=sk" class="sref"we add the event to the list with the 5- the 3672/e6ents/65vents/core.c#L1599" id="L1599" class="line" nam6="L1573">1573{
1574        6truct61575        6truct67ment">         * events on the CPU, itSit1576        6truct67/ev6nts/c66    */
1577        6truct67men6">/*<6span>
1578        6truct6add_event_to_ctx(event, ctx);
1579
ctx_s/code=ctx" clas_irq{
ctx->mutex);
 href="kernel/events/core.c#L1597" id="L1597" class="line" nam6="L1580">1580        6a hre6="+codnts/core.c#L1599" id="L1599" class="line" nam6="L1581">1581        6a hre68/events/core.c#L1622" id="L1622" class="line" nam6="L1582">1582
 * in event->hw_cornel/events/core.c#L1618" id="L1618" class="line" nam6="L1583">1583        6span 68ment"> *
1584         * If there wa* Econtfind wareeaderan aand thereffeventslyk conte=" elel/events/core.c#L1637" id="L1637" class="line" nam6="L1585">1585         */
1586        6f ( * scheduled away, but wref=" a  if curcheir utex"1587        6     68ment"> */
1588
 * Cross CPU call to inssit1589        6span 68ment"> * Attach a performanced         *core.c#L1638" id="L1638" class="line" nam6="L1590">1590tstamp_enabled = texttstamp+code=perf_event_context" class="srefvent *event,
15911592esubvent *1593        6f ( tstamp = perf_event_time(event);
1594        6     69/events/core.c#L1645" id="L1645" class="line" nam6="L1595">1595        6     69"+code=lockdep_assert_held"         int )
 *)
1596        6     6 tstamp_enabled = tstamp;
1597        6     69"+code=event" class="sref">e hreffor_eache>tven="kernes/co, /c hreffor_eache>tvenvent" class="sref">esubvent *ctx        int ctxref="+>tven="kernes/co, /cref="+>tvenexis_n>
1598        6
)
 *)
1599
esubvent *tstamp_enabled = tstamp;
 *1600        7f (1601        7     7 15921603        7
 *
1604
         * If there wa* tall and enable a event
1605        7a hre70ment">         */
1606
cputext(info)
1607        7a hre7="+cod>
1608        7span 7lass="comment"=perf_event" class="sref">perf_event *event = info;
1609perf_e">perf_event_context *ctx,
event->ctx;
1610perf_event *eeeader="kernes/co, /c eader/event" class="sref">event->ctxref="+eeader="kernes/co, /cref="+eeader/events/core.c#L1576" id="L1576" class7"line" nam7="L1611">1611pref">perf_cpu_context *cpuctx = __get_cpu_context(ctx);
1612cpuerr="kernes/co, /cerr/events/core.c#L1576" id="L1576" class7"line" nam7="L1613">1613        7a hre71ref6"+cod6=ctx" 1614" id="L1614" class7"line" nam7="L1614">1614
pmu->mutex);
is_n>
1615        7a hre71        mEINVA_ALL);
1616
1617        7span 71"+code=event" class="sref">e"sref">raw_spin_lock(&ctx->lock);
1618update_context_time(ctx);
16191620        7a hre72ref="+code=task_ctx" class="sref        int )
 *)
1621
 */67 perf_ctx_unlock(1622        7a hre72/events/core.c#L1583" id="L1583" class7"line" nam7="L1623">1623        7a hre72ass="comment">/*
1624
         * If there was an activset1625        7eturn72ment">         */
1626}
ctx;
ctx);
1627
1628tstamp_enabled = texttstamp+code class="sref">event);
16291630pmuref="+filter_p. Mu/a>);
event);
1631 */67 );
event);
1632tstamp_enabled = *tstamp+code class="sref">event);
1633perf_ctx_unlock(163416351636/*
1637 */
1638static v7id
         * Schedule everything ba hna hr1639         */
1640        7     74ref="+code=task_ctx" class="srefeeader="kernes/co, /c eader/even" class="sref">ctxvent = ctxa>)
 *)
1641        7     7         int perf_ctx_unlock(1642{
1643        7truct74ref="+code=ctx" c" class="sr">pmuref="+can_go_oevent_sched_inevent);
cpuctx, 1644
mEEXISTALL);
1645        7a hre7="+code=lockde} elsen>
1646
ctxeeader="kernes/co, /c eader/events/core.c#_i href8man't go on7"line" nam7="L1647">1647        7a hre74   6     6      struce=ctx_sched_in" class="err="kernes/co, /cerr/eve =v class="sr">pmuref="+">perf_event_sched_inperf_e+code class="sref">event);
cpuctx, ctx);
1648        7" nam74f="kernel/eve> *<669pelsets/core.c#L1616" id="L1616" class7"line" nam7href="kernel"sref">task_c7x7!= pmukerne+">perf_event_sched_inperf_e+code class="sref">event);
cpuctx, ctx);
16501651        7    s75/events/core.c#L1622" id="L1622" class7"line" nam7="L1552">1652        7    e7um <6 href6"+csk_ctx" class="sref rr="kernes/co, /cerr/eve_n>
1653        7    s75uct /*
1654
1655static v7id 
1656        7     75/ev6nts/c66    */
1657        7     7    6     6      strucsk_ctx" class="srefeeader="kernes/co, /c eader/even" class="sref">ctxvent = 1658{
 *<669pe=ctx_sched_in" class="ref="+">perf_ctx_sched_outref="+">perf_ct+code class="sref">eeeader="kernes/co, /c eader/evetx" class="sref">cpuctx, ctx);
1659        7a hre75= pmu = *innmp/eve_n>
1660        7f ((eeeader="kernes/co, /c eader/eveents/core.c#L1616" id="L1616" class7"line" nam7="L1561">1661        7     76        int ctxa>)
 *)

1662        7a hre7="+c6de=cp66a href="kents/core.c#L1599" id="L1599" class7"line" nam7="L1563">1663        7f (1664        7     76/events/core.c#L1645" id="L1645" class7"line" nam7="L1565">1665}
perf_ctx_unlock(1666
raw_spin_unlock(&lock);
16671668166916701671 * First we add the ernel/events/core.c#L1584" id="L1584" class7he event t7 the list with the 5-7the 377ment"> * in event->hw_confiEvent1573{
 *
1574        7truct77ment"> * If the event is attachedid="Lne beftxef=" f tonmp agfind ,enablerssmpan>make surest   el/events/core.c#L1634" id="L1634" class7"line" nam7="L1575">1575        7truct77ment">         * events on t*span>
sk mig=perf_et    id="Lne beftxutex"< mightuld possinty=poirne ael/events/core.c#L1634" id="L1634" class7"line" nam7="L1576">1576        7truct77/ev6nts/c66    */
1577        7truct77men6">/*<6span>
1578        7truct77ment"> * Cross CPU call to insfor xt1579
 * Attach a performanced         *core.c#L1638" id="L1638" class7"line" nam7="L1580">1580        7a hre7="+coderf_event_sched_in" xt(event,
1581        7a hre78l/events/core.c#L1512" id="L1512" class7"line" nam7="L1582">1582
perf_event_context *ctx,
event->ctx;
1583        7span 78a href="+code=task_struct" class="sref">task_struct *task = ctx->task;
15841585pmu->1586        7f (1587        7     78ment"> */
1588
 * Cross CPU call to ieeeeeeeeeeeeeeeefd         *core.c#L1638" id="L1638" class7"line" nam7="L1589">1589        7span 78= cpu_funccorr_el/e(vent->ctx, task_ref="+perf_pmu_enable(task_ctx<1590159115921593        7f (ctx_s/code=ctx" cl_irq{
ctx->mutex);
 href="kernel/events/core.c#L1597" id="L1597" class7"line" nam7="L1594">1594        7     79a href="+codeuctx" class="sr>ctxvent->ctxkerndvent *)
 *)
1595        7     79        _ctx_sched_out_ct+codnts/core.c#L1597" id="L1597" class7"line" nam7="L1596">1596        7     79/events/core.c#L1617" id="L1617" class7"line" nam7="L1597">1597        7     79ass="comment">/*
1598        7
         * Schedule everything bhed to a task whinaerror sernd, ef="k t    f to s/co, /co) core.c#L1637" id="L1637" class7"line" nam7="L1599">1599
         * update cgrp time onlyT      in il/evese1600        8f (         * matches event->cgrknow t    itrhaseghref=="kern a error sernd, tandistinc el/events/core.c#L1634" id="L1634" class8"line" nam8="L1601">1601        8     80ment">         * calling add_event_to_f="+s task mighav hrefeenwe check this if="kerns tael/events/core.c#L1634" id="L1634" class8"2ine" nam8="L1592">1592         */
1603        8
 *
1604
ctxkerndvent *ctxa>)
 *)
1605        8a hre80        ctxkerndvent *ctxa>)
 *)
1606
1607        8a hre8="+cod_cgrp_time_fromsref">ctx_s/co) {
1608        8span 8lass="comment"uctx" class="sr">pmu->mutex);
is_n>
1609tstamp_enabled = texttstamp+code class="sref">event);
1610_ctx_sched_out_ct+codnts/core.c#L1597" id="L1597" class8"line" nam8="L1611">161116121613        8a hre81"+code=update_cgrp_time_fromsref">ctx_s/code=ctx" clas_irq{
ctx->mutex);
 href="kernel/events/core.c#L1597" id="L1597" class8"line" nam8="L1614">1614
1615        8a hre81"+code=lockdeuctx" class="sr">pmu->(cpuctx, href="kernel/events/core.c="sref">task_ref="+perf_pmu_enable(task_ctx<1616
1617        8span 81/events/core.c#L1628" id="L1628" class8"line" nam8="L1618">1618ctx_s/code=ctx" cl_irq{
ctx->mutex);
 href="kernel/events/core.c#L1597" id="L1597" class8"line" nam8="L1619">16191620        8a hre82ref="+code=ta>/*
1621
         * calling add_event_to_hed to agfind  f=" vents andd to a task whstiaouoff,el/events/core.c#L1584" id="L1584" class8"line" nam8="L1622">1622        8a hre82ment">         */
1623        8a hre82ment"> *
1624
mutex);
is_n>
ctxkerndvent *ctxa>)
 *)

1625        8eturn82        
1626}
1627
 */
perf_ct()/e/events/core.c#L1618" id="L1618" class8"line" nam8="L1628">1628 * Cross CPU call to ieeeeeeeeeeeeeeeefd         *core.c#L1638" id="L1638" class8"line" nam8="L1629">1629 = ctx->task;
1630
even="kernes/co, /co) core.c#L1637" id=sk" class="sref"we add 8"line" nam8="L1631">163116321633_ctx_sched_out_ct+codrn/co)  claL1473" id="L1473" class8"line" nam8="L1634">1634ctx_s/code=ctx" clas_irq{
ctx->mutex);
 href="kernel/events/core.c#L1597" id="L1597" class8"line" nam8="L1635">16351636mEXPORkeSYMBOL_GP_ALL);
xt(16371638static v8id
cpuxt);
event,
cpu="sresu/a>);
1639
1640        8     84ref="+code=ta>/*
1641        8     84ment">         * calling add_event_to_not supportask hefnheritaskid="L1el/events/core.c#L1618" id="L1618" class8"line" nam8="L1642">1642{
         */
1643        8truct84ref="+code=ctx" ctx" class="srefvent->ctxattr="kernes/co, /cattr/eveclass="sref">pmufnherit;
is_n>
pmu+coss_ilfin_vent->event);
1644
mEINVA_ALL);
1645        8a hre84ment"ts/core.c#L1599" id="L1599" class8"line" nam8="L1646">1646
 = atomic_adp+code class="sref">e="sresu/a>);
ctx        int 
1647        8a hre84"+code=event" class="sref">ext(event);
1648        8" nam84f="kets/core.c#L1540" id="L1540" class8"line" nam8href="kernel"sref">task_c8x8!= 16501651        8    s85/even class="sref">mEXPORkeSYMBOL_GP_ALL);
xt);
1652        8    e85/events/core.c#L1583" id="L1583" class8"line" nam8="L1553">1653        8    s85uct <+code=perf_event_sched_in" +co+">perf_ctx_sched_out+co+">perf_ctvent"=perf_event_context" class="sref">perf_event_context *ctx,
1654
pref">perf_cpu_context *cpuctx = 1655static v8id pmukerne+type_t;
is_n>
pmukerne+type;
is_n>
1656        8     85/ev6n>
1657        8     8    6     6   =perf_event_context" class="srefvent *event,
1658{
cpuutex);
is_n>
ctx->tautex);
is_n>
1659        8a hre85"+c6de=cp65e.c#L1600" id="L1600" class8"line" nam8="L1560">1660        8f (mutex);
is_n>
pmukerne+type;
is_n>
1661        8     86        int pmu->mnr+code=s_context_time
1662        8a hre8="+c6de=cp66a href="kernel/events/core.L1614" id="L1614" class8"line" nam8="L1563">1663        8f (1664        8     86a href="+code_cgrp_time_fromclass="sref">update_context_time(ctx);
1665}
( = (ctx = 1666
pmu->mnr+x);
is_n>
166716681669ctx);
mpmuvent *1670event<+type;
is_n>

1671tvenvent" class="sref">event,
ctx->m*innmphref="s_context_timetven="kernes/co, /cref="+>tvenexis_

-8the 387"+c6de=cp66a href="keef="+codp_assert_held" ref="+">perf_ctx_sched_outref="+">perf_ct+code class="sref">event,
cpuctx = ctx);
1573{
1574        8truct87/events/core.c#L1645" id="L1645" class8"line" nam8="L1575">1575        8truct87"+code=lockdeuctxctx" class="sref+cox);
is_n>
event<+type;
is_n>

1576        8truct87   6     6      structx" class="srefeireffor_eache>tven="kernes/co, /c hreffor_eache>tvenvent" class="sref">event,
ctx->mflexie=chref="s_context_timetven="kernes/co, /cref="+>tvenexis_
1577        8truct87   6     6      struce=ctx_sched_in" class="ref="+">perf_ctx_sched_outref="+">perf_ct+code class="sref">event,
cpuctx = ctx);
1578        8truct878="kernel/events/core.c#L1604" id="L1604" class8"line" nam8="L1579">1579
ctx);
mpmuvent *1580        8a hre88"+codnts/core.c#L1599" id="L1599" class8"line" nam8="L1581">1581        8a hre88/events/core.c#L1622" id="L1622" class8"line" nam8="L1582">1582
         */
1583        8span 88ment"> *
1584 * If the event is attacref="foth"feenw tonmp f="+s tassspa vers+ heofs tassspa "+code=cp/events/core.c#L1618" id="L1618" class8"line" nam8="L1585">1585         * events on t*sandd toy"foth"ref=" tassspa number ofs>tstampkid="L1nel/events/core.c#L1633" id="L1633" class8"line" nam8="L1586">1586        8f (
tstampkid="L1k wh tassspa,ba hnaa hcse=cp/events/core.c#L1618" id="L1618" class8"line" nam8="L1587">1587        8     88ment"> */
1588
 * Cross CPU call to i*efnheritaskagfind s,ba hr"kernswe can1589        8span 88ment"> * Attach a performancekinaa hm directly with" Atfd;swe can only >tstam/+code=c _func/events/core.c#L1618" id="L1618" class8"line" nam8="L1590">1590         * matches eve*kid="L1kvia prctl, or >tstam/+code=c _fukid="L1k naanfamilyel/events/core.c#L1618" id="L1618" class8"line" nam8="L1591">1591         * calling add*kvia ioctl, which wifukref=" tassspa effectk hefoth"agfind snel/events/core.c#L1633" id="L1633" class8"line" nam8="L1592">1592 * in event->hw_confd         *core.c#L1638" id="L1638" class8"line" nam8="L1593">1593        8f (cpuref="+coequiv>);
perf_event_context *ctx);
1594        8     89perf_event_context *ctx);
1595        8     89     >
1596        8     89   6     6   rnel/evlass="sref">ctx);
mparref="/a>);
);
mparref="/a>);
ctx);
mparref="/a>);
1597        8     89   6     6      struccode=code=ep_assert_held" );
mparref=geevent_sched_inctx);
mparref=geevent_sched_in1598        8
pmu);
mpin="+uefvent *pmu);
mpin="+uefvent *1599
1600        9f (1601        9     90ment"+code=perf_event_sched_in" text *event,
1592en"+coesrefvent *1603        9

1604
16 href=a6a href_cgrp_time_fromvalupmu_enable(1605        9a hre90ment"ts/core.c#L1599" id="L1599" class9"line" nam9="L1606">1606
pmuvent->ctxattr="kernes/co, /cattr/eveclass="sref">pmufnherit_+codvent *1597        9a hre90   6     6      strucrnel/events/core.L1614" id="L1614" class9"line" nam9="L1608">1608        9span 90f="kets/core.c#L1540" id="L1540" class9"line" nam9="L1609">16091610         * matches event->cgrU>(1611         * calling add_event_to_becausehwe1612         */
1613        9a hre91ment"> *
1614
1615        9a hre91ref6"+cod65    */
1616
ctxkerndvent *
1617        9span 91   6     6   casehlass="sref">ctxa>)
 *)
1618 *<669p" class="sr>ctxvent->ctxpmuvent *ctx="advent *event,
16191620        9a hre92tx_6ched_65e.c#L1541" id="L1541" class9"line" nam9="L1621">1621
ctxa>)
 *)
1622        9a hre92"+c6de=cp66a href="ke_cgrp_time_fromc>(event,
1623        9a hre92uct 1624
1625        9eturn92        1626}
1627
162816291630         * matches event->cgrIn order to keephxt<-k mig=paL1krelide=c eveneask wgflip t o a tasel/events/core.c#L1618" id="L1618" class9"line" nam9="L1631">1631         * calling add_event_to_valups w hnaeveflip t o agfind snel/events/core.c#L1633" id="L1633" class9"line" nam9="L1632">1632         */
1633(ctxloe_f64_="advent *ctxn"+coesrefvent *ctx<+uefvent *1634(ctxloe_f64_xchgvent *ctxvent->ctx<+uefvent *ctxvalupmu_enable(1635 *ctxn"+coesrefvent *ctx<+uefvent *ctxvalupmu_enable(16361637eswapvent *event,
tasotal+de=c_>tstamp_enabled = sotal+de=c_>tstampvent,_lass="sref">ctxn"+coesrefvent *ctxsotal+de=c_>tstamp_enabled = sotal+de=c_>tstampventents/core.c#L1608" id="L1608" class9"line" nam9="L1638">1638static v9id
 *event,
tasotal+de=c_runningvent *ctxn"+coesrefvent *ctxsotal+de=c_runningvent *16391640        9     94ref="+code=ta>/*
1641        9     94ment">         * calling add_event_to_Sincc eveswizz thethe_valups, u>(1642{
         */
1643        9truct94"+code=update_cgrp_time_fromxt((event,
1644
((en"+coesrefvent *1645        9a hre94ment"nts/core.c#L1604" id="L1604" class9"line" nam9="L1646">1646
1647        9a hre94"+cod#def7epos_context_time1648        9" nam94a href="+codeent_to_ctx" cla hrefetven="kernes/co, /c hrefetven+code class="sref">epos_context_timectxmember_context_timepmunf_event_contextepos_context_timetask_c9x94"+c6de=cp65e.c#L1600" id="L1600" class9"line" nam9="L1550">1650perf_event_context *ctx,
1651        9    s95        int perf_event_context *ctxn"+co,
1652        9    e95/even>
1653        9    s95a href="+code=task_struct" class="slass="srefvent *event,
en"+coesrefvent *1654
1655static v9id pmu->mnr++codvent *1656        9     95   6     6      strucrnel/events/core.L1614" id="L1614" class9"line" nam9="L1557">1657        9     95/events/core.c#L1628" id="L1628" class9"line" nam9="L1648">1658{
update_context_time(ctx);
1659        9a hre95"+c6de=cp65e.c#L1600" id="L1600" class9"line" nam9="L1560">1660        9f (ctxlhreff to e>tven="kernes/co, /c hreff to e>tvencpodeas_irqass="sref">ctx->m href= hre/a>,
1661        9     96        int tase>tven="kernes/co, /c">tase>tvenl/events/core.c#L1608" id="L1608" class9
1662        9a hre96/events/core.c#L1583" id="L1583" class9"line" nam9="L1563">1663        9f ( *ctxlhreff to e>tven="kernes/co, /c hreff to e>tvencpodeas_irqass="sref">ctxn"+co,
m href= hre/a>,
1664        9     96a href="+codeint tase>tven="kernes/co, /c">tase>tvenl/events/core.c#L1608" id="L1608" class91665}
1666
ctxvent->ctx">tase>tven="kernes/co, /c">tase>tvenl/ev !=eas_irqass="sref">ctx->m href= hre/a>,
1667ctxn"+coesrefvent *ctx">tase>tven="kernes/co, /c">tase>tvenl/ev !=eas_irqass="sref">ctxn"+co,
m href= hre/a>,
16681669event,
en"+coesrefvent *16701671ctxlhrefn"+coetven="kernes/co, /c hrefn"+coetven+code class="sref">event,
e">tase>tven="kernes/co, /c">tase>tvenl/events/core.c#L1608" id="L1608" class9"/span>
-9the 397"+c6de=cp66a href="ke_cgrp_time_fromn"+coesrefvent *ctxlhrefn"+coetven="kernes/co, /c hrefn"+coetven+code class="sref">en"+coesrefvent *e">tase>tven="kernes/co, /c">tase>tvenl/events/core.c#L1608" id="L1608" class9"line" nam9="L1573">1573{
1574        9truct97/evennts/core.c#L1604" id="L1604" class9"line" nam9="L1575">1575        9truct97ment"ts/core.c#L1599" id="L1599" class9"line" nam9="L1576">1576        9truct97   6 +code=perf_event_sched_in" xtperf_ctvent_context *perf_ctvent"=perf_event_context" c( *ecpuctx, href="kernel/evenu" class="sref">cpurtxevent_sched_in1577        9truct97   6     6      struce=ctx_sc"""""""""""""""""=perf_event_context" c( *enf_event_context1578        9truct978="ke>
1579
perf_event_context *ctx,
ctxcpuctx, href="kernel/evtx" class="sref">ctxp *cpurtxevent_sched_in1580        9a hre980+code=lockde=perf_event_context" class="sref">perf_event_context *ctxn"+co,
1581        9a hre981+code=lockde=perf_event_context" class="sref">perf_event_context *ctxparrefvent_contextarrefexisnts/core.c#L1608" id="L1608" class9"line" nam9="L1582">1582
perf_cpu_context *cpuctx = 1583        9span 98ref="+code=ctx" class="sref">cpudo_switch = 15841585ctxlhkeln="kernes/co, /c hkelnvent"" class="sr">pmu->1586        9f (1587        9     98/events/core.c#L1628" id="L1628" class9"line" nam9="L1588">1588
 = ctx__get=ref">perf_cpu_context __get=ref">perf_ctx" class="sref">ctx);
1589        9span 989+code=lockdeuctx" class="sr">pmu = task,
1590159115921593        9f (arrefexiso class="sref">ctxrcu_dhr"khr"nce_context_timectx);
mparref="/a>);
1594        9     99ctxn"+co,
ctxnf_event_contextctxp *cpurtxevent_sched_in1595        9     99"+code=lockdeuctxlass="sref">ctxxarrefvent_contextarrefexisocode=code=ep_assert_held" n"+co,
1596        9     99   6     6      slass="sref">ctxrcu_dhr"khr"nce_context_timectxn"+co,
mparref="/a>);
ctxxarrefvent_contextarrefexis_n>
1597        9     99   6     6      struc>/*
1598        9
 * Cross CPU call to ieeeeeeeeeeeeeeeef Looks  hked to two agfind s are  tonms, so evemighn>beel/events/core.c#L1618" id="L1618" class9"line" nam9="L1599">1599
 * Attach a performanceeeeeeeeeeeeeeeef de=c to optimize t o agfind  switch.  We utex fothcp/events/core.c#L1618" id="L1618" clas20"line" na20"lin599">1599
20"lent"> * Attach a performanceeeeeeeeeeeeeeeef agfind s and cheex thatd toy"are  tonms under thecp/events/pre>
e" n2f/fe/0d30748 99"1eb15791d46038cb3275b2af5_3/20"li>s/core.c#L1618" id="L1618" clas20"1ine" na20""L1591">159120"ment">         * calling add_event_teeeeeeeef utex (includingern-cheexingethatdneither has"feencp/events/core.c#L1618" id="L1618" clas20"2ine" na20""L1592">159220"ment">         */
1593       20""L>20"ment"> *
1594       20""L>20"/ev6nts/c65    * If there was an acteeeeeeeef beh ryingeto utex fotheofs taseh k1595       20""L>20"ref6"+cod65    */
1596       20""L>20"   6     6      structx" class="sref href="keutex);
 href="krhref="keutexcpodeas_irqass="sref">ctx->mutex);
 href="kernel/events/core.c#L1597" id="L1597" clas20"7ine" na20""L1597">1597       20""L>20"   6     6      struc>x" class="sref href="keutex_nmstmp_enabled =  href="keutex_nmstmpcpodeas_irqass="sref">ctxn"+co,
mutex);
 href="kernel/ev,e class="sref">eSINGLE_DEPTH_NESTING);
 href="kSINGLE_DEPTH_NESTINGl/events/core.c#L1597" id="L1597" clas20"8ine" na20""L1598">1598       20""L>20"f="kernel/eve> *<669puctxlass="sref">ctxref="+coequiv>);
ctx->en"+co,

1599
20"= /*
1610
1611         * calling add_event_teeeeeeeeeeeeeeeef wrteto rcu_dhr"khr"nce() ofsp *1612         */
1613       20="L>20=uct x" class="srefcpuctx, href="kernel/evtx" class="sref">ctxp *cpurtxevent_sched_inctxnf_eo,
1614
ctxnf_event_contextctxp *cpurtxevent_sched_inctx->1615       20="L>20=        ctx->mcpuctx, href="kernel/evo class="sref">ctxnf_event_context1616
ctxnf_eo,
mcpuctx, href="kernel/evo class="sref">ctxcpuctx, href="kernel/evnts/core.c#L1608" id="L1608" clas20=7ine" na20="L1617">1617       20="L>20=   6     6      struce=ctx_sched_in" class="do_switch = 16181619ctxp * *ctx->en"+co,
1620       20="L>20=" 1621
);
 href="krhref="keunutexcpodeas_irqass="sref">ctxn"+co,
mutex);
 href="kernel/ev_nts/core.c#L1626" id="L1626" clas2022ine" na20="L1622">1622       20="L>20="+c6de=cp66a href="ke_cgrp_time_from href="keunutex);
 href="krhref="keunutexcpodeas_irqass="sref">ctx->mutex);
 href="kernel/events/core.c#L1597" id="L1597" clas2023ine" na20="L1623">1623       20="L>20=f="kernel/events/core.c#L1604" id="L1604" clas20=4ine" na20="L1624">1624
ctxrcu_="ad_unutex);
 href="krcu_="ad_unutextx" cents/core.c#L1608" id="L1608" clas20=5ine" na20="L1625">1625       20="L>20=ment"ts/core.c#L1599" id="L1599" clas20=6ine" na20="L1626">1626}
1627
);
 href="krhref="keutexcpodeas_irqass="sref">ctx->mutex);
 href="kernel/events/core.c#L1597" id="L1597" clas2028ine" na20="L1628">1628 *<669p" class="sr>ctx+co+">perf_ctvent_contextperf_ctvent"qass="sref">ctx->ecpuctx = ctxef="keALL = 1629 = task,
ctxNULL = 1630);
 href="krhref="keunutexcpodeas_irqass="sref">ctx->mutex);
 href="kernel/events/core.c#L1597" id="L1597" clas2031ine" na20="L1631">1631163216331634ctx1635ctxr/aevent_sched_inctxr/aevent_sched_in16361637 */
1638static 20="L>20=ment"> * Cross CPU call to i*eCallmp f="+s">peruler to remov d to a tasseofs tas kernel sk1639 * Attach a performancekwith"if="rrupsse+code=cdnel/events/core.c#L1633" id="L1633" clas204line" na20="L1640">1640       20="L>20="ent"> * Attach a performanceel/events/core.c#L1633" id="L1633" clas2041ine" na20="L1641">1641       20="L>20=ment">         * calling add*kWe stop each a taskand u>(1642{
 * in event->hw_confel/events/core.c#L1633" id="L1633" clas2043ine" na20="L1643">1643       20="L>20=ment"> *
1644
 * If the event is attacseL1k to +code=cd bit inaa h  task_b"kern_/e/events/core.c#L1618" id="L1618" clas20=5ine" na20="L1645">1645       20="L>20=ment">         * events on t*saccessingetho a task1646
1647       20="L>20=ment"> */
1648       20="L>20=ment"erf_event_sched_in" textperf_ctvent_context *ecpuctx, href="kernel/eve  *core.c#L1638" id="L1638" clas2049ine" na20href="kernel"sref">task_20hre>20==  *enf_event_context1650
1651       20="L>20=1="kernel/eveu" class="sref">cpurtxevent_sched_in1652       20="L>20=/events/core.c#L1583" id="L1583" clas20=3ine" na20="L1553">1653       20="L>20="+code=update_cgrp_time_fromfor_eacheskctx1654
ctxp *perf_ctvent_context *perf_ctvent" class="sref">ecpuctx, href="kernel/eveclass="sref">cpurtxevent_sched_inctxnf_event_context1655static 20="L>20=ment"ts/core.c#L1599" id="L1599" clas2056ine" na20="L1556">1656       20="L>20=1657       20="L>20=ment"> */
1658{
 * Cross CPU call to ieeeeeeee* to cheex ucteveref=" o switchu_ct PMUg=paLenel/events/core.c#L1633" id="L1633" clas2059ine" na20="L1559">1659       20="L>20=ment"> * Attach a performanceeeeeeee*tcgroup a tas"are sys="m-wide m>ct onlyel/events/core.c#L1633" id="L1633" clas206line" na20="L1560">1660       20="L>20="ent"> * Attach a performanceeeeeeee*d         *core.c#L1638" id="L1638" clas2061ine" na20="L1561">1661       20="L>20=1="kernel/eveuctxhed_in" class="atomic_="advent *ctx__get=ref"var_context_timee*1662       20="L>20="+c6de=cp66a href="ke_cgrp_time_from*tperf_ctvent_context *perf_ctvent" class="sref">ecpuctx, href="kernel/eveclass="sref">cpunf_event_context1663       20="L>20=3+c6dnts/core.c#L1604" id="L1604" clas2064ine" na20="L1554">1664       20="L>20=/events/core.c#L1645" id="L1645" clas20=5ine" na20="L1565">1665}
perf_ctvent_contextperf_ctvent"=perf_event_context" class="sref">perf_event_context *ctx,
1666

1667perf_cpu_context *cpuctx = ctx__get=ref">perf_cpu_context __get=ref">perf_ctx" class="sref">ctx);
16681669pmu = task,
1670167120 th>20=2="kernel/eveuctxhed_in" class="WARN_ON_ONCE>,
ctx);
pmu = task,
1573{
1574       20="L>20=/events/core.c#L1645" id="L1645" clas2075ine" na20="L1575">1575       20="L>20="+code=lockdep_assert_held" +co+">perf_ctvent_contextperf_ctvent"qass="sref">ctx->ecpuctx = ctxef="keALL = 1576       20="L>20=6+code=lockdep_assert_held" +puctx = task,
ctxNULL = 1577       20="L>20=7+c6dnts/core.c#L1604" id="L1604" clas2078ine" na20="L1578">1578       20="L>20=f="kets/core.c#L1540" id="L1540" clas2079ine" na20="L1579">1579
 * Attach a performanrnel/events/core.c#L1618" id="L1618" clas208line" na20="L1580">1580       20="L>20="ent"> * Cross CPU call to i*eCallmp with"IRQ1 +code=cdel/events/core.c#L1618" id="L1618" clas2081ine" na20="L1581">1581       20="L>20=ment">         * calling add*d         *core.c#L1638" id="L1638" clas2082ine" na20="L1582">1582
co+">perf_ctvent_contextco+">perf_ctvent"=perf_event_context" class=ref">perf_cpu_context *cpuctx = 1583       20="L>20=uct e">tasesype_e/a>,
e">tasesype/a>,
1584
1585perf_ctvent_contextperf_ctvent"as_irqass="sref">ctx = ta->ecpuctx = ctx">tasesype/a>,
1586       20="L>20=6+c6dnts/core.c#L1604" id="L1604" clas2087ine" na20="L1587">1587       20="L>20=/events/core.c#L1628" id="L1628" clas20=8ine" na20="L1588">1588
1589       20="L>20=ment">_assert_held" +co+pinnerf">perfievent_sched_inperfievent"=perf_event_context" class="sref">perf_event_context *ctx,
1590perf_cpu_context *cpuctx = 1591
1592 *id="Lvent_context1593       20="L>20=ref6"+cod6=ctx" 1614" id="L1614" clas2094ine" na20="L1594">1594       20="L>20=ctx hreffor_eacheetven="kernes/co, /c hreffor_eacheetvenvent"qass="sref">ctxid="Lvent_contextctx->mpinnerfgroups_context_timectxgroupa tven="kernes/co, /cgroupa tven/eve)e>
1595       20="L>20=        m=paLevent_contextctxa>)
)
1596       20="L>20=   6     6      strucref="""""+coinuents/core.c#L1608" id="L1608" clas2097ine" na20="L1597">1597       20="L>20=   6     6      strucuctx" class="sr">pmu href=filter_match = ctxid="Lvent_context1598       20="L>20=f="kernel/eve> *<669pref="""""+coinuents/core.c#L1608" id="L1608" clas2099ine" na20="L1599">1599
1599
210"+c6de=cp66a href="ke_ * Attach a performanrn mayeneask wgreset t=pamp_>tstampd*d         *core.c#L1638" id="L1638" clas21"1ine" na21""L1591">1591210        int ctxid="Lvent_context1592210"+c6de=cp66a href="keef="+codlass="sref">ctx> *tstamp_enabled = > *tstampvent"qass="sref">ctxid="Lvent_contextctx);
1593       21""L>210ref6"+cod6=ctx" 1614" id="L1614" clas21"4ine" na21""L1594">1594       21""L>210a href="+codeint ctxid="Lvent_contextctx = 1595       21""L>210        ctxgroupa">perfievent_sched_inperfievent"qass="sref">ctxid="Lvent_contextctx = ctx);
1596       21""L>210/events/core.c#L1617" id="L1617" clas21"7ine" na21""L1597">1597       21""L>21"   6     6      struc> * Attach a performanrnel/events/core.c#L1618" id="L1618" clas21"8ine" na21""L1598">1598       21""L>210ment"> * Cross CPU call to ieeeeeeeeeeeeeeeef Ifaa is *inner group hasrperuled,el/events/core.c#L1618" id="L1618" clas21"9ine" na21""L1599">1599
210ment"> * Attach a performanceeeeeeeeeeeeeeeef put it inaerrorg=paLenel/events/core.c#L1633" id="L1633" clas211line" na21="L1610">1610
1611m=paLevent_contextctxa>)
,

1612ctxa>((ctxid="Lvent_context1613       21="L>21=uct x" class="srefid="Lvent_contextm=paLevent_contextctxa>)
,
1614
1615       21="L>21=        1616
1617       21="L>211/events/core.c#L1628" id="L1628" clas21=8ine" na21="L1618">16181619_assert_held" +co+flexintef">perfievent_sched_inperfievent"=perf_event_context" class="sref">perf_event_context *ctx,
1620       21="L>21=" perf_cpu_context *cpuctx = 1621

1622       21="L>2122+code=lockde=perf_event_context" class=id="Lvent_context *id="Lvent_context1623       21="L>212ref="+code=ctx" class="sref">cpucan_add_hw = 1624
1625       21="L>212"+code=lockdep_assert_held"  hreffor_eacheetven="kernes/co, /c hreffor_eacheetvenvent"qass="sref">ctxid="Lvent_contextctx->mflexintefgroups_context_timectxgroupa tven="kernes/co, /cgroupa tven/eve)e>
1626}
1627
m=paLevent_contextctxa>)
)
1628 *<669ppppppppp"+coinuents/core.c#L1608" id="L1608" clas2129ine" na21="L1629">16291630 * Attach a performanceeeeeeeeeeeeeeeef Lis="nk wgtho perulingefilterp"+c=peaiefcp/events/core.c#L1618" id="L1618" clas2131ine" na21="L1631">1631         * calling add_event_teeeeeeeef ofs> tass:cp/events/core.c#L1618" id="L1618" clas2132ine" na21="L1632">1632         */
1633pmu href=filter_match = ctxid="Lvent_context1634163516361637ctxid="Lvent_context1638static 21="L>213f="kernel/eve> *<669ppppppppplass="sref">ctx> *tstamp_enabled = > *tstampvent"qass="sref">ctxid="Lvent_contextctx);
16391640       21="L>214" ctxid="Lvent_contextctx = cpucan_add_hw = 1641       21="L>214        int perfievent_sched_inperfievent"qass="sref">ctxid="Lvent_contextctx = ctx);
1642{
ctxcan_add_hw = 1643       21="L>214uct 1644
1645       21="L>21=ment"nts/core.c#L1604" id="L1604" clas21=6ine" na21="L1646">1646
1647       21="L>21=ment"+code=perf_ts/core.c#L1628" id="L1628" clas2148ine" na21="L1648">1648       21="L>21=ment">_assert_held" +co+">perfievent_sched_inperfievent"=perf_event_context" class="sref">perf_event_context *ctx,
task_21hre>21== perf_cpu_context *cpuctx = 1650e">tasesype_e/a>,
e">tasesype/a>,
1651       21="L>215        int  *ecpuctx, href="kernel/ev_ts/core.c#L1617" id="L1617" clas2152ine" na21="L1552">1652       21="L>21=/even>
1653       21="L>21="+code=update_cgrp_time_fromu="L1554">16timecpunow = 1654
cpuisaactive/a>,
ctx->misaactive/a>,
1655static 21="L>21=ment"ts/core.c#L1599" id="L1599" clas2156ine" na21="L1556">1656       21="L>2156+code=lockdep_assert_held" +/a>->misaactive/a>,
ctx">tasesype/a>,
1657       21="L>215   6     6   uctxlass="sref">ctxlhkeln="kernes/co, /c hkelnvent"" class="sr">pmu->mnra hrefs_context_time1658{
 *<669prnel/events/core.L1614" id="L1614" clas2159ine" na21="L1559">1659       21="L>215"+c6de=cp65e.c#L1600" id="L1600" clas216line" na21="L1560">1660       21="L>2160+code=lockdep_assert_held" now = ctx*);
 href="k*1661       21="L>21=1="kernel/eve class="sr">pmu->mde=cspamptx, href="kee=cspampcpuc =class="sref">ctxnow = 1662       21="L>2162 href="+codeent_to_ctx" cla> *, href="k> *ctxcpuctx, href="kernel/eveclass="sref">cpurtx>);
1663       21="L>216"+code=update_ * Attach a performanrnel/events/core.c#L1618" id="L1618" clas2164ine" na21="L1554">1664       21="L>216/ev6nts/c65    * If there was an act* First gwgthroughd to uis=kand put onkany *inner group1el/events/core.c#L1618" id="L1618" clas21=5ine" na21="L1565">1665}

1666
1667ctxid="Lesype/a>,
1668 *<669p" class="sr>ctx+co+pinnerf">perfievent_sched_inperfievent"lass="sref">ctx,
ctx = 166916701671ctxid="Lesype/a>,
21 th>217"+c6de=cp66a href="ke_cgrp_time_from+co+flexintef">perfievent_sched_inperfievent"lass="sref">ctx,
ctx = 1573{
1574       21="L>21=/events/core.c#L1645" id="L1645" clas2175ine" na21="L1575">1575       21="L>217ment"+code=perf_event_sched_in" +ef">co+">perfievent_sched_inco+">perfievent"=perf_event_context" class=ref">perf_cpu_context *cpuctx = 1576       21="L>217   6     6      strucref="""""""""enume class="sref">e">tasesype_e/a>,
e">tasesype/a>,
1577       21="L>217   6     6      struce=ctx_scccccc=perf_event_context" c( *ecpuctx, href="kernel/ev_ts/core.c#L1617" id="L1617" clas2178ine" na21="L1578">1578       21="L>21=f="ke>
1579
perf_event_context *ctx,
ctx = ta->1580       21="L>21="ent"ts/core.c#L1608" id="L1608" clas2181ine" na21="L1581">1581       21="L>2181="kernel/eve class="sr">pmuperfievent_sched_inperfievent"lass="sref">ctx,
ctx = ctx">tasesype/a>,
ctxcpuctx, href="kernel/ev_nts/core.c#L1608" id="L1608" clas2182ine" na21="L1582">1582
1583       21="L>218ref6"+cod6=ctx" 1614" id="L1614" clas2184ine" na21="L1584">1584 *perfievent_sched_in *perfievent"=perf_event_context" class="sref">perf_event_context *ctx,
1585 *ecpuctx, href="kernel/ev_ts/core.c#L1617" id="L1617" clas2186ine" na21="L1586">1586       21="L>2186ctx">
1587       21="L>218   6     6   =perf_event_context" class=ref">perf_cpu_context *cpuctx = 1588
1589       21="L>2189="kernel/eve class="sr">pmu = ctx__get=ref">perf_cpu_context __get=ref">perf_ctx" class="sref">ctx);
1590ctxrpuctx = task,
ctx->159115921593       21="L>219"+code=update_cgrp_time_from*);
 href="k*ctx = ctx);
1594       21="L>21=ctx*);
 href="k*ctx);
mpmu);
 href="k*mul/events/core.c#L1608" id="L1608" clas2195ine" na21="L1595">1595       21="L>21=        1596       21="L>219/ev6nts/c66    */
1597       21="L>219ment"> */
1598       21="L>219ment"> * Cross CPU call to ieeeeeeee* "+c flexinte, sk1599
 * Attach a performanceeeeeeee*d         *core.c#L1638" id="L1638" clas22"line" na22"lin599">1599
2200+code=lockdep_assert_held" ref">co+">perf_ctvent_contextco+">perf_ctvent"lass="sref">ctx = ctxef="keFLEXIBLE>,
1591220/events/core.c#L1622" id="L1622" clas22"2ine" na22""L1592">15922202="kernel/eveuctxhed_in" class="->mnra hrefs_context_time1593       22""L>220uct ctxrpuctx = task,
ctx);
1594       22""L>220/events/core.c#L1645" id="L1645" clas22"5ine" na22""L1595">1595       22""L>220"+code=lockdep_assert_held" > *perfievent"lass="sref">ctx = ctx = task,
ctxcpuctx, href="kernel/ev_nts/core.c#L1608" id="L1608" clas22"6ine" na22""L1596">1596       22""L>220/events/core.c#L1617" id="L1617" clas22"7ine" na22""L1597">1597       22""L>22"   6     6   lass="sref">ctx*tstam);
 href="k*tstamtx" class="sref">ctx);
mpmu);
 href="k*mul/events/core.c#L1608" id="L1608" clas22"8ine" na22""L1598">1598       22""L>2208  6     6   lass="sref">ctx*co+unutex);
 href="k*co+unutextx" class="sref">ctx = ctx);
1599
220"+c6de=cp65e.c#L1600" id="L1600" clas221line" na22="L1610">16101611         * calling add_event_t* Since  tose rocodeons"are *1612         */
perf_c evegots">peruled onkis"actually rocodengnel/events/core.c#L1633" id="L1633" clas2213ine" na22="L1613">1613       22="L>221ment"> *
1614
ctx*);
 href="k*ctx);
mpmu);
 href="k*mul/events/core.c#L1608" id="L1608" clas22=5ine" na22="L1615">1615       22="L>221ment"nts/core.c#L1604" id="L1604" clas22=6ine" na22="L1616">1616
1617       22="L>221ment"> */
1618 * Cross CPU call to i*eW hn samplingetho branckg=paex un sys="m-wide, it mayebvenecessaryel/events/core.c#L1633" id="L1633" clas22=9ine" na22="L1619">1619 * Attach a performancekto flushd to =paex onk>perf_c switch. This happens w hn tho branchel/events/core.c#L1633" id="L1633" clas222line" na22="L1620">1620       22="L>222"ent"> * Cross CPU call to i*e=paex does not tag itsgentries with"tho pideofs tas kernel sk1621
         * calling add*kO tarwise ieffealles impossinte to   *ociaLeea branchgentry with"ael/events/core.c#L1633" id="L1633" clas22=2ine" na22="L1622">1622       22="L>222ment"> * in event->hw_conf sk1623       22="L>222ment"> *
1624
 * If the event is attacat tho userclid=le(whichecouldebvea useful measure is  un sys="m-wideel/events/core.c#L1633" id="L1633" clas2225ine" na22="L1625">1625       22="L>222ment">         * events on t*sm>ct). In that case,ba h riskais higheofshavingea branche=paex withel/events/core.c#L1633" id="L1633" clas2226ine" na22="L1626">1626}
1627
 */
 layernel/events/core.c#L1633" id="L1633" clas22=8ine" na22="L1628">1628 * Cross CPU call to i*el/events/core.c#L1633" id="L1633" clas22=9ine" na22="L1629">1629 * Attach a performancekThis funcdeon providesaa h el/events/core.c#L1633" id="L1633" clas223line" na22="L1630">1630 * Attach a performanc* layern Itais invoked ONLY w hn thore iscat least one sys="m-wide >perf_ctx/events/core.c#L1633" id="L1633" clas2231ine" na22="L1631">1631         * calling add* with"at least one active a tas"usinge akhn branche=amplingnel/events/core.c#L1633" id="L1633" clas2232ine" na22="L1632">1632         */
1633 *perfievent_sched_in *perfievent"=perf_event_context" c( *eprevvent_sched_inrev/evee  *core.c#L1638" id="L1638" clas22=4ine" na22="L1634">1634 *ecpuctx, href="kernel/ev_ts/core.c#L1617" id="L1617" clas22=5ine" na22="L1635">1635
1636perf_cpu_context *cpuctx = 1637);
 href="k*mul/evt" class="sref">epmu);
 href="k*mul/evnts/core.c#L1608" id="L1608" clas22=8ine" na22="L1638">1638static 22="L>223f="kernel/eveunsigner longe class="sref">eflags_context_time16391640       22="L>224"+c6de=cp66a t * Attach a performanrn noeneask wgflushdbranche=paex if not changinge aska*d         *core.c#L1638" id="L1638" clas2241ine" na22="L1641">1641       22="L>2241="kernel/eveuctxhed_in" class="prevvent_sched_inrev/eveo =class="sref">ctxcpuctx, href="kernel/ev_ts/core.c#L1617" id="L1617" clas2242ine" na22="L1642">1642{
1643       22="L>224ref6"+cod6=ctx" 1614" id="L1614" clas22=4ine" na22="L1644">1644
ctxlocal_irq_save/a>,
ctxflags_context_time1645       22="L>224ment"ts/core.c#L1599" id="L1599" clas22=6ine" na22="L1646">1646
1647       22="L>224/events/core.c#L1628" id="L1628" clas2248ine" na22="L1648">1648       22="L>2248  6     6   lass="sref">ctx hreffor_eacheetven_rcu/a>,
ctxpmu);
 href="k*mul/ev,eas_irqass="sref">ctx*mus_context_timectx"tven="kernes/co, /cetven/eve)e>
task_22hre>22== ctx = ctxa ishref=ptrtx, href="ke ishref=ptrtx" class="sref">ctxpmu);
 href="k*mul/evutex" class="sref">mpmu=ref">perf_cpu_context *mu=ref">perf_cl/events/core.c#L1608" id="L1608" clas225line" na22="L1550">16501651       22="L>225        int 1652       22="L>225ment">         */
1653       22="L>225ment"> *
)
1654
1655static 22="L>225        ta->mnrabranch_=paex_context_time1656       22="L>225   6     6      strucref=code=code=elass="sref">ctxpmu);
 href="k*mul/evutex" class="sref">mflushabranch_=paex_context_time
1657       22="L>225/events/core.c#L1628" id="L1628" clas2258ine" na22="L1648">1658{
 *<669pruct    lass="sref">ctxlmu);
 href="k*mul/evt=e class="sr">pmu = ta->mpmu);
 href="k*mul/evnts/core.c#L1608" id="L1608" clas2259ine" na22="L1559">1659       22="L>225"+c6de=cp65e.c#L1600" id="L1600" clas226line" na22="L1560">1660       22="L>226" );
 href="k*ctx = ctx = task,
1661       22="L>226/events/core.c#L1622" id="L1622" clas2262ine" na22="L1562">1662       22="L>226"+c6de=cp66a href="keef="+codlass="sref">ctx> *);
 href="k*ctxpmu);
 href="k*mul/events/core.c#L1608" id="L1608" clas2263ine" na22="L1563">1663       22="L>226ref6"+cod6=ctx" 1614" id="L1614" clas2264ine" na22="L1554">1664       22="L>226a href="+codeint ctxpmu);
 href="k*mul/evutex" class="sref">mflushabranch_=paex_context_time1665}
1666
ctx*tstam);
 href="k*tstamtx" class="sref">ctxpmu);
 href="k*mul/events/core.c#L1608" id="L1608" clas2267ine" na22="L1557">16671668 *<669p      te_cgrp_time_from*);
 href="k*co+unutextx" class="sref">ctx = ctx = task,
16691670167122 th>2272 href="+codeent_to_ctx" clarcu_="ad+unutex);
 href="krcu_="ad+unutex/evecents/core.c#L1608" id="L1608" clas2273ine" na22="L1573">1573{
1574       22="L>227ctxlocal_irq_rest4" /a>,
ctxflags_context_time1575       22="L>227ment"nts/core.c#L1604" id="L1604" clas2276ine" na22="L1576">1576       22="L>227/events/core.c#L1617" id="L1617" clas2277ine" na22="L1577">1577       22="L>227ment"> */
1578       22="L>227ment"> * Cross CPU call to i*eCalled from ">peruler to add tho id="L1eofs tas kernel sk1579
 * Attach a performancekwith"interrupL1e+code=cdnel/events/core.c#L1633" id="L1633" clas228line" na22="L1580">1580       22="L>228lent"> * Attach a performanc*el/events/core.c#L1633" id="L1633" clas2281ine" na22="L1581">1581       22="L>228ment">         * calling add* We rest4"  tho id="L valueeand thon >tstam itnel/events/core.c#L1633" id="L1633" clas2282ine" na22="L1582">1582
         */
1583       22="L>228ment"> *
tstam()el/events/core.c#L1633" id="L1633" clas2284ine" na22="L1584">1584 * If the event is attacseL1ktho itstampdbit inaa h  tas _bef3" _el/events/core.c#L1633" id="L1633" clas2285ine" na22="L1585">1585         * events on t*saccessingetho a tas 1586       22="L>228/ev6nts/c66    */
1587       22="L>228ment"> */
1588
 *perfievent_sched_in *perfievent"=perf_event_context" c( *eprevvent_sched_inrev/evee  *core.c#L1638" id="L1638" clas22=9ine" na22="L1589">1589       22="L>228=  *ecpuctx, href="kernel/ev_ts/core.c#L1617" id="L1617" clas229line" na22="L1590">1590
1591perf_event_context *ctx,
1592cpuctxevent_sched_in1593       22="L>229ref6"+cod6=ctx" 1614" id="L1614" clas2294ine" na22="L1594">1594       22="L>22=ctxfor_eachesk, href="kfor_eacheskctx
1595       22="L>229        ctx,
ctxapuctx, href="kernel/evutex" class="sref">mp * *ctx1596       22="L>229   6     6      strucuctxlass="sref">ctxlhkeln="kernes/co, /c hkelnvent"" class="sr">pmu->1597       22="L>229   6     6      struce=ctx_sc"+coinuents/core.c#L1608" id="L1608" clas2298ine" na22="L1598">1598       22="L>229f="kets/core.c#L1540" id="L1540" clas2299ine" na22="L1599">1599
ctx> *perfievent_sched_in *perfievent" class="sr">pmu->ctxcpuctx, href="kernel/ev_nts/core.c#L1608" id="L1608" clas23"line" na23"lin599">1599
230"+c6de=cp66a nts/core.c#L1604" id="L1604" clas23"1ine" na23""L1591">15912301="kernel/eve  */
1592230ment">         */
1593       23""L>230ment"> *
1594       23""L>230/ev6nts/c65    * If there was an act* rgroup id="L"are sys="m-wide m>ct onlyel/events/core.c#L1633" id="L1633" clas23"5ine" na23""L1595">1595       23""L>230ref6"+cod65    */
1596       23""L>230   6     6   uctxlass="sref">ctxatomic_="adtx, href="katomic_="advent"as_irqass="sref">ctx__get=ref"vartx, href="k__get=ref"vartx" class="sref">ctxp *1597       23""L>230   6     6      struclass="sref">ctxp *perfievent_sched_in *perfievent"qass="sref">ctxprevvent_sched_inrev/evee_lass="sref">ctxcpuctx, href="kernel/ev_nts/core.c#L1608" id="L1608" clas23"8ine" na23""L1598">1598       23""L>230f="kets/core.c#L1540" id="L1540" clas23"9ine" na23""L1599">1599
2309="kernel/eve  */
1610ctxatomic_="adtx, href="katomic_="advent"as_irqass="sref">ctx__get=ref"vartx, href="k__get=ref"vartx" class="sref">ctxp *1611ctxp *perfievent_sched_in *perfievent"qass="sref">ctxprevvent_sched_inrev/evee_lass="sref">ctxcpuctx, href="kernel/ev_nts/core.c#L1608" id="L1608" clas23=2ine" na23="L1612">16121613       23="L>231ref6"+cod6=ctx" 1614" id="L1614" clas23=4ine" na23="L1614">1614
ctxu="L1554">16timecpu> * *iop_enabled = > * *iopvent"=perf_event_context" c> * *ctx hrefvent_sched_inctxu="L1554">16timecpunsec_context_timectxu="L1554">16timecpucouefvent_sched_in1615       23="L>231ment">
1616
16timecpufrequencn="kernes/co, /cfrequencn/eveo class="sref">ctx hrefvent_sched_inmattrtx, href="kattrde=m. class="sref">m=ample_freqtx, href="k=ample_freq/events/core.c#L1608" id="L1608" clas23=7ine" na23="L1617">1617       23="L>231   6     6   lass="sref">ctxu="L1554">16timecpusec_context_timectxNSEC_PER_SEC_context_time1618ctxu="L1554">16timecpudivisortx, href="kdivisorctx"e_lass="sref">ctxdividenp_enabled = dividenp/events/core.c#L1608" id="L1608" clas23=9ine" na23="L1619">16191620       23="L>232"ct cpucouef_fls_context_timectxnsec_fls_context_timectxfrequencn_fls_context_timectxsec_fls_context_time1621
1622       23="L>2322 href="+codeent_to_ctx" clacouef_fls_context_timectxfls="L1554">16timepmu1623       23="L>232"+code=update_cgrp_time_fromnsec_fls_context_timectxfls="L1554">16timepmunsec_context_time1624
ctxfrequencn_fls_context_timectxfls="L1554">16timepmufrequencn="kernes/co, /cfrequencn/eve_nts/core.c#L1608" id="L1608" clas23=5ine" na23="L1625">1625       23="L>232"+code=lockdep_assert_held" sec_fls_context_time1626}
1627
1628 * Cross CPU call to is an act* Wvegots@couef ina@nsec, with"a target ofs=ample_freq HZel/events/core.c#L1618" id="L1618" clas23=9ine" na23="L1629">1629 * Attach a performanceeeeeeee* the target > *iopffealles:cp/events/core.c#L1618" id="L1618" clas233line" na23="L1630">1630 * Attach a performanceeeeeeee*cp/events/core.c#L1618" id="L1618" clas2331ine" na23="L1631">1631         * calling addeeeeeeee*             @couef * 10^9cp/events/core.c#L1618" id="L1618" clas2332ine" na23="L1632">1632         */
 *iopf= -------------------cp/events/core.c#L1618" id="L1618" clas2333ine" na23="L1633">1633 *
16341635
163616371638static 23="L>233ment"> * Cross CPU call to is an act* Reduce accuracy by one bit such that @aeand @bc"+cvergeel/events/core.c#L1618" id="L1618" clas23=9ine" na23="L1639">1639 * Attach a performanceeeeeeee* to"a similar magnitudenel/events/core.c#L1633" id="L1633" clas234line" na23="L1640">1640       23="L>234lent"> * Attach a performanceeeeeeee*d         *core.c#L1638" id="L1638" clas2341ine" na23="L1641">1641       23="L>2341="ke#def1pmuatx, href="kactx"e_lass="sref">ctxbtx, href="kb/eve)eeeeeeeeeeeeeeee\  *core.c#L1638" id="L1638" clas2342ine" na23="L1642">1642{
1643       23="L>234"+code=updateuctxlass="sref">ctxatx, href="kactx"##_fls sk"  lass="sref">ctxbtx, href="kb/eve##_fls) {eeeeeeee\  *core.c#L1638" id="L1638" clas2344ine" na23="L1644">1644
ctxatx, href="kactx" sk" sk" = 1;eeeeeeeeeeeeeeee\  *core.c#L1638" id="L1638" clas2345ine" na23="L1645">1645       23="L>234        ctxatx, href="kactx"##_fls--;eeeeeeeeeeeeee\  *core.c#L1638" id="L1638" clas2346ine" na23="L1646">1646
1647       23="L>234   6     6      struclass="sref">ctxbtx, href="kb/eve sk" sk" = 1;eeeeeeeeeeeeeeee\  *core.c#L1638" id="L1638" clas2348ine" na23="L1648">1648       23="L>234f="kernel/eve> *<669plass="sref">ctxbtx, href="kb/eve##_fls--;eeeeeeeeeeeeee\  *core.c#L1638" id="L1638" clas2349ine" na23href="kernel"sref">task_23hre>23== 16501651       23="L>235/events/core.c#L1622" id="L1622" clas2352ine" na23="L1552">1652       23="L>2352  6     6   l */
1653       23="L>235ment"> *
1654
1655static 23="L>235ref6"+cod65    */
1656       23="L>235   6     6   while (ent_to_ctx" clacouef_fls_context_timectxnsec_fls_context_time
1657       23="L>235   6     6      struclass="sref">ctxREDUCE_FLS_context_timepmunsec_context_timectxfrequencn="kernes/co, /cfrequencn/eve_nts/core.c#L1608" id="L1608" clas2358ine" na23="L1648">1658{
 *<669plass="sref">ctxREDUCE_FLS_context_timepmusec_context_timectx1659       23="L>235= 1660       23="L>236"ent"ts/core.c#L1608" id="L1608" clas2361ine" na23="L1561">1661       23="L>2361="kernel/eveuctxhed_in" class="couef_fls_context_time
1662       23="L>236"+c6de=cp66a href="kelass="sref">cpudivisortx, href="kdivisorctx"o class="sref">ctxnsec_context_timectxfrequencn="kernes/co, /cfrequencn/events/core.c#L1608" id="L1608" clas2363ine" na23="L1563">1663       23="L>236ref6"+cod6=ctx" 1614" id="L1614" clas2364ine" na23="L1554">1664       23="L>236a href="+codeint 
1665}
ctxREDUCE_FLS_context_timepmuctxsec_context_time1666
ctxdivisortx, href="kdivisorctx"osk" sk" = 1;ts/core.c#L1608" id="L1608" clas2367ine" na23="L1557">166716681669ctxdividenp_enabled = dividenp/evet=e class="sr">pmuctxsec_context_time16701671ctxdividenp_enabled = dividenp/evet=e class="sr">pmuctxsec_context_time23 th>237/events/core.c#L1583" id="L1583" clas2373ine" na23="L1573">1573{

1574       23="L>237a href="+codeint ctxREDUCE_FLS_context_timepmunsec_context_timectxfrequencn="kernes/co, /cfrequencn/eve_nts/core.c#L1608" id="L1608" clas2375ine" na23="L1575">1575       23="L>237        ctxdividenp_enabled = dividenp/evetsk" sk" = 1;ts/core.c#L1608" id="L1608" clas2376ine" na23="L1576">1576       23="L>237   6     6      struc}ts/core.c#L1608" id="L1608" clas2377ine" na23="L1577">1577       23="L>237/events/core.c#L1628" id="L1628" clas2378ine" na23="L1578">1578       23="L>237f="kernel/eve> *<669plass="sref">ctxdivisortx, href="kdivisorctx"o class="sref">ctxnsec_context_timectxfrequencn="kernes/co, /cfrequencn/events/core.c#L1608" id="L1608" clas2379ine" na23="L1579">1579
1580       23="L>238"ent"ts/core.c#L1608" id="L1608" clas2381ine" na23="L1581">1581       23="L>2381="kernel/eveuctx" class="sr">pmudivisortx, href="kdivisorctx"_ts/core.c#L1617" id="L1617" clas2382ine" na23="L1582">1582
ctxdividenp_enabled = dividenp/events/core.c#L1608" id="L1608" clas2383ine" na23="L1583">1583       23="L>238ref6"+cod6=ctx" 1614" id="L1614" clas2384ine" na23="L1584">1584ctxdiv64_u="L1554">16timepmudividenp_enabled = dividenp/evee_lass="sref">ctxdivisortx, href="kdivisorctx"_nts/core.c#L1608" id="L1608" clas2385ine" na23="L1585">15851586       23="L>238/events/core.c#L1617" id="L1617" clas2387ine" na23="L1587">1587       23="L>238ment"+code=plass="sref">ctxDEFINE_PER_CPUtx, href="kDEFINE_PER_CPUvent"inte_lass="sref">ctx> * *1588
ctxDEFINE_PER_CPUtx, href="kDEFINE_PER_CPUvent"lass="sref">ctxu="L1554">16timectx> *, href="k> *1589       23="L>238"+c6de=cp65e.c#L1600" id="L1600" clas239line" na23="L1590">1590 * *iop_enabled = > * *iopvent"=perf_event_context" c> * *ctx hrefvent_sched_inctxu="L1554">16timecpunsec_context_timectxu="L1554">16timecpucouefvent_sched_inctxbooltx, href="kboolevenclass="sref">cpu+code=c);
 href="k+code=ctx" _ts/core.c#L1617" id="L1617" clas2391ine" na23="L1591">15911592 * *ctxhwc_context_timectx hrefvent_sched_inmhw_context_time1593       23="L>239"+code=update_cgrp_time_froms="L1554">16timecpu> *iop_enabled = > *iopvente_lass="sref">ctxsample_> *iop_enabled = sample_> *iop/events/core.c#L1608" id="L1608" clas2394ine" na23="L1594">1594       23="L>23=ctxs="L1554">16timecpudeltatx, href="kdelta/events/core.c#L1608" id="L1608" clas2395ine" na23="L1595">1595       23="L>239ment"ts/core.c#L1599" id="L1599" clas2396ine" na23="L1596">1596       23="L>2396+code=lockdep_assert_held" > *iop_enabled = > *iopvento class="sref">ctx> * *iop_enabled = > * *iopvent"lass="sref">ctx hrefvent_sched_inctxnsec_context_timectx1597       23="L>239/events/core.c#L1628" id="L1628" clas2398ine" na23="L1598">1598       23="L>2398  6     6   lass="sref">ctxdeltatx, href="kdelta/eveo c" class="sr">pmus="L1554">16timectxp *iop_enabled = > *iopvento-event_context" chwc_context_timemsample_> *iop_enabled = sample_> *iop/eve_nts/core.c#L1608" id="L1608" clas2399ine" na23="L1599">1599
ctxdeltatx, href="kdelta/eveo c" class="sr">pmudeltatx, href="kdelta/eveo+ 7) / 8;e  */
1599
240"ent"ts/core.c#L1608" id="L1608" clas24"1ine" na24""L1591">15912401="kernel/eve class="sref">msample_> *iop_enabled = sample_> *iop/eveo class="sref">ctxhwc_context_timemsample_> *iop_enabled = sample_> *iop/eveo+ep_assert_held" deltatx, href="kdelta/events/core.c#L1608" id="L1608" clas24"2ine" na24""L1592">1592240/events/core.c#L1583" id="L1583" clas24"3ine" na24""L1593">1593       24""L>240"+code=updateuctx" class="sr">pmusample_> *iop_enabled = sample_> *iop/eve_ts/core.c#L1583" id="L1583" clas24"4ine" na24""L1594">1594       24""L>240a href="+codeint ctxsample_> *iop_enabled = sample_> *iop/eveo c1;ts/core.c#L1608" id="L1608" clas24"5ine" na24""L1595">1595       24""L>240ment"ts/core.c#L1599" id="L1599" clas24"6ine" na24""L1596">1596       24""L>2406+code=lockdep_assert_held" hwc_context_timemsample_> *iop_enabled = sample_> *iop/eveo class="sref">ctxsample_> *iop_enabled = sample_> *iop/events/core.c#L1608" id="L1608" clas24"7ine" na24""L1597">1597       24""L>240/events/core.c#L1628" id="L1628" clas24"8ine" na24""L1598">1598       24""L>2408+code=updateuctxlass="sref">ctxlocal64_="adtx, href="klocal64_="advent"as_irqass="sref">ctxhwc_context_timem> *iop_leffvent_sched_in *iop_leff/eve_osk"  8class="sref">ctxsample_> *iop_enabled = sample_> *iop/eve_e>
1599
240= ctx+code=c);
 href="k+code=ctx" _ts/core.c#L1617" id="L1617" clas241line" na24="L1610">1610mpmu);
 href="k*mul/evutex" class="sref">mstoptx, href="kstopvent"lass="sref">ctx hrefvent_sched_inctxa>)
)
16111612cpulocal64_sefvent_sched_inctxhwc_context_timem> *iop_leffvent_sched_in *iop_leff/eve, 0_nts/core.c#L1608" id="L1608" clas24=3ine" na24="L1613">1613       24="L>241ref6"+cod6=ctx" 1614" id="L1614" clas24=4ine" na24="L1614">1614
ctx+code=c);
 href="k+code=ctx" _ts/core.c#L1617" id="L1617" clas2415ine" na24="L1615">1615       24="L>241        ctx hrefvent_sched_inmpmu);
 href="k*mul/evutex" class="sref">mstarfvent_sched_inctx hrefvent_sched_inctxa>)
)
1616
1617       24="L>241   6 nts/core.c#L1604" id="L1604" clas24=8ine" na24="L1618">16181619 * Attach a performanrnel/events/core.c#L1618" id="L1618" clas242line" na24="L1620">1620       24="L>242lent"> * Attach a performanc* perb1es ovor theel/events/core.c#L1618" id="L1618" clas24=1ine" na24="L1621">1621
         * calling add* id="L1. At the same time, make sure, havingefreq id="L1 does not changeel/events/core.c#L1618" id="L1618" clas24=2ine" na24="L1622">1622       24="L>242ment">         */
1623       24="L>242ment"> *
1624
 *perf_event_context *perf_event"=perf_event_context" c> *perf_event_context *perf_ectx" class="sref">ctx->1625       24="L>242        cpuneass_unthr_context_time1626}
1627
 *ctx hrefvent_sched_in1628 * *ctxhwc_context_time1629ctxu="L1554">16timecpunow_context_timectx> *iop_enabled = > *iopvento class="sref">ctxTICK_NSEC_context_time1630ctxs="L1554">16timecpudeltatx, href="kdelta/events/core.c#L1608" id="L1608" clas2431ine" na24="L1631">163116321633 *
1634ct (neassefreq adjust)el/events/core.c#L1633" id="L1633" clas2435ine" na24="L1635">1635
16361637m=ample_nrlass=a>cpuneass_unthr_context_timme16343/a>       23="L>237f="L>238>, href="kdelta/events/core.c#L1608" id="L1608" clas23=9ine" na23="L1634">16343/a>       23="L>238"+c6de=cp65e.c#L1604" id="L1634" clas234line" na23="L1644">16444/a>16444/a>2401="kernel+codlass="sref">ctx> *);
 href="k*ctxpmu);
 href="k*mul/events/core.c#L1604" id="L1634" clas2342ine" na23="L1644">16444/a>240/events/core.c#L1583" id="L1634" clas2343ine" na23="L1644">16444/a>       23="L>239"+code=uplicont+nrtxctlicont+nrtxctx hrefvent_scnctx hrefvolicow_context_timectx hrefvots/ry/a> = sample_> *iop/eve_e>
1644
ctx hrefvent_sched_inmstartf="k* !d = > *iopvenLOADveVENT_STATE_ACTIVf">ctxa>)
1644       23="L>234                struce=ctx_sc"+coinuents/core.c#L1604" id="L1634" clas2346ine" na23="L1644">16444/a>       23="L>238/events/core.c#L1614" id="L1634" clas2347ine" na23="L1644">1644       23="L>234  "L>240"+code=updateuhrefvohref="_matchass="sref">ctx hrefvohref="_matchent_sched_inctx hrefvent_mme1644       23="L>234f=              struce=ctx_sc"+coinuents/core.c#L1604" id="L1608" clas2349ine" na23href="4ernel44/a>       23="L>238"+c6de=cp65e.c#L1604" id="L1634" clas235line" na23="L1554">16545/a> *ctxhwc_context_timectx hrefvent_sched_inmhw_context_time1654       23="L>235/events/core.c#L1624" id="L1624" clas2352ine" na23="L1554">16545/a>cpuneass_unthr_context_tisec_flsctx"osk"  64 code=cos_irqass="sref">ctxhwc_context_timecta performac_contd = > *iopvenMAX_INTERRUPT"sref">ctxREDUCEMAX_INTERRUPT"/a> = sample_> *iop/eve_e>
16545/a>{
241" hw_> *ctxhwc_context_timecta performac_cont me16545/a>       23="L>237a href="+codeint , hctx> *, hent_sched_inctx hrefvent_sc1>);
 href="k*mul/events/core.c#L1604" id="L1634" clas23=5ine" na23="L1554">16545/a>       24="L>241        ctx hrefvent_sched_inmpmu);
 href="k*mul/evutex" class="sref">mstarfvent_sched_inctx hrefvent_sc *iop_leff/eve, 0_nts/core.c#L1608" id="L1634" clas23=6ine" na23="L1554">16545/a>       23="L>237   6     6      struc}ts/core.c#L1604" id="L1604" clas23=7ine" na23="L1554">16545/a>       24""L>240/events/core.c#L1628" id="L1604" clas2358ine" na23="L1644">1654{
240"+code=updateuhrefvass="sref">ctx hrefvent_sched_inmattrtx, href="kattrdass="sref">m=ample_ass=a>ctx hrefvent_sched_inmattrtx, href="kattrde=m. class="sref">m=ample_freqtx, hreme16545/a>       22="L>228= 1664       23="L>236"ent"ts/core.c#L1604" id="L1604" clas2361ine" na23="L1564">16646/a>16646/a>         */////////* stop*/

schedouefvenpan>
16646/a> *

1664       23="L>236a 4struct mpmu);
 href="k*mul/evutex" class="sref">mstoptx, href="kstopvent"lass="sref">ctx hrefvent_sched_inctxa>)
)
16646/a>       24""L>240ment"ts/core.c#L1599" id="L1604" clas2366ine" na23="L1564">1664
16timecpunow_coed = > *iopvenuctxlass="sref">ctxlocal64_="adtx, href="klocal64_="advent"a  te_cgrp_time_from hrefvent_sched_inctx166416timecpudeltatxcpunow_coed = > *iopvento-event_context" chwc_context_timemtext<_fls_ctarm"hw_context_time16646/a>       23="L>237f="kernel/eve> *mtext<_fls_ctarm"hw_c href="kdivisorctx"enclass="sref">cpunow_coontext_time16646/a>       23="L>238"+c6de=cp65e.c#L1604" id="L1604" clas237line" na23="L1574">16747/a>2432  6     6   l */
16747/a>         * ////////* retarfv*/
/span>
         */////////* reload href="L>valueeeesreq id=is CPU, thon eveneasel/events/core.c#L1614" id="L1584" clas2373ine" na23="L1574">15747/a> *

15747/a>15747/a>15747/a>15747/a>       23="L>234  "L>24">16timecpudeltatx *L>235"ent"} while (0_ts/core.c#L1614" id="L1624" clas2378ine" na23="L1574">1574       23="L>237f="L>241" h24ctx"+code=perf_event_sched_in" > * *iop_enabled = > *<>, href="kstopvent"lass="sref">ctx hrefvent_sched_incpu> *iop_enabled = > *iopvevenclass="sref">cpudeltatx *15747/a>       23="L>238"+c6de=cp65e.c#L1604" id="L1604" clas238line" na23="L1584">15848/a> *ctx hrefvent_sched_inmpmu);
 href="k*mul/evutex" class="sref">mstarfvent_sched_inctx hrefvent_sc4">16timecpudeltatx *L ?ched_inctxa>)
 *iop_leff/eve, 0_nts/core.c#L1608" id="L1604" clas2381ine" na23="L1584">1584       23= 6     6      struc}ts/core.c#L1604" id="L1614" clas2382ine" na23="L1584">15848/a>240/events/core.c#L1583" id="L1604" clas2383ine" na23="L1584">15848/a>       23="L>239"+code=upde=c)enef">ctx> *)enef">="k*ctxpmu);
 href="k*mul/events/core.c#L1604" id="L1614" clas2384ine" na23="L1584">158415841584       23="L>238/events/core.c#L1614" id="L1614" clas2387ine" na23="L1584">1584  hL>2432  6     6   l */
15848/a>static 23="L>233ment"> * * Rflsd-robl eithere wa'sef="ke*ovor all id="L1 iff:cp/events/core.c#L1618" id="L1604" clas2389ine" na23="L1584">15848/a> * */span>
1594perf_event"=perf_event_context" c> *perf_event_context *perf_ectx" class="sref">ctx-&>235"ent"} while (0_ts/core.c#L1614" id="L1614" clas2391ine" na23="L1594">159415949/a>15949/a>       23="L>235ment"> *
15949/a>15949/a>static 23="L>235ref6"+cod65    */
1594       23="L>240"+code=updateu6   6=ample_freq/events/core.c#L1608" id="L16roartf_"sref">ctx> *a>-&>235"ent"} while (0_ts/core.c#L1614" id="L1614" clas2397ine" na23="L1594">15949/a>16timem> *iop_liconroartf_ass=hed_in_groupsctx> *_groupshed_/a>)
1594  pan c23="L>238ment"nts/core.c#L1604" id="L1604" clas2399ine" na23="L1594">15949/a>       23="L>238"+c6de=cp65e.c#L1605" id="L1635" clas24"line" na24"lin595">15950/a>       24="L>242lent"> */
15950/a>
     de=c)roartf_tarfv()15950/a>       24="L>242ment">     becausfee15950/a>       24="L>242ment"> *15950/a>1595  a hre24="L>2424ctx"+code=perf_evroartf_6text *perf_evroartf_6textperf_event"=perf_evcpu_6text *perf_evcpu_6text *perf_ectxpu6   6=ample_freq/evpu6  a>-&>235"ent"} while (0_ts/core.c#L1615" id="L1595" clas24"6ine" na24""L1595">15950/a>}
15950/a>
 *perf_event_context *perf_ectx" class="sref">ctx-& href="kdivisorctxNULLclass="sref">ctNULLw_coontext_time1595       24""ddddddddddddddddddroartfctx> *16time * *iop/eveo c1;ts/core.c#L1605" id="L1605" clas24"9ine" na24""L1595">15950/a>       23="L>238"+c6de=cp65e.c#L1605" id="L1615" clas241line" na24="L1615">1615-&sched_inctx-&a>, href="kattrdnrvent_c_to_ctx" clansec_rvent_c_/a> = sample_> *iop/eve_e>
16151/a>16152361="kernel/eveupu6   6=ample_freq/evpu6  a>-&sched_inctx-&a>, href="kattrdnrvent_c_to_ctx" clansec_rvent_c_/a>  !d = > *iopvenupu6   6=ample_freq/evpu6  a>-&sched_inctx-&a>, href="kattrdnrvactivfctx> *-&>235"ent"} while (0_ts/core.c#L1615" id="L1605" clas24=3ine" na24="L1615">16151/a>{
241" hw_> * * *iop/eveo c1;ts/core.c#L1605" id="L1615" clas24=4ine" na24="L1615">1615
16151/a>       24""L>240ment"ts/core.c#L1595" id="L1605" clas24=6ine" na24="L1615">16151/a>       24""L>2406+code=lox" class="sref">ctx-& href="kdivisorctxupu6   6=ample_freq/evpu6  a>-&sched_in16151/a>2406+code=lox" class="sref">ctx-& ec_flsctx"osk"  64 code=co6   6=ample_freq/events/core.c#L1608" id="L16nrlent_c_to_ctx" clansec_rvent_c_/a> = sample_> *iop/eve_e>
16151/a>       23="L>237f="kernel/eve> * *16151/a>
240=   !d = > *iopvenu   6=ample_freq/events/core.c#L1608" id="L16nrlactivfctx> *-&>235"ent"} while (0_ts/core.c#L1615" id="L1615" clas242line" na24="L1625">16252/a> * *iop/eveo c1;ts/core.c#L1605" id="L1615" clas24=1ine" na24="L1625">16252/a>       23= 6     6      struc}ts/core.c#L1605" id="L1615" clas24=2ine" na24="L1625">16252/a>240/events/core.c#L1585" id="L1635" clas24=3ine" na24="L1625">16252/a>       24""L>240"+code=updateuroartfctx> *235"ent"} while (0_ts/core.c#L1615" id="L1615" clas24=4ine" na24="L1625">16252/a>       23="L>236a gotoc4">16time *16252/a>       24""L>240ment"ts/core.c#L1595" id="L1615" clas2426ine" na24="L1625">16252/a>       23="L>2396+code=lockdf_6  p_time_from*)
1625
)"sref">ctx> *);
 href="k*-&sched_inctx-&a>, href="kattrdx" class="sref">ctxpmu);
 href="k*mul/events/core.c#L1605" id="L1605" clas24=8ine" na24="L1625">16252/a>1625ctxctxa>)
);
 href="k*mul/events/core.c#L1605" id="L1605" clas243line" na24="L1635">16353/a>ctx-&>235"ent"} while (0_ts/core.c#L1615" id="L1605" clas2431ine" na24="L1635">16353/a>ctxctx-&gext_time-&text_timectxa>)
);
 href="k*mul/events/core.c#L1605" id="L1615" clas2432ine" na24="L1635">16353/a>240/events/core.c#L1585" id="L1615" clas2433ine" na24="L1635">16353/a>       23="L>239"+code=uproartf_6   6=ample_freq/eroartf_6  hed_in-&sched_inctx-&>);
 href="k*mul/events/core.c#L1605" id="L1615" clas2434ine" na24="L1635">163534a>ctx-&>235"ent"} while (0_ts/core.c#L1615" id="L1635" clas2435ine" na24="L1635">16353/a>       24="L>241  "L>239"+code=uproartf_6   6=ample_freq/eroartf_6  hed_i_inctx-&>);
 href="k*mul/events/core.c#L1605" id="L1615" clas2436ine" na24="L1635">16353/a>       23="L>238/events/core.c#L1615" id="L1635" clas24rgeel/even4="L1635">16353/a>
 *perf_event_cosched_in="k*-&text_timectx-&gext_timectx xurrt"la>-&>);
 href="k*mul/events/core.c#L1605" id="L1605" clas23=8ine" na23="L1635">16353/a>16353/a>ctx> *)enef">="k*-&sched_inctx-&a>, href="kattrdx" class="sref">ctxpmu);
 href="k*mul/events/core.c#L1605" id="L1635" clas234line" na23="L1645">16454/a>-&text_time-&sched_in)
16454/a>16time *)
164542a> *235"ent"} while (0_ts/core.c#L1615" id="L1635" clas2343ine" na23="L1645">16454/a>{
16timem> *iop_licondel_ini=hed_in-&sched_inctx roartionolicow_co/a>)
1645
< 6     6      struc}ts/core.c#L1605" id="L1635" clas2345ine" na23="L1645">16454/a>       24""L>240ment"ts/core.c#L1595" id="L1635" clas2346ine" na23="L1645">16454/a>  ="L>2424ctx"+code=perf_event_cotask_tiime_from*1645  sample_> *iop/eve_e>
1645       23="L>242   6     6   =peliconh"sref">ctxlocal64_=iconh"sra> *perf_ecth"sref">ctxlocal64_h"sra> *m__getvcpu_va"="k*ctx roartionolicow_co/a>)
242   6     6   =perf_evcpu_6text *perf_evcpu_6text *perf_ectxpu6   6=ample_freq/evpu6  a>-&,perf_ecttm" class="sref">mtm"hw_context_time16555/a> *perf_event_context *perf_ectx" class="sref">ctx-&ontext_time16555/a>       23="ddddddddddddddddddx, hr class="sref">mt, hra>-&ontext_time16555/a>240/events/core.c#L1585" id="L1615" clas2353ine" na23="L1555">16555/a>       23="L>239"+code=upWARN_ON class="sref">mWARN_ON="k*<40"+code=updateuirqs);
 hrefr class="sref">mirqs);
 hrefr="k*<)/a>)
16555/a>  >)
16555/a>       24=mectx> *, href="k> *16555/a>       23="L>2396+code=lox, hr class="sref">mt, hra>-& href="kdivisorctx__1etovcpu_xchgevent_context" __1etovcpu_xchg="k*ctx> * * *iop_leff/eve, 0_nts/core.c#L1605" id="L1605" clas23=7ine" na23="L1555">16555/a>       24""L>240/events/core.c#L1625" id="L1605" clas2358ine" na23="L1645">1655{
 *mtm"hw_ctext_timectxlocal64_h"sra> *sc4">16timectx roartionolicow_co/ sample_> *iop/eve_e>
16555/a>       22="L>228= "L>2406+code=lox" class="sref">ctx-& hrn-&sched_inctx-&> *iop_leff/eve, 0_nts/core.c#L1605" id="L1605" clas236line" na23="L1565">16656/a> * *perf_event_context *ctx-&gext_time, hr class="sref">mt, hra>-&/> *iop_leff/eve, 0_nts/core.c#L1605" id="L1605" clas2361ine" na23="L1565">16656/a>       23="L>235/events/core.c#L1625" id="L1605" clas2362ine" na23="L1565">16656/a>ctx-& href="kdivisorctxupu6   6=ample_freq/evpu6  a>-&sched_in16656/a>{
2361="kernel/eveu" class="sref">ctx-&>235"ent"} while (0_ts/core.c#L1615" id="L1615" clas2364ine" na23="L1555">1665       23="L>236a "L>241" hw_> * *perf_event_context *ctx-&gext_time, hr class="sref">mt, hra>-&/> *iop_leff/eve, 0_nts/core.c#L1605" id="L1635" clas2365ine" na23="L1565">16656/a>       24""L>240ment"ts/core.c#L1595" id="L1605" clas2366ine" na23="L1565">1665
2361="kernel/eveupu6   6=ample_freq/evpu6  a>-&sched_inctxjiffies_a perva_a>-& h= 1 ||     24""L>240ment"ts/core.c#L1595" id="L1605" clas2367ine" na23="L1555">1665ctxjiffiesa>-&sched_inctxjiffies_a perva_a>-&mme16656/a>       23="L>237f="L>241" hw_> * *perf_evroartf_6text-&/> *iop_leff/eve, 0_nts/core.c#L1605" id="L1605" clas2369ine" na23="L1565">16656/a>       22= 6     6      struc}ts/core.c#L1605" id="L1605" clas237line" na23="L1575">16757/a>16757/a>       23="L>235/events/core.c#L1625" id="L1605" clas2372ine" na23 the l5st wi57/a>_onoexe_lass="sref">ctxent_coenef">_onoexe_hed_i"L>242   6     6   =perf_event_context" cl * *ctx hrefvent_gt;15757/a>{
241"         _unthr_>perf_event"=perf_event_context" c> *perf_event_context *perf_ectx" class="sref">ctx-&>235"ent"} while (0_ts/core.c#L1615" id="L1615" clas23=4ine" na23="L1575">15757/a> *iop/eve_e>
15757/a>       24="L>240"+code=updateuhrefvass="sref">ctx hrefvent_sched_inmattrtx, href="kattrdenef">_onoexe_lass="sref">ctxenef">_onoexe_hed_>235"ent"} while (0_ts/core.c#L1615" id="L1605" clas2376ine" na23="L1575">15757/a>
238 me15757/a>       24""L>240/events/core.c#L1625" id="L1625" clas2378ine" na23="L1575">15757/a>{
ctx hrefvent_sched_inmattrtx, href="kattrdenef">_onoexe_lass="sref">ctxenef">_onoexe_hed_nt me157579a>       24="L>2  6     6   =pehrefvass="sref">ctx hrefvent_sched_inmstartf="k* chedd = > *iopvenLOADveVENT_STATE_INACTIVf">ctxa>)
235"ent"} while (0_ts/core.c#L1615" id="L1605" clas238line" na23="L1585">15858/a>238 me15858/a>       23="L>235/events/core.c#L1625" id="L1615" clas2382ine" na23="L1585">158582a>{
r class="sref">m_efvent_sche_markoenef">rhed_isk"  64 code=cohrefvass="sref">ctx hrefvent_/> *iop_leff/eve, 0_nts/core.c#L1605" id="L1605" clas2383ine" na23="L1585">15858/a>       24="L>241ref6"+cod6=ctx" 1615" id="L1615" clas2384ine" na23="L1585">158515851585       23="L>238/events/core.c#L1615" id="L1615" clas2387ine" na23="L1585">1585  hL>2432  6     6   l */
15858/a>static 23="L>233ment"> * * Enef">easetof a task'sef="ke* ofsunee* tbeen marked enef">-on-exe_a similar magnitudenel/events/core.c#L1635" id="L1605" clas2389ine" na23="L1585">15858/a> * * Teto expece* oask h= xurrt"la similar magnitudenel/events/core.c#L1635" id="L1605" clas239line" na23="L1595">15959/a>       24="L>242lent"> * A/span>
1595_onoexe_lass="sref">ctxrf_event_coenef">_onoexe_hed_i"L>242   6     6   =perf_event_context" c> *perf_event_context *perf_ectx" class="sref">ctx-&>235"ent"} while (0_ts/core.c#L1615" id="L1605" clas2392ine" na23="L1595">15959/a> *iop/eve_e>
15959/a>{
 *ctx hrefvent_sched_in15959/a> *15959/a>       24="ddddddddddddddddddenef">r class="sref">menef">rhed_nt me1595       23="ddddddddddddddddddr"sref">cpulocal64revent_sched_in15959/a>       24""L>240/events/core.c#L1625" id="L1625" clas2398ine" na23="L1595">15959/a>{
 * * *iop_leff/eve, 0_nts/core.c#L1605" id="L1605" clas2399ine" na23="L1595">159599a>       24="L>240"+code=updateu6   6=ample_freq/events/cp||d40"+code=updateu6   6=ample_freq/events/core.c#L1608" id="L16nrlent_c_to_ctx" clansec_rvent_c_/a> = *iop_leff/eve, 0_nts/core.c#L1606" id="L1636" clas24"line" na24"lin596">15960/a>16timectx *iop_leff/eve, 0_nts/core.c#L1606" id="L1606" clas24"1ine" na24""L1596">15960/a>       23="L>235/events/core.c#L1626" id="L1606" clas24"2ine" na24""L1596">15960/a>15960/a>       24="L>242ment"> *<<<<<<<<<* We must vensw oul cgroupef="ke* - tth"untnteflicus CPU, thon eveneasel/events/core.c#L1616" id="L1586" clas24"4ine" na24""L1596">15960/a>15960/a>
wiseeeeee biup tryform ws CPU, thon eveneasel/events/core.c#L1616"6id="L1586" clas2396ine" na23="L1596">15960/a>15960/a>  hL>2432  6     6   l *d65    */15960/a>static 23="L>233ment"> * 65    */
15960/a>ctxctx xurrt"la>-&gext_timectNULLw_co/> *iop_leff/eve, 0_nts/core.c#L1606" id="L1616" clas241line" na24="L1616">16161/a>       23="L>236"ent"ts/core.c#L1606" id="L1606" clas24=1ine" na24="L1616">16161/a>2401="kernelraw_spinp_time_from*161612a>{
ctxctx-&/a>)
16161/a>       24="L>241ref6"+cod6=ctx" 1616" id="L1616" clas24=4ine" na24="L1616">1616
 *ctx hrefvent_scnctx hrefvolicow_context_timectx hrefvots/ry/a> = sample_> *iop/eve_e>
16161/a>       24="L>241  "L>239"+code=upr"sref">cpulocal64revent_ href="kdivisorctxent_coenef">_onoexe_lass="sref">ctxent_coenef">_onoexe_hed_isk"  64 code=cohrefvass="sref">ctx hrefvent_scxt_timectx-&/a>)
16161/a>
2361="kernel/ever"sref">cpulocal64revent_= *iop_leff/eve, 0_nts/core.c#L1606" id="L1606" clas24=7ine" na24="L1616">16161/a>r class="sref">menef">rhed_nt ample_> *iop/eveo c1;ts/core.c#L1606" id="L1626" clas24=8ine" na24="L1616">16161/a>       23=pan c23="L>238ment"nts/core.c#L1606" id="L1606" clas24=9ine" na24="L1616">16161/a>       23="L>238"+c6de=cp65e.c#L1606" id="L1616" clas242line" na24="L1626">16262/a>16262/a>         * * UncloneL1eto utext16262/a>         */
16262/a>       24""L>2dddddddddddddddenef">r class="sref">menef">rhed_= *iop_leff/eve, 0_nts/core.c#L1606" id="L1616" clas24=4ine" na24="L1626">16262/a>       23="L>236a dddddddddddddddunclone_6   6=ample_freq/eunclone_6  _freqxt_timectx-&/a>)
16262/a>       24""L>240ment"ts/core.c#L1596" id="L1616" clas2426ine" na24="L1626">16262/a>       23="L>2396+code=loraw_spinpun_time_from*16262/a>       24""L>240/events/core.c#L1626" id="L1606" clas24=8ine" na24="L1626">162628a>16262/a> *       * * Also ualls venswi"Lt+nLcgroupef="ke*,""L>anyovor all id="L1 iff:cp/events/core.c#L1616" id="L1606" clas243line" na24="L1636">16363/a>       24="L>242lent"> *       */
16363/a>2401="kernelrf_event_context *perf_event_contextctx-&scxt_timectx-&sched_inctx)
16363/a>16timectx)
16363/a>       23="L>239"+code=upl"adt_irq_retae.cctx> * * *iop_leff/eve, 0_nts/core.c#L1606" id="L1616" clas2434ine" na24="L1636">16363/a>
< 6     6      struc}ts/core.c#L1606" id="L1636" clas2435ine" na24="L1636">16363/a>       24""L>240ment"ts/core.c#L1596" id="L1616" clas2436ine" na24="L1636">16363/a>16363/a>  hL>2432  6     6   l *d* Cross CPU uall - ta>,  e
16363/a>static 23="L>233ment"> * */span>
16363/a>ctxlocal64__efvent_sche_="srhed_i="L>2in *ctxlocal64_infohed_= *iop_leff/eve, 0_nts/core.c#L1606" id="L1636" clas234line" na23="L1646">16464/a> *iop/eve_e>
16464/a>242   6     6   =perf_event_context" cl * *ctx hrefvent_ href="kdivisorctxinfoef">ctxlocal64_infohed_> *iop_leff/eve, 0_nts/core.c#L1606" id="L1616" clas2342ine" na23="L1646">164642a> *perf_event_context *perf_ectx" class="sref">ctx-& href="kdivisorctxhrefvass="sref">ctx hrefvent_sched_inctx-&> *iop_leff/eve, 0_nts/core.c#L1606" id="L1636" clas2343ine" na23="L1646">16464/a>{
 *pe__getvcpu_6textctx-&/a>)
16464/a>  >)
16464/a>       24=man c24="L>243/ev6nts//
16464/a>16464/a>  hL>2432  6     6   l *d65    */
16464/a>static 23="L>233ment"> * 65    */< schedul=i oul bet+nfee233ment"> *       * * ents/schedouefv wouldnee* tbeen upd* oreeo ata>ct"l s16565/a>       24="L>242lent"> *       */< when e
16565/a>         * */span>
165652a>ctx-&sched_inctx-&sched_in = > *iopvenu   6=ample_freq/events/c= *iop_leff/eve, 0_nts/core.c#L1606" id="L1616" clas2353ine" na23="L1556">16565/a>{
238a>)
16565/a>  >)
16565/a>       24=me16565/a>       23="L>2cal64_sefvent"a6   6=ample_freq/events/core.c#L1608" id="L16islactivfctx> * = sample_> *iop/eve_e>
16565/a>16time *ctx-&/a>)
1656{
16timectx hrefvent_/a>)
16565/a>       22= 6     6      struc}ts/core.c#L1606" id="L1606" clas236line" na23="L1566">16666/a>ctx hrefvent_/a>)
166661a>       23="L>2cal64_sefvent"ahrefvass="sref">ctx hrefvent_sched_inmstartf="k* =d = > *iopvenLOADveVENT_STATE_ACTIVf">ctxa>)
235"ent"} while (0_ts/core.c#L1616" id="L1606" clas2362ine" na23="L1566">16666/a>ctx hrefvent_sched_inmpmu);
 href="k*mul/evu="sref">ctxlocal64_="srhed_isk"  64 code=cohrefvass="sref">ctx hrefvent_/a>)
16666/a>       23="L>239"+code=upraw_spinpun_time_from*16666/a>
< 6     6      struc}ts/core.c#L1606" id="L1636" clas2365ine" na23="L1566">16666/a>       24""L>240ment"ts/core.c#L1596" id="L1606" clas2366ine" na23="L1566">1666
ctxlocal64_inne" a>   "L>2430      6     6   =perf_event_contu_context" cl * *242   6     6   =perf_event_context" cl * *ctx hrefvent_>235"ent"} while (0_ts/core.c#L1616" id="L1606" clas2367ine" na23="L1556">16666/a>  sample_> *iop/eve_e>
16666/a>       23="L>238 "L>239"+code=upl"adt64_="sref">ctxlocal64_l"adt64_="srhed_inctx hrefvent_sched_in *239"+code=upatomic64_="sref">ctxlocal64_atomic64_="srhed_inctx hrefvent_sched_inctx> *ctx>hed_/a>)
16666/a>   6     6      struc}ts/core.c#L1606" id="L1606" clas237line" na23="L1576">16767/a>       23="L>236"ent"ts/core.c#L1606" id="L1606" clas2371ine" na23="L1576">167671a>
     6     6   =perf_event_co="sref">ctxlocal64_fvent_sche_="srhed_i"L>242   6     6   =perf_event_context" cl * *ctx hrefvent_>235"ent"} while (0_ts/core.c#L1616" id="L1606" clas2372ine" na23 the l6st wi67/a> *iop/eve_e>
15767/a>{
15767/a>
15767/a>
<"L>242ureovor all id="L1 iff:cp/events/core.c#L1616" id="L1606" clas2376ine" na23="L1576">15767/a>15767/a>2406+code=lohrefvass="sref">ctx hrefvent_sched_inmstartf="k* =d = > *iopvenLOADveVENT_STATE_ACTIVf">ctxa>)
 sample_> *iop/eve_e>
15767/a>{
16timectx> *hed_isk"  64 code=cohrefvass="sref">ctx hrefvent_sched_inoncpxa>-&sample_> *iop/eve_e>
15767/a>       22="L>228=                          424ctx"+code=pe_efvent_sche_="sref">ctxlocal64__efvent_sche_="srhed_ntext_timectx hrefvent_, 1/a>)
15868/a>2406+code=lohrefvass="sref">ctx hrefvent_sched_inmstartf="k* =d = > *iopvenLOADveVENT_STATE_INACTIVf">ctxa>)
 sample_> *iop/eve_e>
15868/a>242   6     6   =perf_event_context" c> *perf_event_context *perf_ectx" class="sref">ctx-& href="kdivisorctxhrefvass="sref">ctx hrefvent_sched_inctx-&> *iop_leff/eve, 0_nts/core.c#L1606" id="L1616" clas2382ine" na23="L1586">15868/a> *15868/a>       24="L>241ref6"+cod6=ctx" 1616" id="L1616" clas2384ine" na23="L1586">1586 *15868/a>       24="L>241  "an c24="L>243/ev6nts//
15868/a>1586  hL>2432  6     6   l *c66    */////////* (e.g.,L1ea>,  to b_timed),/i"L1esuncas="L1 does not changeel/events/core.c#L1616" id="L1606" clas2388ine" na23="L1586">15868/a>static 23="L>233ment"> * 66    */////////* w h6annot upd* o 6text15868/a> * 66    */////////*/span>
15969/a>2cal64_sefvent"a6   6=ample_freq/events/core.c#L1608" id="L16islactivfctx> * = sample_> *iop/eve_e>
15969/a> *ctx-&/a>)
15969/a>ctx hrefvent_/a>)
15969/a>{
15969/a> *ctx hrefvent_/a>)
15969/a>       24="L>241  "L>239"+code=upraw_spinpun_tim_irqretae.cctx> *1596       23= 6     6      struc}ts/core.c#L1606" id="L1606" clas2397ine" na23="L1596">15969/a>       24""L>240/events/core.c#L1626" id="L1626" clas2398ine" na23="L1596">15969/a>       23="L>238 "L>239"+code=uprf_event_contu_context" cl * *ctx hrefvent_/a>)
15969/a>   6     6      struc}ts/core.c#L1607" id="L1637" clas24"line" na24"lin597">15970/a>       23="L>236"ent"ts/core.c#L1607" id="L1607" clas24"1ine" na24""L1597">15970/a>  /
15970/a>   * Initializfee242ovor all id="L1 iff:cp/events/core.c#L1617"3id="L1607" clas2393ine" na23="L1597">15970/a>       24="L>242ment"> *<*/span>
15970/a> *pe__fvent_sche_ini=_6text242   6     6   =perf_event_context" c> *perf_event_context *perf_ectx" class="sref">ctx-&>235"ent"} while (0_ts/core.c#L1617"5id="L1587" clas2395ine" na23="L1597">15970/a> *iop/eve_e>
15970/a>       23="L>2396+code=loraw_spinp_tim_ini="sref">m> *iop_raw_spinp_tim_ini=hed_in15970/a>
m> *iop_muxt<_ini=hed_inm> *iop_muxt)
15970/a>{
m> *iop_INIT_LIST_HEADhed_in15970/a>m> *iop_INIT_LIST_HEADhed_in_groupsctx> *_groupshed_/a>)
16171/a>m> *iop_INIT_LIST_HEADhed_inctx hrefvolicow_co/a>)
16171/a>2401="kernelatomic_s"sref">cpulocal64atomic_s"shed_in)
161712a>{
 6     6      struc}ts/core.c#L1607"3id="L1607" clas24=3ine" na24="L1617">16171/a>       24="L>241ref6"+cod6=ctx" 1617" id="L1617" clas24=4ine" na24="L1617">16171/a>242   6     6   =perf_event_context" c> *perf_event_context *16171/a>  "L>2401="kernelal_ti_fventntext" c> *peal_ti_fventntext" hed_i"L>242   6     6   =perex" class="sref">mpmuperf_ectrex" class="sref">mpmu242   6     6   =petask_"L>242" class="sref">task_"L>242uperf_ecttaskass="sref">ctx16171/a>
 *iop/eve_e>
16171/a> *perf_event_context *perf_ectx" class="sref">ctx-&ontext_time16171/a>16171/a>ctx-& href="kdivisorctxkzal_ticlass="sref">ctkzal_tihed_i"izfofi"L>242   6     6   =perf_event_context" c> *perf_event_context *)ntext_timectGFP_KERNELw_co/a>)
16272/a>16272/a>238 "L>239"+code=upNULLclass="sref">ctNULLw_coa>)
16272/a>240/events/core.c#L1587" id="L1637" clas24=3ine" na24="L1627">16272/a>       23="L>239"+code=up_efvent_sche_ini=_6text *pe__fvent_sche_ini=_6textctx-&/a>)
16272/a>       23="L>2cal64_sefvent"ataskass="sref">ctx *iop/eve_e>
16272/a>       24="L>241  "L>239"+code=upx" class="sref">ctx-&sched_inctxctx)
16272/a>
242" class="sref">getvtask_"L>242hed_ixt_timectx)
16272/a>16272/a>{
mpmumpmu)
16272/a>       23="L>238"+c6de=cp65e.c#L1607" id="L1607" clas243line" na24="L1637">16373/a>239"+code=upx" class="sref">ctx-&ontext_time16373/a>16373/a>240/events/core.c#L1587" id="L1617" clas2433ine" na24="L1637">16373/a>  a hre24"L>242   6     6   =petask_"L>242" class="sref">task_"L>242u240/events/core.c#L1587" id="L1617" clas2434ine" na24="L1637">16373/a>
<#L1608" id="L16findolivelyvtask_by_vpiref">ctxlocal64_findolivelyvtask_by_vpirhed_ixt_time *perir_ uctxlocal64_vpirhed_/     24="L>241ref6"+cod6=ctx" 1617" id="L1637" clas2435ine" na24="L1637">16373/a> *iop/eve_e>
16373/a>
242" class="sref">task_"L>242uperf_ecttaskass="sref">ctx16373/a>mer"hed_ontext_time16373/a>16373/a>16474/a>ctxlocal64_vpirhed_/     24="L>241ref6"+cod6=ctx" 1617" id="L1637" clas2341ine" na23="L1647">16474/a>ctxctx xurrt"la>-&a>)
164742a>)
16474/a>{
ctxctxlocal64_findotask_by_vpirhed_ixt_timectxlocal64_vpirhed_/a>)
16474/a>       23="L>2cal64_sefvent"ataskass="sref">ctx)
16474/a>       24="L>241  "L>239"+code=upgetvtask_"L>242" class="sref">getvtask_"L>242hed_ixt_timectx)
16474/a>       23="L>2396+code=lorcu_="srpun_time_from*16474/a>       24""L>240/events/core.c#L1627" id="L1607" clas2348ine" na23="L1647">164748a>ctx)
228= "L>238 "L>239"+code=upERR_PTRass="sref">ctx239"+code=upESRCHass="sref">ctx)
16575/a>       23="L>236"ent"ts/core.c#L1607" id="L1637" clas2351ine" na23="L1557">16575/a>  /< Reuse ptrac/shremission uhecksLt+nLnow.<*/span>
165752a>{
mer"hed_ hr-"L>239"+code=upEACCESass="sref">ctx-&a>)
16575/a>       24""L>240"+code=updateuptrac/_may_accessctx> *ctxm> *iop_PTRACE_MODE_READhed_//>)
16575/a>16timectx-&a>)
16575/a>       24""L>240ment"ts/core.c#L1597" id="L1637" clas23=6ine" na23="L1557">16575/a>       23="L>238 "L>239"+code=uptaskass="sref">ctx16575/a>16timectx-&:>)
16575/a>{
242" class="sref">putvtask_"L>242hed_ixt_timectx)
16575/a>       22="L>238 "L>239"+code=upERR_PTRass="sref">ctxmer"hed_/a>)
16676/a>       23="L>236"ent"ts/core.c#L1607" id="L1607" clas2361ine" na23="L1567">16676/a>16676/a>240/events/core.c#L1587" id="L1617" clas2363ine" na23="L1567">16676/a>       24="L>242ment"> */
16676/a>16676/a>
1667
242   6     6   =perf_event_context" c> *perf_event_context *16676/a>16time *pefindogetvctext" hed_i"L>242   6     6   =perex" class="sref">mpmuperf_ectrex" class="sref">mpmu242   6     6   =petask_"L>242" class="sref">task_"L>242uperf_ecttaskass="sref">ctxcpxa>-&/>)
16676/a>  sample_> *iop/eve_e>
16676/a>       22="L>242   6     6   =perf_event_context" c> *perf_event_context *perf_ectx" class="sref">ctx-&ontext_time167770a>       22="L>242   6     6   =perf_evcpu_6text *perf_evcpu_6text *perf_ectxpu6   6=ample_freq/evpu6  a>-&ontext_time16777/a> *mer"hed_ontext_time15777/a>       24="L>241ref6"+cod6=ctx" 1617" id="L1617" clas23=4ine" na23="L1577">15777/a>       23="L>240"+code=updateutaskass="sref">ctx *iop/eve_e>
15777/a>       24="L>241  "an c24="L>243/ev6nts//< Must be rooteeo orf_* o o eitCPUspan>
:d*/span>
15777/a>
2361="kernel/everf_evparanoid_cpx" class="sref">rf_evparanoid_cpxhed_i/ ec_flsctx"o40"+code=updateu6aphrefc> *pecaphrefhed_i  6     6   =peCAP_SYS_ADMINc> *peCAP_SYS_ADMINhed_//>)
15777/a>238 "L>239"+code=upERR_PTRass="sref">ctx239"+code=upEACCESass="sref">ctx-&/a>)
15777/a>15777/a>       22="L>228=      24="L>242ment"> */
15878/a>       24="L>242lent"> *       */////////* We couldnbe clentrcandsal_tweeo attach

15878/a>         * ////////* offne" tCPUsandsactiv* o it when e
15878/a>         */////////* 1esu'sLt+nLlrtfra similar magnitudenel/events/core.c#L1637" id="L1607" clas2383ine" na23="L1587">15878/a>       24="L>242ment"> *<<<<<<<<
1587ctxlocal64_6pu_onne" hed_ixt_timecpxa>-&//>)
15878/a>       24="L>241          "L>238 "L>239"+code=upERR_PTRass="sref">ctx239"+code=upENODEVass="sref">ctx-&/a>)
15878/a>)
15878/a>16time-& href="kdivisorctxrf_vcpu_pt" class="sref">mrf_vcpu_pt"hed_ixt_timempmu);
 href="k*mul/evumpmvcpu_6text *perpmvcpu_6textcpxa>-&/a>)
15878/a>{
16timectx-& hrn-&sched_inctx-&ontext_time15878/a>       22="L>228=  L>239"+code=upgetvx" class="sref">ctgetvx" hed_ixt_timectx-&/a>)
15979/a>ctx-&ore.c#L1608" id="L16pinontu_context" cl *-&ontext_time15979/a>15979/a>238 "L>239"+code=upx" class="sref">ctx-&ontext_time15979/a>{
15979/a>  >)
15979/a>       24=  6     6   =peer" class="sref">mer"hed_ hr-"L>239"+code=upEINVALclass="sref">ctEINVALa>-&ontext_time15979/a>       23="L>2396+code=loctxnc> *pectxnhed_mpmumtask_6  _n"a>-&ontext_time15979/a>2406+code=loctxnc> *pectxnhed_<< 0/>)
15979/a>{
16timectx-&a>)
15979/a>       23="L>238"+c6de=cp65e.c#L1608" id="L1638" clas24"line" na24"lin598">15980/a>  "L>2396+code=lore/ryass="sref">ctx re/rya>-&:>)
15980/a>2401="kernelx" class="sref">ctx-& href="kdivisorctxrf_ev_tim_task_6text *perf_ev_tim_task_6textctx *pectxnhed_ntn * *iop_leff/eve, 0_nts/core.c#L1608" id="L1608" clas24"2ine" na24""L1598">159802a>ctx-&/ sample_> *iop/eve_e>
15980/a>{
ctx-&/a>)
15980/a>ctx-&ore.c#L1608" id="L16pinontu_context" cl *-&ontext_time15980/a>       24="L>241  "L>239"+code=upraw_spinpun_tim_irqretae.cctx> *15980/a>       23=} else3sample_> *iop/eve_e>
15980/a>16timectx-& href="kdivisorctxal_ti_fventntext" c> *peal_ti_fventntext" hed_i href_>perf_ectrex" class="sref">mpmuctx)
15980/a>{
16timemer"hed_ hr-"L>239"+code=upENOMEMass="sref">ctx-&ontext_time15980/a>       22="L>228= "L>240"+code=updateu6   6=ample_freq/events/c/     24="L>241ref6"+cod6=ctx" 1618" id="L1618" clas241line" na24="L1618">16181/a>236  gotoc4">16timectx-&a>)
16181/a>16181/a>mer"hed_ hr0a>)
16181/a>{
ctxm> *iop_pf_event_comuxt)
16181/a> */
16181/a>edshrefvent_s_exitvtask()a similar magnitudenel/events/core.c#L1638"6id="L1588" clas24=6ine" na24="L1618">16181/a>16181/a>  hL>2432  6     6   l *c66    */////////*/span>
16181/a>{
2cal64_sefvent"ataskass="sref">ctx *16181/a>       22="L>228=         4">16timemer"hed_ hr-"L>239"+code=upESRCHass="sref">ctx)
16282/a>2406+code=lotaskass="sref">ctx241ref6"+cod6=ctx" 1618" id="L1618" clas24=1ine" na24="L1628">16282/a>16timemer"hed_ hr-"L>239"+code=upEAGAINc> *peEAGAINhed_a>)
16282/a> *iop/eve_e>
16282/a>{
16timectgetvx" hed_ixt_timectx-&/a>)
16282/a>ctx-&ore.c#L1608" id="L16pinontu_context" cl *-&ontext_time16282/a>       24="L>241          4">16timemrcu_24=ign_poiext"hed_ixt_timectxctx-&/a>)
16282/a>
16282/a>16timectxm> *iop_pf_event_comuxt)
16282/a>16282/a>       22="L>228= "L>2_inctx unlikelyhed_ixt_timemer"hed_// sample_> *iop/eve_e>
16383/a>236  #L1608" id="L16putvx" class="sref">ctputvx" hed_ixt_timectx-&/a>)
16383/a>16383/a>2406+code=lohr" class="sref">mer"hed_ hhr-"L>239"+code=upEAGAINc> *peEAGAINhed_/     24="L>241ref6"+cod6=ctx" 1618" id="L1618" clas2433ine" na24="L1638">16383/a>{
16timectx re/rya>-&a>)
16383/a>16timectx-&a>)
16383/a>       24="L>241   6     6      struc}ts/core.c#L1608" id="L1618" clas2436ine" na24="L1638">16383/a>       23= 6     6      struc}ts/core.c#L1608" id="L1608" clas24rgeel/even4="L1638">16383/a>       24""L>240/events/core.c#L1628" id="L1608" clas23=8ine" na23="L1638">16383/a>       23="L>238 "L>239"+code=upx" class="sref">ctx-&ontext_time16383/a>       23="L>238"+c6de=cp65e.c#L1608" id="L1638" clas234line" na23="L1648">16484/a>  "L>2396+code=loer"oulass="sref">ctx-&:>)
16484/a>239"+code=upERR_PTRass="sref">ctxmer"hed_/a>)
164842a>{
 6     6      struc}ts/core.c#L1608" id="L1618" clas2343ine" na23="L1648">16484/a>       24="L>241ref6"+cod6=ctx" 1618" id="L1618" clas2344ine" na23="L1648">16484/a>mpf_event_cofree_filxt"hed_i"L>242   6     6   =perf_event_context" cl * *ctx hrefvent_>a>)
16484/a>       24""L>240ment"ts/core.c#L1598" id="L1638" clas2346ine" na23="L1648">164846a> *242   6     6   =percu_h"sref">ctxlocal64_=cu_h"srched_in *ctxlocal64_h"srched/     24="L>241ref6"+cod6=ctx" 1618" id="L1608" clas2347ine" na23="L1648">16484/a>  sample_> *iop/eve_e>
164848a> *ctx hrefvent_a>)
238"+c6de=cp65e.c#L1608" id="L1638" clas235line" na23="L1558">16585/a>ctx hrefvent_ href="kdivisorctx6ontae" r_ofclass="sref">ctxontae" r_ofhed_i  6     6   =peh"sref">ctxlocal64_h"srched,4"L>242   6     6   =perf_event_context" cl *ctxlocal64_=cu_h"srched>a>)
16585/a>2406+code=lohrefvass="sref">ctx hrefvent_sched_in *16585/a> *ctx hrefvent_sched_in *)
16585/a>       23="L>239"+code=uppf_event_cofree_filxt" class="sref">mpf_event_cofree_filxt"hed_in *ctx hrefvent_>a>)
16585/a> *ctx kfreehed_in *ctx hrefvent_>a>)
16585/a>   6     6      struc}ts/core.c#L1608" id="L1638" clas23=6ine" na23="L1558">16585/a>)
16585/a>ctx242   6     6   =pering_buff rass="sref">ctx *ctxa>)
16585/a>16585/a>  a hre24="L>2424ctx"+code=pefree_ent_cctx> *242   6     6   =perf_event_context" cl * *ctx hrefvent_>pan c24="L>241f="kets/core.c#L1548" id="L1608" clas236line" na23="L1568">16686/a>  sample_> *iop/eve_e>
16686/a>2401="kernelirq_work_syniclass="sref">ctirq_work_synihed_inctx hrefvent_sched_ina>)
16686/a>240/events/core.c#L1588" id="L1618" clas2363ine" na23="L1568">16686/a>       24""L>240"+code=updateuerefvass="sref">ctx hrefvent_sched_inctx part"lent_> sample_> *iop/eve_e>
16686/a>ctx hrefvent_sched_inmsattach_e to ent_ sctx"osk"  64 code=coPATEvATTACH_TASKctx> *pan c24="L>241f="kets/core.c#L1548" id="L1638" clas2365ine" na23="L1568">16686/a>       24="L>241          4">16timectxlocal64_a hre2_key_slow_dec_def rrerhed_in *a>)
16686/a>
2361="kernel/eveerefvass="sref">ctx hrefvent_sched_inctx16time *pemmapa>
ctx hrefvent_sched_inctx16time *pemmap_dataent_>pan c24="L>241f="kets/core.c#L1548" id="L1608" clas2367ine" na23="L1558">16686/a>ctx *a>)
16686/a>{
2cal64_sefvent"ahrefvass="sref">ctx hrefvent_sched_inctx16timectxomment_>pan c24="L>241f="kets/core.c#L1548" id="L1608" clas2369ine" na23="L1568">16686/a>       22="L>228=         4">16timectx *a>)
16787/a>2cal64_sefvent"ahrefvass="sref">ctx hrefvent_sched_inctx16timectx)
16787/a>16timectx *a>)
2cal64_sefvent"ahrefvass="sref">ctx hrefvent_sched_inctx16timemss *pePATEvSAMPLE_CALLCHAINhed_/>)
15787/a>{
16time *a>)
15787/a> *ctx hrefvent_>> sample_> *iop/eve_e>
15787/a>       24="L>241          4">16timectx * *ctx hrefvent_sched_incpxa>-&//a>)
15787/a>
16timectxlocal64_a hre2_key_slow_dec_def rrerhed_in *a>)
15787/a>15787/a>15787/a>       22="L>228= "L>20"+code=updateuhas_branch_e time_from* *ctx hrefvent_>> sample_> *iop/eve_e>
15888/a>236  #L1608" id="L16a hre2_key_slow_dec_def rreref">ctxlocal64_a hre2_key_slow_dec_def rrerhed_in *a>)
15888/a>243/ev6nts//< is system-widespan>
<*/span>
15888/a>ctx hrefvent_sched_inmsattach_e to ent_ sctx"osk"  64 code=coPATEvATTACH_TASKctx> */>)
15888/a>{
16timectx * *)
1588ctx hrefvent_sched_incpxa>-&//a>)
15888/a>       24="L>241   6     6      struc}ts/core.c#L1608" id="L1608" clas2386ine" na23="L1588">15888/a>       23= 6     6      struc}ts/core.c#L1608" id="L1608" clas2387ine" na23="L1588">15888/a>       24""L>240/events/core.c#L1628" id="L1628" clas2388ine" na23="L1588">15888/a>{
ctx hrefvent_sched_inctx sample_> *iop/eve_e>
15888/a>       22="L>228=  L>239"+code=upring_buff r_pulass="sref">ctxctx hrefvent_sched_inctxa>)
15989/a>ctx hrefvent_sched_inctxctNULLw_coa>)
159891a>       23= 6     6      struc}ts/core.c#L1608" id="L1618" clas2392ine" na23="L1598">15989/a>240/events/core.c#L1588" id="L1608" clas2393ine" na23="L1598">15989/a>       24""L>20"+code=updateuisongroupvent_context" cl * *ctx hrefvent_>>pan c24""L>240/events/core.c#L1588" id="L1618" clas2394ine" na23="L1598">15989/a> * *ctx hrefvent_>a>)
15989/a>       24""L>240ment"ts/core.c#L1598" id="L1608" clas2396ine" na23="L1598">15989/a>       23="L>2cal64_sefvent"ahrefvass="sref">ctx hrefvent_sched_inctx destroyhed_/>)
15989/a>16timectx hrefvent_sched_inctx destroyhed_in *ctx hrefvent_>a>)
15989/a>159899a>       23="L>2cal64_sefvent"ahrefvass="sref">ctx hrefvent_sched_in241ref6"+cod6=ctx" 1619" id="L1639" clas24"line" na24"lin599">15990/a>ctputvx" hed_ixt_timectx hrefvent_sched_in)
15990/a>159902a> *ctx hrefvent_sched_inctxlocal64_=cu_h"srchedntext_time *)
15990/a>{
 6     6      struc}ts/core.c#L1609" id="L1589" clas24"4ine" na24""L1599">15990/a>  >)
15990/a>  "ddddddddddddddddddpf_event_corelease_OAD/evontext" cl *242   6     6   =perf_event_context" cl * *ctx hrefvent_>pan c24="L>241f="kets/core.c#L1549"6id="L1589" clas2396ine" na23="L1599">15990/a>  sample_> *iop/eve_e>
15990/a> *perf_event_context *perf_ectx" class="sref">ctx-& href="kdivisorctxhrefvass="sref">ctx hrefvent_sched_in)
15990/a>15990/a>ctx-&ore.c#L1608" id="L16part"lvx" class="sref">ctpart"lvx" hed_/a>)
16191/a> */
16191/a>         * * There art two ways 1eto anno hreon is useful:/span>
16191/a>         */
16191/a>       24="L>242ment"> *<<<<<<<<<*  1) e
16191/a>16191/a>
16191/a>16191/a>  hL>2432  6     6   l *c66    */*  23=hrefvent_soread_group(), which takes faults whiefhepan>
16191/a>{
hL>2432  6     6   l *c66    */*  23=holdform6txore.cmuxt<,=howentrc1eto to 6alled afxt"hepan>
16191/a>  hL>2432  6     6   l *c66    */*  23=e
16292/a>       24="L>242lent"> *       */*  23=eo eriggtrc1ee AB-BA 6asta similar magnitudenel/events/core.c#L1639" id="L1619" clas24=1ine" na24="L1629">16292/a>         * */span>
162922a>ctxlocal64_muxt<__tim_nesterhed_inctx-&ore.c#L1608" id="L16muxt<"sref">m> *iop_muxt *)
16292/a>       23="L>239"+code=upraw_spinp_tim_irqef">ctxlocal64_=aw_spinp_tim_irqhed_inctx-&ore.c#L1608" id="L16_time_from*)
16292/a> *perf_evgroupvdetachhed_in *ctx hrefvent_>a>)
16292/a>       24=  6     6   =peraw_spinpun_tim_irqef">ctxlocal64_=aw_spinpun_tim_irqhed_inctx-&ore.c#L1608" id="L16_time_from*)
16292/a>       23="L>2396+code=lorf_evremove_fromontext" c> *perf_evremove_fromontext" hed_in *ctx hrefvent_>a>)
16292/a>ctx-&ore.c#L1608" id="L16muxt<"sref">m> *iop_muxta>)
16292/a>16292/a>ctx hrefvent_>a>)
16393/a>       23="L>236"ent"ts/core.c#L1609" id="L1609" clas2431ine" na24="L1639">16393/a>163932a>{
 6     6      struc}ts/core.c#L1609" id="L1619" clas2433ine" na24="L1639">16393/a>{
n *ctEXPORT_SYMBOL_GPLhed_ical64_sefvent"ahrefvent_corelease_OAD/evontext" cl *a>)
16393/a>  >)
16393/a>
16393/a>16393/a>  hL>2432  6     6   l *c*/span>
16393/a>  a hre24="L>2424ctx"+code=peputvent_context" cl *242   6     6   =perf_event_context" cl * *ctx hrefvent_>pan c24="L>241f="kets/core.c#L1549" id="L1609" clas23=9ine" na23="L1639">16393/a>  sample_> *iop/eve_e>
164940a>       22="L>242   6     6   =petask_"L>242" class="sref">task_"L>242uperf_ectown rass="sref">ctx)
16494/a>164942a>ctxctx hrefvent_sched_inctxlocal64_=L"ntu_cent_>>pan c24""L>240/events/core.c#L1589" id="L1619" clas2343ine" na23="L1649">16494/a>{
238a>)
16494/a>  >)
16494/a>       24=  6     6   =percuoread__time_from*a>)
16494/a>       23="L>2396+code=loown rass="sref">ctxctx hrefvent_sched_inctxa>)
16494/a>
16494/a>{
hL>2432  6     6   l *c66    */* Matches 1ee smp_wmb() inshrefvent_s_exitvtask()a Ifswe observfhepan>
16595/a>       24="L>242lent"> *       */* xreec1eto ents/, oe
16595/a>         * * own rschedpf_event_comuxt16595/a>         */
16595/a>       23="L>239"+code=upsmp_read_barrier_dehrndsctx> *a>)
16595/a>ctx sample_> *iop/eve_e>
16595/a>       24="L>241  "an c24="L>243/ev6nts//
16595/a>242() also drops e
16595/a>  hL>2432  6     6   l *c66    */////////* task ref rence=we c243safely take a new ref rencespan>
16595/a>{
hL>2432  6     6   l *c66    */////////* whief=holdforme16595/a>  hL>2432  6     6   l *c66    */      */
16696/a>242" class="sref">getvtask_"L>242hed_ixt_timectxa>)
166961a>       23= 6     6      struc}ts/core.c#L1609" id="L1609" clas2362ine" na23="L1569">166962a>a>)
16696/a>       24="L>241ref6"+cod6=ctx" 1619" id="L1619" clas2364ine" na23="L1559">16696/a>ctx sample_> *iop/eve_e>
16696/a>       24="L>241  _inctxlocal64_muxt<__timhed_inctxm> *iop_pf_event_comuxt)
16696/a>
16696/a>  hL>2432  6     6   l *c66    */////////* Wf=have=eo re-checkme16696/a>{
hL>2432  6     6   l *c66    */////////* w/sraced with=hrefvent_s_exitvtask(), acquirforme
16696/a>  hL>2432  6     6   l *c66    */      */< ensurer=ehey're=done,sandswe c243proceed with=xreeforme
16797/a>       24="L>242lent"> *       */      */< ents/a similar magnitudenel/events/core.c#L1639" id="L1609" clas2371ine" na23="L1579">16797/a>         *       */
2cal64_sefvent"ahrefvass="sref">ctx hrefvent_sched_inctxa href="ke*d         *core.c#L1639" id="L1619" clas2373ine" na23="L1579">15797/a>{
16timectx li6t_del_inivhed_inctx hrefvent_sched_inctx own r_efvryhed_/a>)
15797/a>ctxm> *iop_pf_event_comuxt)
15797/a>       24="L>241  424ctx"+code=peputvtask_"L>242" class="sref">putvtask_"L>242hed_ixt_timectxa>)
15797/a>       23= 6     6      struc}ts/core.c#L1609" id="L1609" clas2377ine" na23="L1579">15797/a>       24""L>240/events/core.c#L1629" id="L1629" clas2378ine" na23="L1579">157978a> *ctx hrefvent_>a>)
15797/a>   6     6      struc}ts/core.c#L1609" id="L1609" clas238line" na23="L1589">15898/a>       23="L>236"ent"ts/core.c#L1609" id="L1609" clas2381ine" na23="L1589">15898/a> *perf_evreleasehed_i"L>242   6     6   =pein =pc> *pein =puperf_ectin =pc> *pein =pu242   6     6   =pefiefctx> *perf_ectfiefctx> *a href="ke*d         *core.c#L1639" id="L1619" clas2382ine" na23="L1589">15898/a> *iop/eve_e>
15898/a>       23="L>239"+code=upputvent_context" cl *perf_ectfiefctx> *158915898/a>   6     6      struc}ts/core.c#L1609" id="L1609" clas2386ine" na23="L1589">15898/a>)
15898/a>  #L1608" id="L16u" clas2364ief_>peu6/a> *perf_event_coread_valuehed_i"L>242   6     6   =perf_event_context" cl * *ctx hrefvent_ntext_timepeu6/a> *ctxlocal64_xnablerent_ntext_timepeu6/a> *a href="ke*d         *core.c#L1639" id="L1629" clas2388ine" na23="L1589">15898/a>{
sample_> *iop/eve_e>
15898/a>       22="L>242   6     6   =perf_event_context" cl * *ctxlocal64_chilrts/ca>)
15999/a>peu6/a>)
15999/a>15999/a> *ctxlocal64_xnablerent_ hr0a>)
15999/a>       24"in *)
15999/a>  >)
15999/a>       24=  6     6   =pemuxt<__timef">ctxlocal64_muxt<__timhed_inctx hrefvent_sched_inm> *iop_chilromuxta>)
15999/a>       23="L>2396+code=lototavontext" cl *ctx hrefvent_>a>)
15999/a> *ctxlocal64_xnablerent_ +href="kdivisorctxerefvass="sref">ctx hrefvent_sched_inctxlocal64_totav_time_xnablerent_ +>)
15999/a>{
2396+code=loatomic64oreadc> *peatomic64oreadhed_inctx hrefvent_sched_inctxlocal64_chilrototav_time_xnablerent_>a>)
159999a>       23=in *ctx hrefvent_sched_in)
30" a>{
2396+code=loatomic64oreadc> *peatomic64oreadhed_inctx hrefvent_sched_ina>)/pre>)
30"/a>30"2a>ctx li6t_for_each_efvryhed_in *ctxlocal64_chilrts/c, nctx hrefvent_sched_in sample_> *iop/eve_e>
30"/a>{
2396+code=lototavontext" cl *ctxlocal64_chilrts/c>a>)
30"/a> *ctxlocal64_xnablerent_ +href="kdivisorctxchilref">ctxlocal64_chilrts/csched_inctxlocal64_totav_time_xnablerent_a>)
30"/a>       24="L>241  in *ctxlocal64_chilrts/csched_in)
30"/a>       23= 6     6      struc}ts/core.c#L1630"7id="L1630" clas2397ine" na23="L1530" c>30"/a>ctx hrefvent_sched_inm> *iop_chilromuxta>)
30"/a>30"9a>       23="L>238 "L>239"+code=uptotavontext" cl *)
30" a>   6     6      struc}ts/core.c#L1630"1id="L1630" clas24=1ine" na24="L1630" c>30"1a>  #L1608" id="L16EXPORT_SYMBOL_GPLclass="sref">ctEXPORT_SYMBOL_GPLhed_ical64_sefvent"ahrefvent_coread_valuec> *perf_event_coread_valuehed_>a>)
30"/a>240/events/core.c#L1530"3id="L1630" clas24=3ine" na24="L1630" c>30"3a> *242   6     6   =perf_event_context" cl * *ctx hrefvent_npan c24""L>240/events/core.c#L1530"4id="L1630" clas24=4ine" na24="L1630" c>30"/a>peu6/a>ctxlocal64_=Lad_formacent_ntcharp_inctx<__us rched_in *ctbufhe/a>a href="ke*d         *core.c#L1630"5id="L1630" clas2415ine" na24="L1630" c>30"5a>{
sample_> *iop/eve_e>
30"/a>       23="L>242   6     6   =perf_event_context" cl * *ctxctx hrefvent_sched_inctx *ctx)
30"/a>ctx *pesizehe/a hr0ntext_timeef">ctxlocal64_=Lvent_ hr-#L1608" id="L16EFAULTclass="sref">ctEFAULTts/ca>)
30"8a> *perf_event_context *perf_ectx" class="sref">ctx-& href="kdivisorctxlLad rass="sref">ctx)
30"/a>peu6/a> *)
30" a>peu6/a>ctxlocal64_ntu_cent_ntext_timectxlocal64_xnablerent_ntext_time)
30"/a>30"2a>ctxlocal64_muxt<__timhed_inctx-&ore.c#L1608" id="L16muxt<"sref">m> *iop_muxta>)
30"/a>       23="L>239"+code=upntu_cef">ctxlocal64_ntu_cent_ href="kdivisorctxpf_event_coread_valuec> *perf_event_coread_valuehed_ief="kdivisorctxlLad rass="sref">ctxctxlocal64_xnablerent_ntna>)
30"/a>  >)
30"/a>       24=  6     6   =pevaluesctx> *ctxctx *)
30"/a>       23="L>2cal64_sefvent"aread_formacef">ctxlocal64_=Lad_formacent_ sctx"osk"  64 code=coPATEvFORMAT_TOTAL_TIME_ENABLEDef">ctxlocal64_PATEvFORMAT_TOTAL_TIME_ENABLEDhe/a>a href="ke*d         *core.c#L163027id="L1630" clas2427ine" na24="L1630" c>30"/a>16time *ctxctxlocal64_xnablerent_a>)
30"/a>{
ctxlocal64_=Lad_formacent_ sctx"osk"  64 code=coPATEvFORMAT_TOTAL_TIME_RUNNINGctx> *a href="ke*d         *core.c#L163029id="L1630" clas24=9ine" na24="L1630" c>30"/a>       22="L>228=  L>239"+code=upvaluesctx> *ctx)
30" a>       24=  6     6   =pevaluesctx> *ctx239"+code=upntu_cef">ctxlocal64_ntu_cent_a>)
30"1a>{
ctxlocal64_=Lad_formacent_ sctx"osk"  64 code=coPATEvFORMAT_IDef">ctxlocal64_PATEvFORMAT_IDhe/a>a href="ke*d         *core.c#L163032id="L1630" clas2432ine" na24="L1630" c>30"/a> *ctx239"+code=upprimaryvent_coidc> *perrimaryvent_coidhed_ief="kdivisorctxlLad rass="sref">ctxa>)
30"/a>       24="L>241ref6"+cod6=ctx" 1630"4id="L1630" clas2434ine" na24="L1630" c>30"/a> *pesizehe/a hrdddddddddddddddnass="sref">ctxpeu6/a>a>)
30"/a>       24""L>240ment"ts/core.c#L1530"6id="L1630" clas2436ine" na24="L1630" c>30"/a>       23="L>2cal64_sefvent"acopy_to_us rass="sref">ctxctbufhe/antext_time * *pesizehe/a>>pan c24""L>240/events/core.c#L1530"7id="L1630" clas24rgeel/even4="L1630" c>30"/a>242= )
30"/a>30"/a>ef">ctxlocal64_=Lvent_ hrext_time *pesizehe/aa>)
30" a>30"1a>ctx li6t_for_each_efvryhed_in *ctxctxctx groupvefvryent_> sample_> *iop/eve_e>
30"/a>ctx)
30"/a>       24="L>241ref6"+cod6=ctx" 163044id="L1630" clas2344ine" na23="L1630" c>30"/a> *ctx239"+code=uppf_event_coread_valuec> *perf_event_coread_valuehed_ief="kdivisorctxsubass="sref">ctxctxlocal64_xnablerent_ntna>)
30"/a>       24="L>241  "L>2cal64_sefvent"aread_formacef">ctxlocal64_=Lad_formacent_ sctx"osk"  64 code=coPATEvFORMAT_IDef">ctxlocal64_PATEvFORMAT_IDhe/a>a href="ke*d         *core.c#L163046id="L1630" clas2346ine" na23="L1630" c>30"/a>
16time *ctx239"+code=upprimaryvent_coidc> *perrimaryvent_coidhed_ief="kdivisorctxsubass="sref">ctxa>)
30"/a>       24""L>240/events/core.c#L1630"8id="L1630" clas2348ine" na23="L1630" c>30"/a>{
ctxpeu6/a>a>)
30"9a>       24""L>240/events/core.c#L16305 id="L1630" clas235line" na23="L1530" c>30" a>       24="L>241  "L>2cal64_sefvent"acopy_to_us rass="sref">ctxctbufhe/a +ref="kdivisorctx"L>ef">ctxlocal64_=Lvent_ntext_time * *pesizehe/a>> sample_> *iop/eve_e>
30"/a>ef">ctxlocal64_=Lvent_ hr-#L1608" id="L16EFAULTclass="sref">ctEFAULTts/ca>)
30"/a>30"/a>{
30"/a>  >)
30"/a>       24="L>241  424ctx"+code=pe"L>ef">ctxlocal64_=Lvent_ +href="kdivisorctxsizec> *pesizehe/aa>)
30"/a>       23= 6     6      struc}ts/core.c#L163057id="L1630" clas23=7ine" na23="L1530" c>30"/a>  #L1608" id="L16un_time_from*30"8a>ctx-&ore.c#L1608" id="L16muxt<"sref">m> *iop_muxta>)
30"9a>       24""L>240/events/core.c#L16306 id="L1630" clas236line" na23="L1530" c>30" a>239"+code=up"L>ef">ctxlocal64_=Lvent_a>)
30"/a>30"/a>240/events/core.c#L153063id="L1630" clas2363ine" na23="L1530" c>30"3a>perf_event_coread_onehed_i"L>242   6     6   =perf_event_context" cl * *ctx hrefvent_npan c24""L>240/events/core.c#L153064id="L1630" clas2364ine" na23="L1530" c>30"/a>peu6/a>ctxlocal64_=Lad_formacent_ntcharp_inctx<__us rched_in *ctbufhe/a>a href="ke*d         *core.c#L163065id="L1630" clas2365ine" na23="L1530" c>30"5a>{
sample_> *iop/eve_e>
30"/a>       23="L>2396+code=lou" clas2364ief_>peu6/a>ctxlocal64_xnablerent_ntext_time)
30"/a>peu6/a> *)
30"/a>{
ctx)
30"9a>       24""L>240/events/core.c#L16307 id="L1630" clas237line" na23="L1530" c>30" a>       24=  6     6   =pevaluesctx> *ctx239"+code=uppf_event_coread_valuec> *perf_event_coread_valuehed_ief="kdivisorctxx" class="sref">ctx hrefvent_ntnctxlocal64_xnablerent_ntna>)
30"1a>{
ctxlocal64_=Lad_formacent_ sctx"osk"  64 code=coPATEvFORMAT_TOTAL_TIME_ENABLEDef">ctxlocal64_PATEvFORMAT_TOTAL_TIME_ENABLEDhe/a>a href="ke*d         *core.c#L163072id="L1630" clas2372ine" na23 the 30" c>30"/a> *ctx239"+code=upenableref">ctxlocal64_xnablerent_a>)
30"3a>{
ctxlocal64_=Lad_formacent_ sctx"osk"  64 code=coPATEvFORMAT_TOTAL_TIME_RUNNINGctx> *a href="ke*d         *core.c#L163074id="L1630" clas23=4ine" na23="L1530" c>30"/a> *ctx239"+code=uprunningontext" cl *)
30"5a>{
ctxlocal64_=Lad_formacent_ sctx"osk"  64 code=coPATEvFORMAT_IDef">ctxlocal64_PATEvFORMAT_IDhe/a>a href="ke*d         *core.c#L163076id="L1630" clas2376ine" na23="L1530" c>30"/a>
16time *ctx239"+code=upprimaryvent_coidc> *perrimaryvent_coidhed_ief="kdivisorctxx" class="sref">ctx hrefvent_>a>)
30"/a>       24""L>240/events/core.c#L163078id="L1630" clas2378ine" na23="L1530" c>30"/a>{
ctxctbufhe/antext_time *ctxpeu6/a>>>pan c24""L>240/events/core.c#L153079id="L1630" clas2379ine" na23="L1530" c>30"/a>       22="L>228= "L>238 -#L1608" id="L16EFAULTclass="sref">ctEFAULTts/ca>)
30" a>       24""L>240/events/core.c#L163081id="L1630" clas2381ine" na23="L1530" c>30"/a>ctxpeu6/a>a>)
30"2a>{
 6     6      struc}ts/core.c#L1630"3id="L1630" clas2383ine" na23="L1530" c>30"/a>       24="L>241ref6"+cod6=ctx" 163084id="L1630" clas2384ine" na23="L1530" c>30"/a>30"/a>
30"/a>30"7a>       24="L>241ref6"+cod6=ctx" 163088id="L1630" clas2388ine" na23="L1530" c>30"8a>  #L1608" id="L16rf_evread_hwc> *perf_evread_hwhed_i"L>242   6     6   =perf_event_context" cl * *ctx hrefvent_ntcharp_inctx<__us rched_in *ctbufhe/antext_time  r"L>239"+code=upntu_cef">ctxlocal64_ntu_cent_>pan c24""L>240/events/core.c#L153089id="L1630" clas2389ine" na23="L1530" c>30"/a>  sample_> *iop/eve_e>
30" a>peu6/a>ctxlocal64_=Lad_formacent_ hrcal64_sefvent"aerefvass="sref">ctx hrefvent_sched_inctxctxlocal64_=Lad_formacent_a>)
30"1a>{
ef">ctxlocal64_=Lvent_a>)
30"/a>240/events/core.c#L153093id="L1630" clas2393ine" na23="L1530" c>30"/a>       23="an c24="L>243/ev6nts//
30"/a>228= * RL>238 end-of-fief eor a =Lad on a=    * tha/ is i hepan>
30"/a>228= * error a hre (i.e. becaus >i/ was pinned but>i/ ntuldn't behepan>
30"/a>30"/a>  hL>2432  6     6   l *c66    */*/span>
30"/a>{
ctx hrefvent_sched_inctxlocal64_PATEvEVENT_STATE_ERRORent_>pan c24""L>240/events/core.c#L153099id="L1630" clas2399ine" na23="L1530" c>30"/a>       22="L>228= "L>238 0a>)
310 a>       24""L>240/events/core.c#L1631"1id="L1631" clas2391ine" na23="L1531" c>3101a>{
ctxlocal64_ntu_cent_ <"osk"  64 code=coerefvass="sref">ctx hrefvent_sched_in *pe=Lad_sizeent_>pan c24""L>240/events/core.c#L1531"2id="L1631" clas2392ine" na23="L1531" c>310/a>238 -#L1608" id="L16ENOSPCclass="sref">ctENOSPCent_a>)
310/a>       24="L>241ref6"+cod6=ctx" 1631"4id="L1631" clas2394ine" na23="L1531" c>31"/a>ctx hrefvent_sched_ina>)
3105a>{
ctxlocal64_=Lad_formacent_ sctx"osk"  64 code=coPATEvFORMAT_GROUPef">ctxlocal64_PATEvFORMAT_GROUPent_>pan c24""L>240/events/core.c#L1531"6id="L1631" clas2396ine" na23="L1531" c>310/a>
16timeef">ctxlocal64_=Lvent_ hrext_time * *ctx hrefvent_nt_inctxlocal64_=Lad_formacent_ntn *ctbufhe/a>a>)
31"/a>)
310/a>{
ef">ctxlocal64_=Lvent_ hrext_timeperf_event_coread_onehed_in *ctx hrefvent_nt_inctxlocal64_=Lad_formacent_ntn *ctbufhe/a>a>)
3109a>       24""L>240/events/core.c#L16311 id="L1631" clas241line" na24="L1631" c>311 a>239"+code=up"L>ef">ctxlocal64_=Lvent_a>)
311/a>31"/a>240/events/core.c#L1531"3id="L1631" clas24=3ine" na24="L1631" c>31"3a>       24="L>241ref6"+cod6=ctx" 1631"4id="L1631" clas24=4ine" na24="L1631" c>31"/a>242   6     6   =pefiefctx> *perf_ectfiefctx> *ctx<__us rched_in *ctbufhe/antext_time  r"L>239"+code=upntu_cef">ctxlocal64_ntu_cent_ntext_time * *pan c24""L>240/events/core.c#L1531"5id="L1631" clas2415ine" na24="L1631" c>31"5a>{
sample_> *iop/eve_e>
31"/a>       23="L>242   6     6   =perf_event_context" cl * *ctx hrefvent_ hrext_time *311/a>       24""L>240/events/core.c#L163118id="L1631" clas24=8ine" na24="L1631" c>31"8a>239"+code=uprf_evread_hwc> *perf_evread_hwhed_in *ctx hrefvent_nt_inctbufhe/antext_timectxlocal64_ntu_cent_>a>)
311/a>   6     6      struc}ts/core.c#L16312 id="L1631" clas242line" na24="L1631" c>312 a>       24""L>240/events/core.c#L163121id="L1631" clas24=1ine" na24="L1631" c>312/a>242   6     6   =pefiefctx> *perf_ectfiefctx> *perf_ectwaivass="sref">ctx waivent_>pan c24""L>240/events/core.c#L153122id="L1631" clas24=2ine" na24="L1631" c>312/a> *iop/eve_e>
31"/a>       23="L>242   6     6   =perf_event_context" cl * *ctx hrefvent_ hrext_time *3124a>       23="L>242   6     6   =perfor_buff rass="sref">ctx *ctx)
31"/a>       24=unsigned "dddddddddddddddddd_nts/cass="sref">ctx hrefvsent_ hrext_timectxlocal64_POLL_HUPts/ca>)
312/a>)
31"/a>243/ev6nts//
312/a>{
hL>2432  6     6   l *c66    */* Race between=hrefvent_s_set_output()sandshrefvpolv():shrefvpolv()span>
312/a>  hL>2432  6     6   l *c66    */* grabsmehrefvent_s_set_output()soverrides i/a similar magnitudenel/events/core.c#L16313 id="L1631" clas243line" na24="L1631" c>313/a>       24="L>242lent"> *       */* H re is e313/a>         * * t0: T1, rb== rcuode"Lf rence(ents/ore.crb)span>
31"/a>         * * t1: T2, old_rb== ents/ore.crbspan>
31"/a>  pan c23="L>233ment">         * * t2: T2, ents/ore.crb== new rbspan>
313/a>228= * t3: T2, rfor_buff rodetach(old_rb)span>
313/a>228= * t4: T1, rfor_buff roattach(rb1)span>
313/a>313/a>  hL>2432  6     6   l *c66    */*span>
313/a>{
hL>2432  6     6   l *c66    */* To avoidme
313/a>  hL>2432  6     6   l *c66    */* e
314/a>       24="L>242lent"> *       */* andse
314/a>         * */span>
3142a>ctxlocal64_muxt<__timhed_inctx hrefvent_sched_inctxlocal64_mmapomuxta>)
31"/a>       24="L>241ref6"+cod6=ctx" 163144id="L1631" clas2344ine" na23="L1631" c>314/a>ctxlocal64_rcuoread__timhed_i>a>)
31"/a>       24=n *ctx239"+code=uprcuode"Lf renceef">ctxlocal64_rcuode"Lf rencehed_ief="kdivisorctxx" class="sref">ctx hrefvent_sched_inctxa>)
314/a>       23="L>2cal64_sefvent"arbass="sref">ctx sample_> *iop/eve_e>
314/a>16timectx *ctx hrefvent_nt_inctxa>)
31"/a>{
ctx hrefvsent_ hrext_timectxa>)
314/a>       22= 6     6      struc}ts/core.c#L16315 id="L1631" clas235line" na23="L1531" c>315 a>a>)
315/a>3152a>ctx hrefvent_sched_inctxlocal64_mmapomuxta>)
315/a>       24="L>241ref6"+cod6=ctx" 163154id="L1631" clas2354ine" na23="L1531" c>315/a>perf_ectfiefctx> *ctx hrefvent_sched_inctx waivqent_nt_inctx waivent_>a>)
315/a>       24""L>240ment"ts/core.c#L153156id="L1631" clas23=6ine" na23="L1531" c>31"/a>       23="L>238 "L>239"+code=up_nts/cass="sref">ctx hrefvsent_a>)
31"/a>   6     6      struc}ts/core.c#L163158id="L1631" clas2358ine" na23="L1631" c>315/a>31"9a>  a hre24voidmext_timeef">ctxlocal64_pf_event_coresL>hed_i"L>242   6     6   =perf_event_context" cl * *ctx hrefvent_>pan c24""L>240/events/core.c#L15316 id="L1631" clas236line" na23="L1531" c>31" a> *iop/eve_e>
3161a>{
perf_event_coreadhed_in *ctx hrefvent_>a>)
3162a>ef">ctxlocal64_local64_sL>hed_inctx hrefvent_sched_inctxlocal64_ntu_cent_nt0>a>)
316/a>       23="L>239"+code=uprf_event_coupdate_us rpageid *perf_event_coupdate_us rpagehed_in *ctx hrefvent_>a>)
316/a>316/a>       24""L>240ment"ts/core.c#L153166id="L1631" clas2366ine" na23="L1531" c>316/a>316/a>  hL>2432  6     6   l *c* Holdforme
316/a>{
hL>2432  6     6   l *c* descendant processme
316/a>  hL>2432  6     6   l *c* "dssync_chilro    * "L>it goes eo exit,me
317/a>       24="L>242lent"> * * task existence=requirent">s of rf_event_coxnable/disablea similar magnitudenel/events/core.c#L163171id="L1631" clas2371ine" na23="L1531" c>317/a>   */span>
31"/a>ctxlocal64_pf_event_cofor_each_chilrhed_i"L>242   6     6   =perf_event_context" cl * *ctx hrefvent_npan c24""L>240/events/core.c#L153173id="L1631" clas2373ine" na23="L1531" c>317/a>{
242   6     6   =perf_event_context" cl *>pan c24""L>240/events/core.c#L153174id="L1631" clas23=4ine" na23="L1531" c>31"/a> *iop/eve_e>
31"5a>{
 *ctxlocal64_chilrts/ca>)
317/a>)
317/a>ctx hrefvent_sched_ina>)
3178a>ctxlocal64_muxt<__timhed_inctx hrefvent_sched_inm> *iop_chilromuxta>)
317/a>ctx hrefvent_>a>)
318 a>ctx li6t_for_each_efvryhed_in *ctxlocal64_chilrts/c, nctx hrefvent_sched_inpan c24""L>240/events/core.c#L153181id="L1631" clas2381ine" na23="L1531" c>318/a>242=  * *ctxlocal64_chilrts/c>a>)
3182a>ctx hrefvent_sched_inm> *iop_chilromuxta>)
31"/a>   6     6      struc}ts/core.c#L163184id="L1631" clas2384ine" na23="L1531" c>318/a>  >)
31"/a>ctxlocal64_pf_event_cofor_eachhed_i"L>242   6     6   =perf_event_context" cl * *ctx hrefvent_npan c24""L>240/events/core.c#L1531"6id="L1631" clas2386ine" na23="L1531" c>318/a>
242   6     6   =perf_event_context" cl *>pan c24""L>240/events/core.c#L1531"7id="L1631" clas2387ine" na23="L1531" c>31"7a> *iop/eve_e>
3188a> *perf_event_context *perf_ectx" class="sref">ctx-& href="kdivisorctxx" class="sref">ctx hrefvent_sched_in)
3189a> *)
319 a>       24""L>240/events/core.c#L163191id="L1631" clas2391ine" na23="L1531" c>3191a>3192a>ctxlocal64_muxt<__timhed_inctx-&ore.c#L1608" id="L16muxt<"sref">m> *iop_muxta>)
319/a>       23="L>239"+code=upx" class="sref">ctx hrefvent_ href="kdivisorctxx" class="sref">ctx hrefvent_sched_inctx)
319/a>  >)
319/a>       24=n *ctxlocal64_pf_event_cofor_each_chilrhed_in *ctx hrefvent_nt_in *a>)
319/a>       23="L>2396+code=loli6t_for_each_efvryass="sref">ctx li6t_for_each_efvryhed_in *ctx hrefvent_sched_inctx groupvefvryent_>>)
319/a>16timectxlocal64_pf_event_cofor_each_chilrhed_in * *a>)
3198a>ctx-&ore.c#L1608" id="L16muxt<"sref">m> *iop_muxta>)
319/a>   6     6      struc}ts/core.c#L1632" id="L1632" idas2399ine" na23="L1532" i>320 a>       24""L>240/events/core.c#L1632"1id="L1632" clas2391ine" na23="L1532" c>320/a>ctxlocal64_pf_event_copf_iorhed_i"L>242   6     6   =perf_event_context" cl * *ctx hrefvent_n=_inpeu6/a>ctx<__us rched_in *>)
320/a> *iop/eve_e>
320/a>       23="L>242   6     6   =perf_event_context" c> *perf_event_context *perf_ectx" class="sref">ctx-& href="kdivisorctxx" class="sref">ctx hrefvent_sched_in)
32"/a>ef">ctxlocal64_=Lvent_ hr0a>)
320/a>       24=n *peu6/a>pevaluehed_a>)
320/a>)
32"/a>ctx is_s *ctx hrefvent_>>>)
320/a>{
238 -#L1608" id="L16EINVALass="sref">ctx EINVALhed_a>)
3209a>       24""L>240/events/core.c#L16321 id="L1632" clas241line" na24="L1632" c>321 a>ctxpevaluehed_n=_inpevaluehed_>>>pan c24""L>240/events/core.c#L1532"1id="L1632" clas24=1ine" na24="L1632" c>321/a>238 -#L1608" id="L16EFAULTclass="sref">ctEFAULTts/ca>)
32"/a>240/events/core.c#L1532"3id="L1632" clas24=3ine" na24="L1632" c>3213a>{
pevaluehed_>pan c24""L>240/events/core.c#L1532"4id="L1632" clas24=4ine" na24="L1632" c>321/a>ctx EINVALhed_a>)
321/a>       24""L>240ment"ts/core.c#L1532"6id="L1632" clas24=6ine" na24="L1632" c>321/a>       23="L>2396+code=loraw_spin__tim_irqass="sref">ctx raw_spin__tim_irqhed_inctx-&ore.c#L1608" id="L16_time_from*a>)
321/a>ctx hrefvent_sched_inctxctx freqhed_> sample_> *iop/eve_e>
321/a>{
2ef="kdivisorctxvalueclas2364ief_>pevaluehed_ chedtext_time sample_> *iop/eve_e>
321/a>       22="L>228=      23="L>2396+code=lorL>ef">ctxlocal64_=Lvent_ hr-#L1608" id="L16EINVALass="sref">ctx EINVALhed_a>)
322 a>       24="L>241          goto="L>242= )
322/a>322/a>240/events/core.c#L153223id="L1632" clas24=3ine" na24="L1632" c>322/a>{
ctx hrefvent_sched_inctxctx s-& href="kdivisorctxvalueclas2364ief_>pevaluehed_a>)
3224a>       23=}=else sample_> *iop/eve_e>
32"/a>       24="L>237ucef="kdivisorctxx" class="sref">ctx hrefvent_sched_inctxctxlocal64_s-& href="kdivisorctxvalueclas2364ief_>pevaluehed_a>)
322/a>
16timectx hrefvent_sched_in *pehwhed_._inctxlocal64_s-& href="kdivisorctxvalueclas2364ief_>pevaluehed_a>)
32"/a>3228a>  #L1608" id="L16un_time_from*322/a>ctx raw_spin_un_tim_irqhed_inctx-&ore.c#L1608" id="L16_time_from*a>)
323 a>       24""L>240/events/core.c#L163231id="L1632" clas2431ine" na24="L1632" c>323/a>ef">ctxlocal64_=Lvent_a>)
3232a>{
 6     6      struc}ts/core.c#L163233id="L1632" clas2433ine" na24="L1632" c>323/a>       24="L>241ref6"+cod6=ctx" 163234id="L1632" clas2434ine" na24="L1632" c>323/a>ctx fief_opf_hreonsa> *)
323/a>       24""L>240ment"ts/core.c#L153236id="L1632" clas2436ine" na24="L1632" c>323/a>242   6     6   =pefiefctx> *perf_ectprefvfget_ligh c> *perf_evfget_ligh hed_i"ddddddddddddddddddfref">ctxlocal64_frts/c, "ddda href_>perf_ectfput_neederef">ctxlocal64_fput_neederhed_>pan c24""L>240/events/core.c#L153237id="L1632" clas24rgeel/even4="L1632" c>3237a> *iop/eve_e>
3238a>3239a>       24""L>240/events/core.c#L16324 id="L1632" clas234line" na23="L1632" c>324 a> * *pefget_ligh hed_idddddddddddddddfref">ctxlocal64_frts/c,  href_>perf_ectfput_neederef">ctxlocal64_fput_neederhed_>a>)
3241a>{
 *pan c24""L>240/events/core.c#L153242id="L1632" clas2342ine" na23="L1632" c>324/a>238 #L1608" id="L16ERR_PTRef">ctxlocal64_ERR_PTRhed_i-#L1608" id="L16EBADFef">ctxlocal64_EBADFhed_>a>)
32"/a>       24="L>241ref6"+cod6=ctx" 163244id="L1632" clas2344ine" na23="L1632" c>324/a> * * sample_> *iop/eve_e>
324/a>       24="L>237ucef="kdivisorctxfput_ligh c> *pefput_ligh hed_idddddddddddddddfiefctx> *perf_ectfput_neederef">ctxlocal64_fput_neederhed_>a>)
324/a>
ctxlocal64_fput_neederhed_ hr0a>)
324/a>238 #L1608" id="L16ERR_PTRef">ctxlocal64_ERR_PTRhed_i-#L1608" id="L16EBADFef">ctxlocal64_EBADFhed_>a>)
32"/a>{
3249a>       24""L>240/events/core.c#L16325 id="L1632" clas235line" na23="L1532" c>325 a>239"+code=upfiefctx> *)
325/a>325/a>240/events/core.c#L153253id="L1632" clas2353ine" na23="L1532" c>3253a> *perf_event_coset_outputhed_i"L>242   6     6   =perf_event_context" cl * *ctx hrefvent_npan c24""L>240/events/core.c#L153254id="L1632" clas2354ine" na23="L1532" c>325/a> *a>)
3255a>ctx242   6     6   =perf_event_context" cl * *ctx hrefvent_n4voidmext_timectx<__us rched_in *a>)
325/a>)
3257a>242   6     6   =pefiefctx> *perf_ectfiefctx> *ctxlocal64_cmdhe/antunsigned long   6     6   =peargontext" cl *>)
325/a> *iop/eve_e>
3259a> *ctx hrefvent_ href="kdivisorctxfiefctx> *326 a>perf_ectfuncctx> *i"L>242   6     6   =perf_event_context" cl *a>)
3261a>{
ref="kdivisorctxflagsass="sref">ctx flagsent_ href="kdivisorctxargontext" cl *)
326/a>240/events/core.c#L153263id="L1632" clas2363ine" na23="L1532" c>326/a>       23=switch>2cal64_sefvent"acmref">ctxlocal64_cmdhe/a> sample_> *iop/eve_e>
326/a>326/a>       24="L>237ucef="kdivisorctxfuncctx> *ctx)
326/a>
3267a>326/a>{
ctx)
326/a>       22="L>228= breaka>)
3270a>ctPATEvEVENT_IOC_RESEThed_:6     6      struc}ts/core.c#L163271id="L1632" clas2371ine" na23="L1532" c>327/a>242=  *ef">ctxlocal64_pf_event_coresL>hed_a>)
327/a>)
327/a>       24="L>241ref6"+cod6=ctx" 163274id="L1632" clas23=4ine" na23="L1532" c>327/a>ctPATEvEVENT_IOC_REFRESHhed_:6     6      struc}ts/core.c#L163275id="L1632" clas2375ine" na23="L1532" c>327/a>       24="L>237uc"L>238 "L>239"+code=uprf_event_corefreshef">ctxlocal64_pf_event_corefreshhed_idddddddddddddddx" class="sref">ctx hrefvent_n=_ina>)
327/a>)
3277a>ctPATEvEVENT_IOC_PATIODhed_:6     6      struc}ts/core.c#L163278id="L1632" clas2378ine" na23="L1532" c>327/a>{
238 "L>239"+code=uprf_event_copf_ioref">ctxlocal64_pf_event_copf_iorhed_idddddddddddddddx" class="sref">ctx hrefvent_n=idddddddddddddddu" clas2364ief_>peu6/a>ctx<__us rched_i)ext_timea>)
3279a>       24""L>240/events/core.c#L16328 id="L1632" clas238line" na23="L1532" c>3280a>ctPATEvEVENT_IOC_SET_OUTPUThed_:6     6      struc}ts/core.c#L163281id="L1632" clas2381ine" na23="L1532" c>328/a> *iop/eve_e>
328/a>242   6     6   =pefiefctx> *perf_ectoutputvfiefctx> *ctx NULLhed_a>)
328/a>{
242   6     6   =perf_event_context" cl * *ctx NULLhed_a>)
328/a>ctxlocal64_fput_neederhed_ hr0a>)
328/a>       24="L>237uc"dddddddddddddddddd"L>ef">ctxlocal64_=Lvent_a>)
328/a>)
328/a>2ef="kdivisorctxargontext" cl * sample_> *iop/eve_e>
328/a>{
ctxlocal64_fput_neederhed_>a>)
328/a>       22="L>228=      23="L>2ef="kdivisorctxIS_ERRef">ctxlocal64_IS_ERRhed_ief="kdivisorctxoutputvfiefctx> *>pan c24""L>240/events/core.c#L15329 id="L1632" clas239line" na23="L1532" c>329 a>       24="L>241                  "L>238 "L>239"+code=upPTR_ERRef">ctxlocal64_PTR_ERRhed_ief="kdivisorctxoutputvfiefctx> *a>)
329/a> *329/a>329/a>       24="L>241ref6"+cod6=ctx" 163294id="L1632" clas2394ine" na23="L1532" c>329/a>ef">ctxlocal64_=Lvent_ hrext_time *perf_event_coset_outputhed_idddddddddddddddx" class="sref">ctx hrefvent_n=_ina>)
329/a>       24="L>237uc"L>2ef="kdivisorctxoutputvent_context" cl *>)
329/a>
 *pefput_ligh hed_idddddddddddddddoutputvfiefctx> *perf_ectfput_neederef">ctxlocal64_fput_neederhed_>a>)
329/a>       24""L>240/events/core.c#L163298id="L1632" clas2398ine" na23="L1532" c>329/a>{
238 "L>239"+code=up"L>ef">ctxlocal64_=Lvent_a>)
329/a>       22= 6     6      struc}ts/core.c#L1633" id="L1633" idas2399ine" na23="L1533" i>330 a>       24""L>240/events/core.c#L1633"1id="L1633" clas2391ine" na23="L1533" c>330/a>ctxlocal64_PATEvEVENT_IOC_SET_FILTERhed_:6     6      struc}ts/core.c#L1633"2id="L1633" clas2392ine" na23="L1533" c>330/a>238 #L1608" id="L16pf_event_coset_xiet rass="sref">ctxctx hrefvent_n=ivoidmext_timectx<__us rched_i)ext_timea>)
330/a>       24="L>241ref6"+cod6=ctx" 1633"4id="L1633" clas2394ine" na23="L1533" c>33"/a>330/a>       24="L>237uc"L>238 -#L1608" id="L16ENOTTYontext" cl *)
3306a>       22= 6     6      struc}ts/core.c#L1633"7id="L1633" clas2397ine" na23="L1533" c>330/a>       24""L>240/events/core.c#L1633"8id="L1633" clas2398ine" na23="L1533" c>330/a>{
ctx flagsent_ nctxlocal64_PATEvIOC_FLAG_GROUPhed_>>)
330/a>       22="L>228= #L1608" id="L16pf_event_cofor_eachef">ctxlocal64_pf_event_cofor_eachhed_idddddddddddddddx" class="sref">ctx hrefvent_n=_in *a>)
331 a>)
331/a>ctxlocal64_pf_event_cofor_each_chilrhed_in *ctx hrefvent_nt_in *a>)
33"/a>240/events/core.c#L1533"3id="L1633" clas24=3ine" na24="L1633" c>3313a>{
331/a>331/a>       24""L>240ment"ts/core.c#L1533"6id="L1633" clas24=6ine" na24="L1633" c>331/a>  "ddddddddddddddddddpf_event_cotaskoxnableass="sref">ctx240ment"ts/core.c#L1533"7id="L1633" clas24=7ine" na24="L1633" c>3317a> *iop/eve_e>
3318a> *ctx hrefvent_a>)
3319a>       24""L>240/events/core.c#L16332 id="L1633" clas242line" na24="L1633" c>332 a>ctxlocal64_muxt<__timhed_inctx xurr clent_ore.c#L1608" id="L16pf_event_comuxt<"sref">m> *iop_pf_event_comuxta>)
3321a>ctx li6t_for_each_efvryhed_in *ctx hrefvent_ntnctx xurr clent_ore.c#L1608" id="L16pf_event_coli6tontext" cl *ctx owner_efvryhed_>>)
332/a>ctxlocal64_pf_event_cofor_each_chilrhed_in *ctx hrefvent_nt_inctxa>)
332/a>       23="L>239"+code=upmuxt<_un_time_from*ctx xurr clent_ore.c#L1608" id="L16pf_event_comuxt<"sref">m> *iop_pf_event_comuxta>)
332/a>  >)
33"/a>       24="L>238 0a>)
332/a>
< 6     6      struc}ts/core.c#L1633"7id="L1633" clas2427ine" na24="L1633" c>332/a>       24""L>240/events/core.c#L163328id="L1633" clas24=8ine" na24="L1633" c>3328a>  "ddddddddddddddddddpf_event_cotaskodisableass="sref">ctx240ment"ts/core.c#L153329id="L1633" clas24=9ine" na24="L1633" c>332/a> *iop/eve_e>
3330a> *ctx hrefvent_a>)
333/a>3332a>ctxlocal64_muxt<__timhed_inctx xurr clent_ore.c#L1608" id="L16pf_event_comuxt<"sref">m> *iop_pf_event_comuxta>)
333/a>       23="L>239"+code=upli6t_for_each_efvryass="sref">ctx li6t_for_each_efvryhed_in *ctx hrefvent_ntnctx xurr clent_ore.c#L1608" id="L16pf_event_coli6tontext" cl *ctx owner_efvryhed_>>)
333/a>ctxlocal64_pf_event_cofor_each_chilrhed_in *ctx hrefvent_nt_inctxa>)
333/a>       24=n *ctx xurr clent_ore.c#L1608" id="L16pf_event_comuxt<"sref">m> *iop_pf_event_comuxta>)
333/a>)
3337a>       24="L>238 0a>)
3338a>3339a>       24""L>240/events/core.c#L16334 id="L1633" clas234line" na23="L1633" c>334 a>m> *iop_pf_event_coindt242   6     6   =perf_event_context" cl * *ctx hrefvent_>pan c24""L>240/events/core.c#L153341id="L1633" clas2341ine" na23="L1633" c>3341a>{
sample_> *iop/eve_e>
334/a>ctx hrefvent_sched_in *pehwhed_._inctPATEvHES_STOPPEDent_>pan c24""L>240/events/core.c#L153343id="L1633" clas2343ine" na23="L1633" c>334/a>{
238 0a>)
334/a>  >)
334/a>       24="L>2ef="kdivisorctxx" class="sref">ctx hrefvent_sched_inpan c24""L>240/events/core.c#L153346id="L1633" clas2346ine" na23="L1633" c>334/a>
238 0a>)
334/a>       24""L>240/events/core.c#L163348id="L1633" clas2348ine" na23="L1633" c>33"/a>{
ctx hrefvent_sched_inm> *iop_ent_coid *ctx hrefvent_>a>)
334/a>   6     6      struc}ts/core.c#L16335 id="L1633" clas235line" na23="L1533" c>335 a>       24""L>240/events/core.c#L163351id="L1633" clas2351ine" na23="L1533" c>335/a>ctx calc_timer_valueshed_i"L>242   6     6   =perf_event_context" cl * *ctx hrefvent_npan c24""L>240/events/core.c#L153352id="L1633" clas2352ine" na23="L1533" c>335/a>peu6/a> * *penowent_npan c24""L>240/events/core.c#L153353id="L1633" clas2353ine" na23="L1533" c>335/a>{
peu6/a> *ctxlocal64_xnablerent_npan c24""L>240/events/core.c#L153354id="L1633" clas2354ine" na23="L1533" c>335/a>peu6/a> *pan c24""L>240/events/core.c#L153355id="L1633" clas23=5ine" na23="L1533" c>3355a> *iop/eve_e>
335/a>       23="L>2396+code=lou" clas2364ief_>peu6/a>ctx ctx_timeent_a>)
335/a>       24""L>240/events/core.c#L163358id="L1633" clas2358ine" na23="L1633" c>335/a>{
 * *penowent_ hrext_timea>)
335/a>ctx ctx_timeent_ href="kdivisorctxx" class="sref">ctx hrefvent_sched_inctx shadow_ctx_timeent_ +=in * *penowent_a>)
336 a> *ctxlocal64_xnablerent_ href="kdivisorctxctx_timeass="sref">ctx ctx_timeent_ -ref="kdivisorctxx" class="sref">ctx hrefvent_sched_inctxlocal64_ta hmp_xnablerent_a>)
3361a> *ctx ctx_timeent_ -ref="kdivisorctxx" class="sref">ctx hrefvent_sched_in)
3362a>{
 6     6      struc}ts/core.c#L163363id="L1633" clas2363ine" na23="L1533" c>336/a>       24="L>241ref6"+cod6=ctx" 163364id="L1633" clas2364ine" na23="L1533" c>336/a>ctx arch_hrefvupdate_us rpagehed_i"L>242   6     6   =perf_event_c_mmap_pageass="sref">ctx rf_event_c_mmap_pagea> *peu6/a> *penowent_>pan c24""L>240/events/core.c#L153365id="L1633" clas2365ine" na23="L1533" c>3365a> *iop/eve_e>
336/a>
< 6     6      struc}ts/core.c#L163367id="L1633" clas2367ine" na23="L1533" c>336/a>       24""L>240/events/core.c#L163368id="L1633" clas2368ine" na23="L1533" c>336/a>{
/*240/events/core.c#L163369id="L1633" clas2369ine" na23="L1533" c>336/a>   * Callers need to ensure there canlbe no neste"g of this xuncreon, otherwise240/events/core.c#L16337 id="L1633" clas237line" na23="L1533" c>3370a> * the seq_tim loge24goes bad. We canlnot serialize this becaus  the arch240/events/core.c#L163371id="L1633" clas2371ine" na23="L1533" c>337/a> * ctx" calls this xrom NMI ntext240/events/core.c#L163372id="L1633" clas2372ine" na23 the 33" c>337/a> */240/events/core.c#L163373id="L1633" clas2373ine" na23="L1533" c>337/a>  voidmext_timectx rf_event_c_update_us rpagehed_i"L>242   6     6   =perf_event_context" cl * *ctx hrefvent_>pan c24""L>240/events/core.c#L153374id="L1633" clas23=4ine" na23="L1533" c>337/a> *iop/eve_e>
337/a>       24="L>242   6     6   =perf_event_c_mmap_pageass="sref">ctx rf_event_c_mmap_pagea> *)
3376a>       24="L>242   6     6   =pere"gobuff rass="sref">ctx *ctx)
3377a>peu6/a>ctxlocal64_xnablerent_n   6     6   =perunne"gontext" cl * *penowent_a>)
337/a>{
>)
337/a>ctxlocal64_rcu_read__timhed_i>a>)
3380a>/*240/events/core.c#L163381id="L1633" clas2381ine" na23="L1533" c>338/a> pan c24=i ntmput  total_time_xnabler, total_time_runne"genspan      24""L>240/events/core.c#L163382id="L1633" clas2382ine" na23="L1533" c>338/a> pan c24=i based on snapshot values taken when the hrefvenspan      24""L>240/events/core.c#L163383id="L1633" clas2383ine" na23="L1533" c>338/a>{
 pan c24=i was s23t scheduled "d.240/events/core.c#L1633"4id="L1633" clas2384ine" na23="L1533" c>338/a> pan c24=i240/events/core.c#L1633"5id="L1633" clas2385ine" na23="L1533" c>338/a>   pan c24=i we cannot simply called update_ntext240/events/core.c#L1633"6id="L1633" clas2386ine" na23="L1533" c>338/a> pan c24=i becaus  of _time"g issue as we canlbe called in240/events/core.c#L1633"7id="L1633" clas2387ine" na23="L1533" c>338/a> pan c24=i NMI ntext240/events/core.c#L1633"8id="L1633" clas2388ine" na23="L1533" c>338/a>{
 pan c24=i/240/events/core.c#L1633"9id="L1633" clas2389ine" na23="L1533" c>338/a>ctx calc_timer_valueshed_in *ctx hrefvent_ntn *penowent_ntnctxlocal64_xnablerent_n na>)
339 a>ctxctx rcu_deref rencehed_in *ctx hrefvent_sched_inctxa>)
3391a>{
ctx>)
339/a>339/a>       24="L>241ref6"+cod6=ctx" 163394id="L1633" clas2394ine" na23="L1533" c>339/a> *ctxctx us r_pagehed_a>)
339/a>       24""L>240ment"ts/core.c#L1533"6id="L1633" clas2396ine" na23="L1533" c>339/a>
/*240/events/core.c#L163397id="L1633" clas2397ine" na23="L1533" c>339/a> pan c24=i Disable preempreon so as to=not let the re.responde"g us r-space240/events/core.c#L163398id="L1633" clas2398ine" na23="L1533" c>339/a>{
 pan c24=i spin too long "L>we get preempred.240/events/core.c#L163399id="L1633" clas2399ine" na23="L1533" c>339/a>   pan c24=i/240/events/core.c#L1634" id="L1634" idas2399ine" na23="L1534" i>340 a>ctxa>)
340/a> *3402a>ctxa>)
340/a>       23="L>239"+code=upus rpgontext" cl *m> *iop_indtm> *iop_pf_event_coindt *ctx hrefvent_>a>)
340/a> *ctxlocal64_offsL>hed_ hrext_time *ctx hrefvent_>a>)
340/a>       24="L>2ef="kdivisorctxus rpgontext" cl *m> *iop_indt>)
340/a>
16timectxlocal64_offsL>hed_ -hrext_timectx hrefvent_sched_in *pehwhed_._ina>)
340/a>       24""L>240/events/core.c#L1634"8id="L1634" clas2398ine" na23="L1534" c>340/a>{
16timectxlocal64_xnablerent_ +     24""L>240/events/core.c#L1634"9id="L1634" clas2399ine" na23="L1534" c>340/a>       22="L>228= 16timectx hrefvent_sched_inctx chilr_total_time_xnablerent_>a>)
341 a>       24""L>240/events/core.c#L163411id="L1634" clas24=1ine" na24="L1634" c>3411a>240/events/core.c#L163412id="L1634" clas24=2ine" na24="L1634" c>341/a>16timectx hrefvent_sched_ina>)
341/a>       24="L>241ref6"+cod6=ctx" 1634"4id="L1634" clas24=4ine" na24="L1634" c>341/a> *ctx arch_hrefvupdate_us rpagehed_in * *penowent_>a>)
341/a>       24""L>240ment"ts/core.c#L1534"6id="L1634" clas24=6ine" na24="L1634" c>341/a>       23="L>2396+code=lobarri rass="sref">ctxa>)
3417a> *341/a>{
16timectxa>)
3419a>  "L>242= 342 a>a>)
342/a>342/a>240/events/core.c#L153423id="L1634" clas24=3ine" na24="L1634" c>3423a>242   6     6   =pevm_area_"L>242ontext" cl *242a> * *pevmaent_nt"L>242   6     6   =pevm_faultontext" cl * *>)
342/a> *iop/eve_e>
342/a>       24="L>242   6     6   =perf_event_context" cl * *ctx hrefvent_ href="kdivisorctxvmac> *pevmaent_ore.c#L1608" id="L16vm_fiefctx> *3426a>       24="L>242   6     6   =pere"gobuff rass="sref">ctx *ctx)
3427a>ef">ctxlocal64_=Lvent_ href="kdivisorctxVM_FAULT_SIGBUSef">ctxlocal64_VM_FAULT_SIGBUSent_a>)
342/a>{
>)
342/a>       22="L>2ef="kdivisorctxvmfontext" cl *ctx flagsent_ n sample_> *iop/eve_e>
343 a>       24="L>241  "L>2ef="kdivisorctxvmfontext" cl *>)
343/a>ef">ctxlocal64_=Lvent_ hr0a>)
343/a>238 #L1608" id="L16"L>ef">ctxlocal64_=Lvent_a>)
343/a>       23= 6     6      struc}ts/core.c#L163434id="L1634" clas2434ine" na24="L1634" c>343/a>  >)
343/a>       24=n *ctxlocal64_rcu_read__timhed_i>a>)
343/a>       23="L>2396+code=lorbass="sref">ctxctx rcu_deref rencehed_in *ctx hrefvent_sched_inctxa>)
3437a>       24="L>2!_inctx>)
343/a>{
242= )
3439a>       24""L>240/events/core.c#L16344 id="L1634" clas234line" na23="L1634" c>3440a>       22="L>2ef="kdivisorctxvmfontext" cl *ctx flagsent_ n>>)
344/a>242= )
344/a>240/events/core.c#L153443id="L1634" clas2343ine" na23="L1634" c>344/a>       23="L>239"+code=upvmfontext" cl *ctx ragea>ctx rf_evmmap_to_pagehed_in *ctxa>)
3444a>       24="L>2!_inctx ragea>>)
344/a>       24="L>237  goto="L>242= )
344/a>)
3447a>ctx get_pagehed_in *ctx ragea>a>)
344/a>{
16timectx ragea>)
344/a>ctx ragea>m> *iop_indt)
345 a>       24""L>240/events/core.c#L163451id="L1634" clas2351ine" na23="L1534" c>3451a>ef">ctxlocal64_=Lvent_ hr0a>)
345/a>242= 345/a>       23="L>239"+code=uprcu_read_un_time_from*a>)
345/a>  >)
345/a>       24="L>238 #L1608" id="L16"L>ef">ctxlocal64_=Lvent_a>)
345/a>
< 6     6      struc}ts/core.c#L163457id="L1634" clas23=7ine" na23="L1534" c>345/a>       24""L>240/events/core.c#L163458id="L1634" clas2358ine" na23="L1634" c>345/a>{
a hre24voidmext_timectxlocal64_re"gobuff r_attachhed_i"L>242   6     6   =perf_event_context" cl * *ctx hrefvent_npan c24""L>240/events/core.c#L1534"9id="L1634" clas2359ine" na23="L1534" c>345/a>       22="L>228= 242   6     6   =pere"gobuff rass="sref">ctx *ctx>)
346 a> *iop/eve_e>
3461a>ctx flagsent_a>)
346/a>240/events/core.c#L153463id="L1634" clas2363ine" na23="L1534" c>346/a>       23="L>2!_inctx li6t_empryhed_inctx hrefvent_sched_inctx rb_efvryhed_>>>)
346/a>346/a>       24""L>240ment"ts/core.c#L153466id="L1634" clas2366ine" na23="L1534" c>346/a>       23="L>2396+code=lospin__tim_irqsaveass="sref">ctx spin__tim_irqsavehed_inctxctx flagsent_>a>)
3467a>       24="L>2!_inctx li6t_empryhed_inctx hrefvent_sched_inctx rb_efvryhed_>>>)
346/a>{
242= )
3469a>       24""L>240/events/core.c#L16347 id="L1634" clas237line" na23="L1534" c>347 a>ctx hrefvent_sched_inctx rb_efvryhed_n nctxa>)
347/a>242= 3472a>ctx spin_un_tim_irqreste.ched_inctxctx flagsent_>a>)
347/a>   6     6      struc}ts/core.c#L163474id="L1634" clas23=4ine" na23="L1534" c>347/a>  >)
347/a>  a hre24voidmext_timectxlocal64_re"gobuff r_detachhed_i"L>242   6     6   =perf_event_context" cl * *ctx hrefvent_npan c24""L>240/events/core.c#L153476id="L1634" clas2376ine" na23="L1534" c>347/a>
242   6     6   =pere"gobuff rass="sref">ctx *ctx>)
3477a> *iop/eve_e>
347/a>{
ctx flagsent_a>)
3479a>       24""L>240/events/core.c#L16348 id="L1634" clas238line" na23="L1534" c>3480a>       22="L>2ef="kdivisorctxli6t_empryass="sref">ctx li6t_empryhed_inctx hrefvent_sched_inctx rb_efvryhed_>>>)
348/a>238a>)
348/a>240/events/core.c#L153483id="L1634" clas2383ine" na23="L1534" c>348/a>       23="L>239"+code=upspin__tim_irqsaveass="sref">ctx spin__tim_irqsavehed_inctxctx flagsent_>a>)
348/a> *ctx li6t_del_inilhed_inctx hrefvent_sched_inctx rb_efvryhed_>a>)
348/a>       24=n *ctx wake_up_allhed_inctx hrefvent_sched_inctx waitqhed_>a>)
348/a>       23="L>2396+code=lospin_un_tim_irqreste.cass="sref">ctx spin_un_tim_irqreste.ched_inctxctx flagsent_>a>)
348/a>348/a>{
>)
348/a>ctxlocal64_re"gobuff r_wakeuphed_i"L>242   6     6   =perf_event_context" cl * *ctx hrefvent_>>)
349 a> *iop/eve_e>
3491a>{
ctx *ctx)
349/a>240/events/core.c#L153493id="L1634" clas2393ine" na23="L1534" c>349/a>       23="L>239"+code=uprcu_read__timef">ctxlocal64_rcu_read__timhed_i>a>)
349/a> *ctxctx rcu_deref rencehed_in *ctx hrefvent_sched_inctxa>)
349/a>       24="L>2!_inctx>)
349/a>
242= )
349/a>       24""L>240/events/core.c#L163498id="L1634" clas2398ine" na23="L1534" c>349/a>{
16timectx li6t_for_each_efvry_rcuhed_in *ctx hrefvent_n nctxctx rb_efvryhed_>     24""L>240/events/core.c#L163499id="L1634" clas2399ine" na23="L1534" c>349/a>       22="L>228= n *ctx wake_up_allhed_inctx hrefvent_sched_inctx waitqhed_>a>)
350 a>       24""L>240/events/core.c#L1635"1id="L1635" clas2391ine" na23="L1535" c>350/a>242= 3502a>a>)
350/a>   6     6      struc}ts/core.c#L1635"4id="L1635" clas2394ine" na23="L1535" c>350/a>  >)
350/a>  a hre24voidmext_timectx rb_free_rcuhed_i"L>242   6     6   =percu_heade_from* *     24""L>240/events/core.c#L1635"6id="L1635" clas2396ine" na23="L1535" c>350/a>
 *iop/eve_e>
3507a>       24="L>242   6     6   =pere"gobuff rass="sref">ctx *ctx)
350/a>{
>)
350/a>ctx *242   6     6   =pere"gobuff rass="sref">ctxa>)
351 a>ctx rb_freehed_in *ctxa>)
351/a>351/a>240/events/core.c#L153513id="L1635" clas24=3ine" na24="L1635" c>3513a>242   6     6   =pere"gobuff rass="sref">ctx *ef">ctxlocal64_=e"gobuff r_gL>hed_i"L>242   6     6   =perf_event_context" cl * *ctx hrefvent_>>)
351/a> *iop/eve_e>
351/a>       24="L>242   6     6   =pere"gobuff rass="sref">ctx *ctx)
351/a>)
3517a>ctxlocal64_rcu_read__timhed_i>a>)
351/a>{
16timectxctx rcu_deref rencehed_in *ctx hrefvent_sched_inctxa>)
351/a>       22="L>2ef="kdivisorctxrbass="sref">ctx sample_> *iop/eve_e>
352 a>       24="L>241  "L>2!_inctxctx>>)
352/a>ctxctx)
3522a>352/a>       23="L>239"+code=uprcu_read_un_time_from*a>)
352/a>  >)
352/a>       24="L>238 #L1608" id="L16"bass="sref">ctx)
352/a>
< 6     6      struc}ts/core.c#L1635"7id="L1635" clas2427ine" na24="L1635" c>352/a>       24""L>240/events/core.c#L1635"8id="L1635" clas24=8ine" na24="L1635" c>352/a>{
a hre24voidmext_timeef">ctxlocal64_=e"gobuff r_pu>hed_i"L>242   6     6   =pere"gobuff rass="sref">ctx *ctx>)
352/a>  sample_> *iop/eve_e>
353 a>       24="L>242   6     6   =perf_event_context" cl * *ctx hrefvent_n=in *ctx nent_a>)
3531a>ctx flagsent_a>)
353/a>240/events/core.c#L153533id="L1635" clas2433ine" na24="L1635" c>353/a>       23="L>2!_inctx>>)
353/a>353/a>       24""L>240ment"ts/core.c#L153536id="L1635" clas2436ine" na24="L1635" c>353/a>       23="L>2396+code=lospin__tim_irqsaveass="sref">ctx spin__tim_irqsavehed_inctxctx flagsent_>a>)
3537a>ctx li6t_for_each_efvry_safehed_in *ctx hrefvent_n n *ctx nent_n nctxctx rb_efvryhed_> sample_> *iop/eve_e>
353/a>{
ctx li6t_del_inilhed_inctx hrefvent_sched_inctx rb_efvryhed_>a>)
353/a>       22="L>228= n *ctx wake_up_allhed_inctx hrefvent_sched_inctx waitqhed_>a>)
3540a>       22= 6     6      struc}ts/core.c#L163541id="L1635" clas2341ine" na23="L1635" c>3541a>ctx spin_un_tim_irqreste.ched_inctxctx flagsent_>a>)
354/a>240/events/core.c#L153543id="L1635" clas2343ine" na23="L1635" c>354/a>       23="L>239"+code=upcall_rcuass="sref">ctx call_rcuhed_inctxctx rb_free_rcuhed_>a>)
3544a>   6     6      struc}ts/core.c#L163545id="L1635" clas2345ine" na23="L1635" c>354/a>       24""L>240ment"ts/core.c#L153546id="L1635" clas2346ine" na23="L1635" c>354/a>ctx rf_evmmap_openhed_i"L>242   6     6   =pevm_area_"L>242ontext" cl *242a> * *pevmaent_>>)
3547a> *iop/eve_e>
354/a>{
 *ctx hrefvent_ href="kdivisorctxvmac> *pevmaent_ore.c#L1608" id="L16vm_fiefctx> *3549a>       24""L>240/events/core.c#L16355 id="L1635" clas235line" na23="L1535" c>355 a>ctxctx hrefvent_sched_ina>)
355/a>355/a>240/events/core.c#L153553id="L1635" clas2353ine" na23="L1535" c>3553a> *242   6     6   =pevm_area_"L>242ontext" cl *242a> * *pevmaent_>>)
355/a> *iop/eve_e>
355/a>       24="L>242   6     6   =perf_event_context" cl * *ctx hrefvent_ href="kdivisorctxvmac> *pevmaent_ore.c#L1608" id="L16vm_fiefctx> *355/a>)
3557a>       24="L>2_inctx hrefvent_sched_inctx hrefvent_sched_in> sample_> *iop/eve_e>
355/a>{
ctx sizcent_ href="kdivisorctxhrefvdata_sizcass="sref">ctx hrefvdata_sizched_in *ctx hrefvent_sched_inctxa>)
355/a>       22="L>228= "L>242   6     6   =peus r_"L>242ontext" cl *242ched_in *ctx hrefvent_sched_in)

356 a>       24="L>241  "L>242   6     6   =pere"gobuff rass="sref">ctx *ctxctx hrefvent_sched_inctx)
3561a>)
356/a>ctx *ctx sizcent_ chedched+_inctx PAGE_SHIFThed_> + 1ntnctx ltimed_vment_>a>)
356/a>       23="L>241"+_in *pevmaent_ore.c#L1608" id="L16vm_mmass="sref">ctx vm_mment_ore.c#L1608" id="L16pinned_vmass="sref">ctx pinned_vma>   -hrext_timectx hrefvent_sched_in)
356/a>ctx *ctx hrefvent_sched_inctxctxa>)
356/a>       24="L>237  ext_timectxlocal64_re"gobuff r_detachhed_in *ctx hrefvent_n n *ctxa>)
356/a>
ctx hrefvent_sched_ina>)
356/a>       24""L>240/events/core.c#L163568id="L1635" clas2368ine" na23="L1535" c>356/a>{
ef">ctxlocal64_=e"gobuff r_pu>hed_in *ctxa>)
356/a>       22="L>228= n * *a>)
3570a>       22= 6     6      struc}ts/core.c#L163571id="L1635" clas2371ine" na23="L1535" c>357/a>357/a>240/events/core.c#L153573id="L1635" clas2373ine" na23="L1535" c>3573a>242   6     6   =pevm_ohreareons_"L>242ontext" cl *242a>   ext_timectx rf_evmmap_vmopsent_ hrsample_> *iop/eve_e>
357/a>ctx openhed_22="L>228= hrext_timectx rf_evmmap_openhed_npan c24""L>240/events/core.c#L153575id="L1635" clas2375ine" na23="L1535" c>3575a> *228= hrext_time *240/events/core.c#L153576id="L1635" clas2376ine" na23="L1535" c>357/a>
228= hrext_time240/events/core.c#L153577id="L1635" clas2377ine" na23="L1535" c>3577a>
 *
240/events/core.c#L153578id="L1635" clas2378ine" na23="L1535" c>357/a>{
}a>)
3579a>       24""L>240/events/core.c#L16358 id="L1635" clas238line" na23="L1535" c>3580a>  a hre24"ddddddddddddddddddpf_evmmapontext" cl *242   6     6   =pefiefctx> * * *242   6     6   =pevm_area_"L>242ontext" cl *242a> * *pevmaent_>>)
358/a> *iop/eve_e>
358/a> *ctx hrefvent_ href="kdivisorctxfiefctx> *358/a>       23=unsigned long #L1608" id="L16us r_ltimedontext" cl * *ctx us r_ltim_limilent_a>)

358/a>242ontext" cl *242ched_in *a>)
358/a>       24=unsigned long #L1608" id="L16ltimedontext" cl * *ctx ltim_limilent_a>)

3586a>       24="L>242   6     6   =pere"gobuff rass="sref">ctx *ctx)
3587a>       24=unsigned long #L1608" id="L16vma_sizcass="sref">ctx vma_sizcent_a>)
358/a>{
ctx nr_pagesent_a>)
358/a>       22=long #L1608" id="L16us r_extrac> *peus r_extraent_n n * *peextraent_a>)
3590a>       22="dddddddddddddddddd"L>ef">ctxlocal64_=Lvent_ hr0nt_inctx flagsent_ hr0a>)
3591a>)
3592a>/*)
359/a>  _spanlas2392icomm cla>="L>228= * Don't allow mmap() of="dheritfd hre-task cou_cers. This would)
359/a>="L>228= * create a hreformance issue due to all childrt_ write"g to the)
359/a>  _spanlas2392icomm cla>="L>228= * s3=" rb.)
359/a>
<_spanlas2392icomm cla>="L>228= */)
3597a>       24="L>2_inctx hrefvent_sched_inctx cpuent_ h= -1 nctx hrefvent_sched_inctxctx<"dheritent_>>)
359/a>{
238 -_inctx)
3599a>       24""L>240/events/core.c#L1636" id="L1636" idas2399ine" na23="L1536" i>3600a>       22="L>2!in * *pevmaent_ore.c#L1608" id="L16vm_flagsass="sref">ctx vm_flagsent_ cctx VM_SHAREDhed_>>     24""L>240/events/core.c#L1636"1id="L1636" clas2391ine" na23="L1536" c>360/a>238 -_inctx)
360/a>240/events/core.c#L1536"3id="L1636" clas2393ine" na23="L1536" c>360/a>       23="L>239"+code=upvma_sizcass="sref">ctx vma_sizcent_ href="kdivisorctxvmac> *pevmaent_ore.c#L1608" id="L16vm_endontext" cl *   -ref="kdivisorctxvmac> *pevmaent_ore.c#L1608" id="L16vm_star2ontext" cl *)
360/a> *ctx nr_pagesent_ hrin *ctx vma_sizcent_ /+_inctx PAGE_SIZEhed_> - 1a>)
360/a>       24""L>240ment"ts/core.c#L1536"6id="L1636" clas2396ine" na23="L1536" c>3606a>/*)
3607a>  _spanlas2392icomm cla>="L>228= * If we hav" rb pages ensure they're a howre-of-two number, so we)
360/a>{
_spanlas2392icomm cla>="L>228= * canldo bitmasks="dstead of=modulo.)
360/a>="L>228= */)
3610a>       22="L>2ef="kdivisorctxnr_pagesass="sref">ctx nr_pagesent_ !hr0 nctx<"s_howre_of_2hed_in *ctx nr_pagesent_>>     24""L>240/events/core.c#L163611id="L1636" clas24=1ine" na24="L1636" c>361/a>238 -_inctx)
361/a>240/events/core.c#L153613id="L1636" clas24=3ine" na24="L1636" c>361/a>       23="L>2n *ctx vma_sizcent_ !href="kdivisorctxPAGE_SIZEass="sref">ctx PAGE_SIZEhed_ * (1 +=n *ctx nr_pagesent_>>     24""L>240/events/core.c#L163614id="L1636" clas24=4ine" na24="L1636" c>361/a>ctx)
361/a>       24""L>240ment"ts/core.c#L1536"6id="L1636" clas24=6ine" na24="L1636" c>3616a>       23="L>2n * *pevmaent_ore.c#L1608" id="L16vm_pgoffontext" cl *     24""L>240/events/core.c#L163617id="L1636" clas24=7ine" na24="L1636" c>3617a>ctx)
361/a>{
>)
361/a>ctx WARN_ON_ONCEhed_in *ctx hrefvent_sched_ina>)
362 a>ctx hrefvent_sched_ina>)
362/a>ctx hrefvent_sched_inctx sample_> *iop/eve_e>
362/a>2_inctx hrefvent_sched_inctxctx nr_pagesent_ hhref="kdivisorctxnr_pagesass="sref">ctx nr_pagesent_>ample_> *iop/eve_e>
362/a>       23="L>241"+pan c23=_inctxctx hrefvent_sched_inctxa>)
362/a>)
362/a>       24="L>237  pan c23=_inef">ctxlocal64_=Lvent_ hr-_inctx)
362/a>
242= )
3627a>362/a>{
>)
362/a>ctx nr_pagesent_ + 1a>)
363 a>ctx us r_ltim_limilent_ href="kdivisorctxsysctl_hrefvent_s_m_time_from*ctx PAGE_SHIFThed_ - 10>a>)
3631a>)
3632a>/*)
363/a>  _spanlas2392icomm cla>="L>228= * Increase the limil ne" arly with me.c CPUs:)
363/a>="L>228= */)
363/a>       24=n *ctx us r_ltim_limilent_ *href="kdivisorctxnum_onne" _cpusass="sref">ctx num_onne" _cpushed_i>a>)
363/a>)
3637a>ctx ltimed_vment_> +=n * *peus r_extraent_a>)
363/a>{
>)
363/a>3640a>       22="L>2ef="kdivisorctxus r_ltimedontext" cl *ctx us r_ltim_limilent_>ample_> *iop/eve_e>
364/a>242=  *peextraent_ href="kdivisorctxus r_ltimedontext" cl *ctx us r_ltim_limilent_a>)

364/a>240/events/core.c#L153643id="L1636" clas2343ine" na23="L1636" c>364/a>       23="L>239"+code=upltim_limilass="sref">ctx ltim_limilent_ href="kdivisorctxrlimilass="sref">ctx rlimilent_2ef="kdivisorctxRLIMIT_MEMLOCKass="sref">ctx RLIMIT_MEMLOCKhed_>a>)
364/a> *ctx ltim_limilent_ chedchedhref="kdivisorctxPAGE_SHIFTass="sref">ctx PAGE_SHIFThed_a>)
364/a>       24=n *ctx vm_mment_ore.c#L1608" id="L16pinned_vmass="sref">ctx pinned_vma>   +=n * *peextraent_a>)
364/a>)
3647a>       24="L>22ef="kdivisorctxltimedontext" cl *ctx ltim_limilent_) nctx prefvparanoid_tracepoint_rawhed_i> n)
364/a>{
 *ctx CAP_IPC_LOCKent_>> sample_> *iop/eve_e>
364/a>       22="L>228= n *ef">ctxlocal64_=Lvent_ hr-_inctx)
365 a>       24="L>241  goto="L>242= )
365/a>365/a>240/events/core.c#L153653id="L1636" clas2353ine" na23="L1536" c>365/a>       23="L>239"+code=upWARN_ONass="sref">ctx WARN_ONhed_in *ctx hrefvent_sched_inctxa>)
365/a>  >)
365/a>       24="L>2n * *pevmaent_ore.c#L1608" id="L16vm_flagsass="sref">ctx vm_flagsent_ cctx VM_WRITEent_>ample_> *iop/eve_e>
365/a>
ctx flagsent_ |href="kdivisorctxRING_BUFFER_WRITABLEass="sref">ctx RING_BUFFER_WRITABLEhed_a>)
365/a>       24""L>240/events/core.c#L163658id="L1636" clas2358ine" na23="L1636" c>365/a>{
16timectxctx *ctx nr_pagesent_,      24""L>240/events/core.c#L163659id="L1636" clas2359ine" na23="L1536" c>365/a>       22="L>228= n *ctx hrefvent_sched_inctx   ? n *ctx hrefvent_sched_inctx   : 0npan c24""L>240/events/core.c#L15366 id="L1636" clas236line" na23="L1536" c>366 a>       24="L>241  n *ctx hrefvent_sched_inctx cpuent_nt_inctx flagsent_>a>)
3661a>)
366/a>ctx sample_> *iop/eve_e>
366/a>       23="L>241"+_inef">ctxlocal64_=Lvent_ hr-_inctx)
366/a>242= )
366/a>       24= 6     6      struc}ts/core.c#L163666id="L1636" clas2366ine" na23="L1536" c>366/a>       23="L>2396+code=lo/cu_236ign_point rass="sref">ctx *ctx hrefvent_sched_inctxctxa>)
366/a>       24""L>240/events/core.c#L163668id="L1636" clas2368ine" na23="L1536" c>366/a>{
16time * *peus r_extraent_n nctx ltimed_vment_>a>)
366/a>ctx hrefvent_sched_in *peextraent_a>)
367 a>ctx hrefvent_sched_ina>)
3671a>ctx vm_mment_ore.c#L1608" id="L16pinned_vmass="sref">ctx pinned_vma>   +hrext_timectx hrefvent_sched_in)
367/a>240/events/core.c#L153673id="L1636" clas2373ine" na23="L1536" c>367/a>       23="L>239"+code=uphrefvent_s_update_us rpageass="sref">ctx prefvent_s_update_us rpagehed_in *ctx hrefvent_>a>)
367/a>  >)
3675a>242= 3676a>       23="L>2!_inef">ctxlocal64_=Lvent_>ample_> *iop/eve_e>
3677a>16timectxctx hrefvent_sched_ina>)
367/a>{
16timectx hrefvent_sched_ina>)
3679a>       24""L>240/events/core.c#L16368 id="L1636" clas238line" na23="L1536" c>368 a> *pevmaent_ore.c#L1608" id="L16vm_flagsass="sref">ctx vm_flagsent_ |href="kdivisorctxVM_RESERVEDass="sref">ctx VM_RESERVEDent_a>)
3681a>ctx vm_opsent_ hrnctx rf_evmmap_vmopsent_a>)
368/a>240/events/core.c#L153683id="L1636" clas2383ine" na23="L1536" c>368/a>       23="L>238 #L1608" id="L16"L>ef">ctxlocal64_=Lvent_a>)
3684a>   6     6      struc}ts/core.c#L1636"5id="L1636" clas2385ine" na23="L1536" c>368/a>       24""L>240ment"ts/core.c#L153686id="L1636" clas2386ine" na23="L1536" c>368/a>ctx242   6     6   =pefiefctx> * *ctx onent_>ample_> *iop/eve_e>
3687a> *iop/eve_e>
368/a>{
ctx in =pent_pin *ctx in =pent_phref="kdivisorctxfiepontext" cl *ctxlocal64_fvpathent_._inctx defvryent_ore.c#L1608" id="L16d_in =pass="sref">ctx d_in =pent_a>)
368/a>       22="L>242   6     6   =perf_event_context" cl * *ctx hrefvent_ href="kdivisorctxfiepontext" cl *3690a>       22="dddddddddddddddddd"L>valass="sref">ctx "L>valent_a>)

3691a>)
3692a>16timectx in =pent_ore.c#L1608" id="L16i_mutexontext" cl *a>)
369/a>       23="L>239"+code=uprL>valass="sref">ctx "L>valent_ href="kdivisorctxfasync_help rontext" cl * * *ctx onent_ntnctx hrefvent_sched_inctxa>)
369/a> *ctx in =pent_ore.c#L1608" id="L16i_mutexontext" cl *a>)
369/a>       24""L>240ment"ts/core.c#L153696id="L1636" clas2396ine" na23="L1536" c>3696a>       23="L>2n *valass="sref">ctx "L>valent_ <r0>     24""L>240/events/core.c#L163697id="L1636" clas2397ine" na23="L1536" c>3697a>valass="sref">ctx "L>valent_a>)

369/a>{
>)
369/a>       22="L>238 0a>)
3700a>   6     6      struc}ts/core.c#L1637"1id="L1637" clas2391ine" na23="L1537" c>3701a>)
370/a>242   6     6   =pefief_ohreareonsctx> *   dddddddddddddddpf_evfopsass="sref">ctx rf_evfopsent_ hrsample_> *iop/eve_e>
370/a>       23=._in *iop/eve_e>
370/a>ctx "Lleasea>ctx pf_evreleaseent_nample_> *iop/eve_e>
3705a> *iop/eve_e>
370/a>
ctx pollhed_pan c23=           hrext_timectx pf_evpollent_nample_> *iop/eve_e>
3707a>
ctx un_timed_ioctlhed_pan c23= hrext_timectx pf_evioctlent_nample_> *iop/eve_e>
3708a>
ctx compatvioctlhed_pan c23=   hrext_timectx pf_evioctlent_nample_> *iop/eve_e>
3709a>
 *iop/eve_e>
3710a>       22=._inctxctx *iop/eve_e>
371/a>)
371/a>240/events/core.c#L153713id="L1637" clas24=3ine" na24="L1637" c>371/a>  _spanlas2392icomm cla>/*)
371/a>=* Pf_e _nts/ wakeup)
371/a>  _spanlas2392icomm cla>=*)
371/a>
<_spanlas2392icomm cla>=* If there's data, ensure we set the poll() a hre and publish _ntrything)
3717a>  _spanlas2392icomm cla>=* to us r-space befe.c wake"g _ntrybody up.)
371/a>{
_spanlas2392icomm cla>=*/)
3719a>       24""L>240/events/core.c#L16372 id="L1637" clas242line" na24="L1637" c>372 a>ctx prefvent_s_wakeup242   6     6   =perf_event_context" cl * *ctx hrefvent_>     24""L>240/events/core.c#L163721id="L1637" clas24=1ine" na24="L1637" c>372/a> *iop/eve_e>
3722a>16timectx =e"gobuff r_wakeuphed_in *ctx hrefvent_>a>)
372/a>  >)
372/a>ctx hrefvent_sched_inctx pfnde"gokillent_>rsample_> *iop/eve_e>
372/a>       24="L>237  _inctxctx hrefvent_sched_inctxctxctx hrefvent_sched_inctx pfnde"gokillent_>a>)
372/a>
ctx hrefvent_sched_inctx pfnde"gokillent_ hr0a>)
3727a>372/a>{
 6     6      struc}ts/core.c#L1637"9id="L1637" clas24=9ine" na24="L1637" c>3729a>       24""L>240/events/core.c#L16373 id="L1637" clas243line" na24="L1637" c>3730a>  a hre24voidmext_time242   6     6   =peirq_worme_from* *ctx efvryent_>     24""L>240/events/core.c#L163731id="L1637" clas2431ine" na24="L1637" c>373/a> *iop/eve_e>
3732a> *ctx hrefvent_ href="kdivisorctxcontae" e_ofass="sref">ctx contae" e_ofhed_in *ctx efvryent_nample_> *iop/eve_e>
373/a>       23="L>241"+pan c23="L>242   6     6   =perf_event_context" cl *ctx pfnde"gent_>a>)
373/a>  >)
373/a>       24="L>2n *ctx hrefvent_sched_in *rsample_> *iop/eve_e>
373/a>
ctx hrefvent_sched_in *)
3737a>16time * *ctx hrefvent_>a>)
3738a>3739a>       24""L>240/events/core.c#L16374 id="L1637" clas234line" na23="L1637" c>3740a>       22="L>2ef="kdivisorctxx" class="sref">ctx hrefvent_sched_inctx prnde"gowakeupent_>rsample_> *iop/eve_e>
374/a>242= ctx hrefvent_sched_inctx prnde"gowakeupent_ hr0a>)
374/a>ctx prefvent_s_wakeup *ctx hrefvent_>a>)
374/a>       23= 6     6      struc}ts/core.c#L163744id="L1637" clas2344ine" na23="L1637" c>3744a>   6     6      struc}ts/core.c#L163745id="L1637" clas2345ine" na23="L1637" c>374/a>       24""L>240ment"ts/core.c#L153746id="L1637" clas2346ine" na23="L1637" c>374/a>
<_spanlas2392icomm cla>/*)
3747a>  _spanlas2392icomm cla>=* We 239ume there is only KVM supporte"g the callbacks.)
374/a>{
_spanlas2392icomm cla>=* Later on, we might change it to a list="L>there is)
374/a>=* another virtualizareon implem clareon supporte"g the callbacks.)
375 a>  _spanlas2392icomm cla>=*/)
375/a>242   6     6   =perf_evguest_info_callbacksass="sref">ctx prefvguest_info_callbacksched_in *ctx prefvguest_cbsent_a>)

375/a>240/events/core.c#L153753id="L1637" clas2353ine" na23="L1537" c>375/a>  "ddddddddddddddddddpf_evregist e_guest_info_callbacksass="sref">ctx prefvregist e_guest_info_callbacks242   6     6   =perf_evguest_info_callbacksass="sref">ctx prefvguest_info_callbacksched_in *ctx cbsent_>     24""L>240/events/core.c#L163754id="L1637" clas2354ine" na23="L1537" c>375/a>  sample_> *iop/eve_e>
375/a>       24=n *ctx prefvguest_cbsent_ href="kdivisorctxcbsass="sref">ctx cbsent_a>)

375/a>
375/a>   6     6      struc}ts/core.c#L163758id="L1637" clas2358ine" na23="L1637" c>375/a>{
ef="kdivisorctxEXPORT_SYMBOL_GPLass="sref">ctx *ctx prefvregist e_guest_info_callbacksa>)
3759a>       24""L>240/events/core.c#L16376 id="L1637" clas236line" na23="L1537" c>376 a>  "ddddddddddddddddddpf_evunregist e_guest_info_callbacksass="sref">ctx prefvunregist e_guest_info_callbacks242   6     6   =perf_evguest_info_callbacksass="sref">ctx prefvguest_info_callbacksched_in *ctx cbsent_>     24""L>240/events/core.c#L163761id="L1637" clas2361ine" na23="L1537" c>376/a> *iop/eve_e>
3762a>16timectx prefvguest_cbsent_ href="kdivisorctxNULLass="sref">ctx)

376/a>       23="L>238 0a>)
3764a>   6     6      struc}ts/core.c#L163765id="L1637" clas2365ine" na23="L1537" c>3765a>242= ctx *ctx prefvunregist e_guest_info_callbacksa>)
376/a>)
376/a>  a hre24voidmext_time242   6     6   =perf_event_c_head eass="sref">ctx prefvent_s_head eched_in *ctx head echednample_> *iop/eve_e>
376/a>{
242   6     6   =perf_evsample_datac> *pepf_evsample_datached_in * *pedatachednample_> *iop/eve_e>
376/a>       22="L>228=                          "L>242   6     6   =perf_event_context" cl * *ctx hrefvent_>     24""L>240/events/core.c#L16377 id="L1637" clas237line" na23="L1537" c>377 a> *iop/eve_e>
3771a>ctx u6/a>242=  *ctx hrefvent_sched_inctx *)
377/a>240/events/core.c#L153773id="L1637" clas2373ine" na23="L1537" c>377/a>       23="L>239"+code=updatac> *pedatachedsched_in *377/a> *ctx head echedsched_inctx sizcent_ +hrext_timectx hrefvent_sched_inctx id_head e_sizcent_a>)
377/a>       24""L>240ment"ts/core.c#L153776id="L1637" clas2376ine" na23="L1537" c>3776a>       23="L>2"L>242=  *ctx PERF_SAMPLE_TIDent_>rsample_> *iop/eve_e>
3777a>)
377/a>{
239"+code=updatac> *pedatachedsched_inctx tid_xfvryent_._in *ctx hrefvent_n dddddddddddddddcurrt_sass="sref">ctx currt_sa>)
377/a>       22="L>228= n * *pedatachedsched_inctx tid_xfvryent_._in *ctx hrefvent_n dddddddddddddddcurrt_sass="sref">ctx currt_sa>)
378 a>3781a>)
378/a>242=  *ctx PERF_SAMPLE_TIMEent_>ample_> *iop/eve_e>
378/a>       23="L>241"+n * *pedatachedsched_in *378/a>  >)
378/a>       24="L>2n * *ctx PERF_SAMPLE_IDent_>>)
378/a>
ctx hrefvent_>a>)
378/a>       24""L>240/events/core.c#L1637"8id="L1637" clas2388ine" na23="L1537" c>378/a>{
ctx PERF_SAMPLE_STREAM_IDent_>>)
378/a>       22="L>228= n * *pedatachedsched_inctx hrefvent_sched_in)
3790a>  >)
379/a> *ctx PERF_SAMPLE_CPUent_>rsample_> *iop/eve_e>
379/a> *pedatachedsched_inctx cpu_xfvryent_._inctx cpuent_>241"+href="kdivisorctxraw_smp_processor_ide_from*a>)
379/a>       23="L>241"+n * *pedatachedsched_inctx cpu_xfvryent_._in)
379/a>379/a>   6     6      struc}ts/core.c#L163796id="L1637" clas2396ine" na23="L1537" c>379/a>)
3797a>242   6     6   =perf_event_c_head eass="sref">ctx prefvent_s_head eched_in *ctx head echednample_> *iop/eve_e>
379/a>{
242   6     6   =perf_evsample_datac> *pepf_evsample_datached_in * *pedatachednample_> *iop/eve_e>
379/a>       22="L>228=                 "L>242   6     6   =perf_event_context" cl * *ctx hrefvent_>     24""L>240/events/core.c#L1638" id="L1638" idas2399ine" na23="L1538" i>380 a> *iop/eve_e>
380/a>ctx hrefvent_sched_inctx *     24""L>240/events/core.c#L1638"2id="L1638" clas2392ine" na23="L1538" c>380/a> *ctx head echedn+n * *pedatachedn dddddddddddddddx" class="sref">ctx hrefvent_>a>)
380/a>   6     6      struc}ts/core.c#L1638"4id="L1638" clas2394ine" na23="L1538" c>380/a>  >)
3805a>242   6     6   =perf_evoutput_handefctx> * * * *iop/eve_e>
380/a>
236                  "L>242   6     6   =perf_evsample_datac> *pepf_evsample_datached_in * *pedatached>     24""L>240/events/core.c#L1638"7id="L1638" clas2397ine" na23="L1538" c>3807a> *iop/eve_e>
380/a>{
16timectx u6/a>242=  * *)
3809a>       24""L>240/events/core.c#L16381 id="L1638" clas241line" na24="L1638" c>3810a>       22="L>2ef="kdivisorctxsample_typfctx> *ctx PERF_SAMPLE_TIDent_>     24""L>240/events/core.c#L163811id="L1638" clas24=1ine" na24="L1638" c>381/a>242=  * * * * *pedatachedsched_inctx tid_xfvryent_>a>)
381/a>240/events/core.c#L153813id="L1638" clas24=3ine" na24="L1638" c>3813a>       22="L>2ef="kdivisorctxsample_typfctx> *ctx PERF_SAMPLE_TIMEent_>ample_> *iop/eve_e>
381/a> *a>)
381/a>       24""L>240ment"ts/core.c#L153816id="L1638" clas24=6ine" na24="L1638" c>3816a>       23="L>2"L>242=  *ctx PERF_SAMPLE_IDent_>>)
3817a>16time * * * * *pedatachedsched_ina>)
381/a>{
>)
3819a>       23="L>2"L>242=  *ctx PERF_SAMPLE_STREAM_IDent_>>)
382 a>       24="L>241  n * * * * * *pedatachedsched_ina>)
3821a>)
382/a>242=  *ctx PERF_SAMPLE_CPUent_>>)
382/a>       23="L>241"+n * * * * * *pedatachedsched_inctx cpu_xfvryent_>a>)
3824a>   6     6      struc}ts/core.c#L163825id="L1638" clas24=5ine" na24="L1638" c>382/a>       24""L>240ment"ts/core.c#L153826id="L1638" clas2426ine" na24="L1638" c>382/a>
242   6     6   =perf_event_context" cl * *ctx hrefvent_nample_> *iop/eve_e>
3827a>382/a>{
242   6     6   =perf_evsample_datac> *pepf_evsample_datached_in *>)
3829a>  sample_> *iop/eve_e>
3830a>       22="L>2ef="kdivisorctxx" class="sref">ctx hrefvent_sched_inctx *     24""L>240/events/core.c#L163831id="L1638" clas2431ine" na24="L1638" c>383/a>242=  * * *a>)
3832a>383/a>  >)
383/a>  a hre24voidmext_time *242   6     6   =perf_evoutput_handefctx> * * * *iop/eve_e>
383/a>       24=L>236                    "L>242   6     6   =perf_event_context" cl * *ctx hrefvent_nample_> *iop/eve_e>
383/a>
16timectx u6/a>242=  *ctx u6/a>242= ctx runne"gent_>     24""L>240/events/core.c#L163837id="L1638" clas24rgeel/even4="L1638" c>3837a> *iop/eve_e>
383/a>{
16timectx u6/a>242= ef">ctxlocal64_=Lad_forma>ent_ href="kdivisorctxx" class="sref">ctx hrefvent_sched_inctxef">ctxlocal64_=Lad_forma>ent_a>)
383/a>ctx u6/a>242= ctx valuesa>)
3840a>       22="ddddddddddddddddddnass="sref">ctx nent_ hr0a>)
3841a>)
3842a>16timectx valuesa>ctx nent_++] href="kdivisorctxprefvent_s_cou_context" cl * *ctx hrefvent_>a>)
3843a>       22="L>2ef="kdivisorctxread_forma>ef">ctxlocal64_=Lad_forma>ent_ cctx PERF_FORMAT_TOTAL_TIME_ENABLEDent_>rsample_> *iop/eve_e>
384/a>ctx valuesa>ctx nent_++] href="kdivisorctxenabefde_from* *iop/eve_e>
384/a>       24=L>236           _inctx hrefvent_sched_ina>)
384/a>
3847a>       22="L>2ef="kdivisorctxread_forma>ef">ctxlocal64_=Lad_forma>ent_ cctx PERF_FORMAT_TOTAL_TIME_RUNNINGent_>rsample_> *iop/eve_e>
384/a>{
239"+code=upvaluesass="sref">ctx valuesa>ctx nent_++] href="kdivisorctxrunne"gass="sref">ctx runne"gent_ +ample_> *iop/eve_e>
384/a>       22="L>228=         _inctx hrefvent_sched_inctx child_total_timf_runne"gent_>a>)
385 a>385/a>ef">ctxlocal64_=Lad_forma>ent_ cctx PERF_FORMAT_IDent_>     24""L>240/events/core.c#L163852id="L1638" clas2352ine" na23="L1538" c>385/a>ctx valuesa>ctx nent_++] href="kdivisorctxprimaryvent_s_ide_from* *ctx hrefvent_>a>)
385/a>  >)
385/a> *ctx __output_copy * * *ctx valuesa> *ctx nent_ * sizcofin *ctx u6/a>a>)
385/a>   6     6      struc}ts/core.c#L163856id="L1638" clas23=6ine" na23="L1538" c>385/a>)
3857a>  _spanlas2392icomm cla>/*)
385/a>{
_spanlas2392icomm cla>=* XXX PERF_FORMAT_GROUP vs="dherited _nts/s seems difficult.)
385/a>=*/)
3860a>  a hre24voidmext_timectx prefvoutput_read_group242   6     6   =perf_evoutput_handefctx> * * * *iop/eve_e>
386/a>242   6     6   =perf_event_context" cl * *ctx hrefvent_nample_> *iop/eve_e>
386/a>ctx u6/a>242=  *ctx u6/a>242= ctx runne"gent_>     24""L>240/events/core.c#L163863id="L1638" clas2363ine" na23="L1538" c>386/a>  sample_> *iop/eve_e>
386/a> *ctx lead eched_href="kdivisorctxx" class="sref">ctx hrefvent_sched_inctx group_lead echedn in *)
386/a>       24=n *ctx u6/a>242= ef">ctxlocal64_=Lad_forma>ent_ href="kdivisorctxx" class="sref">ctx hrefvent_sched_inctxef">ctxlocal64_=Lad_forma>ent_a>)
3866a>       24=n *ctx u6/a>242= ctx valuesa>)
3867a>       22="ddddddddddddddddddnass="sref">ctx nent_ hr0a>)
386/a>{
>)
386/a>ctx valuesa>ctx nent_++] hr1 +="L>242= ctx lead echedsched_inctx ne_sibne"gsent_a>)
3870a>  >)
387/a>ef">ctxlocal64_=Lad_forma>ent_ cctx PERF_FORMAT_TOTAL_TIME_ENABLEDent_>>)
387/a>ctx valuesa>ctx nent_++] href="kdivisorctxenabefde_from*)
387/a>  >)
387/a>ef">ctxlocal64_=Lad_forma>ent_ cctx PERF_FORMAT_TOTAL_TIME_RUNNINGent_>>)
387/a>       24="L>237  _inctx valuesa>ctx nent_++] href="kdivisorctxrunne"gass="sref">ctx runne"gent_a>)
387/a>)
3877a>       22="L>2ef="kdivisorctxlead eass="sref">ctx lead eched_!href="kdivisorctxx" class="sref">ctx hrefvent_>>)
387/a>{
239"+code=uplead eass="sref">ctx lead echedsched_in239"+code=uplead eass="sref">ctx lead eched>a>)
3879a>       24""L>240/events/core.c#L16388 id="L1638" clas238line" na23="L1538" c>388 a>16timectx valuesa>ctx nent_++] href="kdivisorctxprefvent_s_cou_context" cl * *ctx lead eched>a>)
388/a>ef">ctxlocal64_=Lad_forma>ent_ cctx PERF_FORMAT_IDent_>     24""L>240/events/core.c#L163882id="L1638" clas2382ine" na23="L1538" c>388/a>ctx valuesa>ctx nent_++] href="kdivisorctxprimaryvent_s_ide_from* *ctx lead eched>a>)
388/a>  >)
388/a> *ctx __output_copy * * *ctx valuesa> *ctx nent_ * sizcofin *ctx u6/a>a>)
388/a>       24""L>240ment"ts/core.c#L1538"6id="L1638" clas2386ine" na23="L1538" c>3886a>       24=n *ctx list_for_each_xfvry *ctx lead echedsched_in *ctx group_xfvryent_>rsample_> *iop/eve_e>
3887a>16timectx nent_ hr0a>)
388/a>{
>)
388/a>       22="L>228= "L>2"L>242= ctx hrefvent_>>)
389 a>       24="L>241          "">16time239"+code=upsube_from*a>)
3891a>)
389/a>ctx valuesa>ctx nent_++] href="kdivisorctxprefvent_s_cou_context" cl * *a>)
389/a>       23="L>241"+"L>2_inef">ctxlocal64_=Lad_forma>ent_ cctx PERF_FORMAT_IDent_>     24""L>240/events/core.c#L163894id="L1638" clas2394ine" na23="L1538" c>389/a>ctx valuesa>ctx nent_++] href="kdivisorctxprimaryvent_s_ide_from* *a>)
389/a>       24""L>240ment"ts/core.c#L153896id="L1638" clas2396ine" na23="L1538" c>389/a>
ctx __output_copy * * *ctx valuesa> *ctx nent_ * sizcofin *ctx u6/a>a>)
3897a>389/a>{
 6     6      struc}ts/core.c#L163899id="L1638" clas2399ine" na23="L1538" c>3899a>       24""L>240/events/core.c#L1639" id="L1639" idas2399ine" na23="L1539" i>390 a>ctx PERF_FORMAT_TOTAL_TIMESa> *ctx PERF_FORMAT_TOTAL_TIME_ENABLEDent_|\     24""L>240/events/core.c#L1639"1id="L1639" clas2391ine" na23="L1539" c>390/a>ctx PERF_FORMAT_TOTAL_TIME_RUNNINGent_>>)
390/a>240/events/core.c#L1539"3id="L1639" clas2393ine" na23="L1539" c>390/a>  a hre24voidmext_time242   6     6   =perf_evoutput_handefctx> * * * *iop/eve_e>
390/a>242   6     6   =perf_event_context" cl * *ctx hrefvent_>     24""L>240/events/core.c#L1639"5id="L1639" clas2395ine" na23="L1539" c>3905a> *iop/eve_e>
3906a>       24=n *ctx u6/a>242=  *ctx runne"gent_ hr0n n *ctx nowent_a>)
3907a>       24=n *ctx u6/a>242= ef">ctxlocal64_=Lad_forma>ent_ href="kdivisorctxx" class="sref">ctx hrefvent_sched_inctxef">ctxlocal64_=Lad_forma>ent_a>)
390/a>{
>)
390/a>391 a>  _spanlas2392icomm cla>=========* compute total_timf_enabefd, total_timf_runne"genspans>)
391/a>=========* based on snapshot values taken when the hrefvenspans>)
391/a>=========* was s23t scheduefd in.)
3913a>  _spanlas2392icomm cla>=========*)
391/a>=========* we cannot simply callfd update_context_timf())
391/a>  _spanlas2392icomm cla>=========* because of _time"g issue as we are callfd in)
3916a>  _spanlas2392icomm cla>=========* NMI context)
3917a>  _spanlas2392icomm cla>=========*/)
391/a>{
ctxlocal64_=Lad_forma>ent_ cctx PERF_FORMAT_TOTAL_TIMESa>     24""L>240/events/core.c#L1639"9id="L1639" clas24=9ine" na24="L1639" c>391/a>       22="L>228= n *ctx calc_timfr_values *ctx hrefvent_n nctx nowent_n nctx runne"gent_>a>)
3920a>  >)
392/a>ctx hrefvent_sched_inctxef">ctxlocal64_=Lad_forma>ent_ cctx PERF_FORMAT_GROUPa>     24""L>240/events/core.c#L163922id="L1639" clas24=2ine" na24="L1639" c>392/a>ctx prefvoutput_read_group * * *ctx hrefvent_n cal64_sefvent"aenabefde_from*ctx runne"gent_>a>)
392/a>       23=else>)
392/a>ctx hrefvent_n cal64_sefvent"aenabefde_from*ctx runne"gent_>a>)
392/a>   6     6      struc}ts/core.c#L163926id="L1639" clas2426ine" na24="L1639" c>392/a>)
3927a>242   6     6   =perf_evoutput_handefctx> * * * *iop/eve_e>
392/a>{
242   6     6   =perf_event_c_head eass="sref">ctx prefvent_s_head eched_in *ctx head echednample_> *iop/eve_e>
392/a>       22="L>228=         "L>242   6     6   =perf_evsample_datac> *pepf_evsample_datached_in * *pedatachednample_> *iop/eve_e>
393 a>       24="L>241          "L>242   6     6   =perf_event_context" cl * *ctx hrefvent_>     24""L>240/events/core.c#L163931id="L1639" clas2431ine" na24="L1639" c>393/a> *iop/eve_e>
3932a>16timectx u6/a>242=  * *)
393/a>  >)
393/a> * * * * *ctx head eched>a>)
393/a>       24""L>240ment"ts/core.c#L153936id="L1639" clas2436ine" na24="L1639" c>3936a>       23="L>2"L>242=  *ctx PERF_SAMPLE_IPent_>     24""L>240/events/core.c#L163937id="L1639" clas24rgeel/even4="L1639" c>3937a>16time * * * * *pedatachedsched_inctx ipched>a>)
393/a>{
>)
3939a>       23="L>2"L>242=  *ctx PERF_SAMPLE_TIDent_>     24""L>240/events/core.c#L16394 id="L1639" clas234line" na23="L1639" c>394 a>       24="L>241  n * * * * * *pedatachedsched_inctx tid_xfvryent_>a>)
3941a>)
3942a> *ctx PERF_SAMPLE_TIMEent_>ample_> *iop/eve_e>
394/a>       23="L>241"+n * * * * * *pedatachedsched_in *a>)
394/a>  >)
394/a>       24="L>2ef="kdivisorctxsample_typfctx> *ctx PERF_SAMPLE_ADDRent_>ample_> *iop/eve_e>
394/a>
ctxa>)
394/a>       24""L>240/events/core.c#L163948id="L1639" clas2348ine" na23="L1639" c>394/a>{
ctx PERF_SAMPLE_IDent_>>)
394/a>       22="L>228= dddddddddddddddpe_evoutput_putctx> * * * * *pedatachedsched_ina>)
3950a>  >)
395/a> *ctx PERF_SAMPLE_STREAM_IDent_>>)
395/a> * * * * *pedatachedsched_ina>)
395/a>  >)
395/a>242=  *ctx PERF_SAMPLE_CPUent_>>)
395/a>       24="L>237  _in * * * * *pedatachedsched_inctx cpu_xfvryent_>a>)
395/a>)
3957a>       22="L>2ef="kdivisorctxsample_typfctx> *ctx PERF_SAMPLE_PERIODent_>>)
395/a>{
239"+code=uppe_evoutput_putctx> * * * * *pedatachedsched_ina>)
3959a>       24""L>240/events/core.c#L16396 id="L1639" clas236line" na23="L1539" c>3960a>       22="L>2ef="kdivisorctxsample_typfctx> *ctx PERF_SAMPLE_READent_>>)
396/a>242=  * * * *ctx hrefvent_>a>)
396/a>240/events/core.c#L153963id="L1639" clas2363ine" na23="L1539" c>3963a>       22="L>2ef="kdivisorctxsample_typfctx> *ctx PERF_SAMPLE_CALLCHAINent_>rsample_> *iop/eve_e>
396/a> *pedatachedsched_inctx callchainent_>rsample_> *iop/eve_e>
396/a>       24="L>237          "ddddddddddddddddddsizcctx> *)
396/a>)
3967a> *pedatachedsched_inctx callchainent_>>)
396/a>{
 *pedatachedsched_inctx callchainent_sched_inctx nrent_a>)
3969a>       24""L>240/events/core.c#L16397 id="L1639" clas237line" na23="L1539" c>397 a>       24="L>241          "">16time * *ctx u6/a>)
3971a>)
397/a>16timectx __output_copy * * * *pedatachedsched_inctx callchainent_n n * *)
397/a>       23="L>241"+}=elsersample_> *iop/eve_e>
397/a>16timectx u6/a>242= ctx nrent_ hr0a>)
397/a>       24="L>237          "">16time * * * *ctx nrent_)a>)
397/a>
3977a>397/a>{
>)
3979a>       23="L>2"L>242=  *ctx PERF_SAMPLE_RAWent_>rsample_> *iop/eve_e>
398 a>       24="L>241  "L>2ef="kdivisorctxdatac> *pedatachedsched_inctx rawent_>rsample_> *iop/eve_e>
398/a>16time * * * * *pedatachedsched_inctx rawent_sched_in *)
398/a>16timectx __output_copy * * * *pedatachedsched_inctx rawent_sched_in *pedatachednample_> *iop/eve_e>
398/a>       23="L>241"++++++++++++++++++++++++++++n * *pedatachedsched_inctx rawent_sched_in *)
398/a> *iop/eve_e>
398/a>       24="L>237          "L>242 sample_> *iop/eve_e>
398/a>
16timectx u32a> *)
3987a>16timectx u32a> *pedatacheda>)
398/a>{
ctx rawent_ hrsample_> *iop/eve_e>
398/a>       22="L>228=                 ._in * *ctx u32a> *iop/eve_e>
399 a>       24="L>241                  ._in *pedatached hr0nample_> *iop/eve_e>
399/a>399/a>16time * * * *ctx rawent_>a>)
399/a>       23="L>241"+ 6     6      struc}ts/core.c#L163994id="L1639" clas2394ine" na23="L1539" c>399/a>399/a>       24""L>240ment"ts/core.c#L153996id="L1639" clas2396ine" na23="L1539" c>3996a>       23="L>2!n *ctx hrefvent_sched_inctxctxrsample_> *iop/eve_e>
3997a>ctx
 *ctx hrefvent_sched_inctx
ctx
)
399/a>{
>)
399/a>       22="L>228= "L>2"L>242= 
ctx
rsample_> *iop/eve_e>
40" a>       24="L>237          "L>242 n *ctx re"g_buff eent_ *n * * *)/pre>
mple_> *iop/eve_e>
40"/a>
ctx
 *ctx local_inc_return
ctx
a>)
40"/a>240/events/core.c#L1540"3id="L1640" clas2393ine" na23="L1540" c>40"/a>       23="L>241"+++++++++"L>2_inctx
 *
ctx
rsample_> *iop/eve_e>
40"/a> * *
ctx

ctx
a>)
40"/a>       24="L>237          +++++ 4=n *ctx local_incctxa>)
40"/a>
40"7a>40"/a>{
40"9a>       24""L>240/events/core.c#L16401 id="L1640" clas241line" na24="L1640" c>40" a>       23="L>2"L>242=  *ctx PERF_SAMPLE_BRANCH_STACKched>rsample_> *iop/eve_e>
40"/a>2ef="kdivisorctxdatac> *pedatachedsched_inctxrsample_> *iop/eve_e>
40"/a>16time242=  *)
40"/a>  >)
40"/a>16time *ctxctx nrent_>)
40"/a>       24="L>237          +++++* sizcofi"L>242   6     6   =perf_evbranch_xfvryass="sref">ctx rf_evbranch_xfvryched>a>)
40"/a>)
40"7a>16time * * * * *pedatachedsched_inctxctx nrent_>a>)
40"/a>{
16timectx pe_evoutput_copy * * * *pedatachedsched_inctxctx xfvriesent_n n * *)
40"/a>       22="L>228= }=elsersample_> *iop/eve_e>
40" a>{
/*)
40"/a>=========7          +++++* we always ste.c at le23t the value of nrenspans>)
40"/a>=========7          +++++*/)
40"/a>       23="L>241"+++++++++n *ctx u6/a>242= ctx nrent_ hr0a>)
40"/a>16time * * * *ctx nrent_)a>)
40"/a>       24="L>237   6     6      struc}ts/core.c#L164026id="L1640" clas2426ine" na24="L1640" c>40"/a>
40"7a>40"/a>{
>)
40"/a>  voidmext_time242   6     6   =perf_event_c_head eass="sref">ctx prefvent_s_head eched_in *ctx head echednample_> *iop/eve_e>
40" a>       24="L>237          +"L>242   6     6   =perf_evsample_datac> *pepf_evsample_datached_in * *pedatachednample_> *iop/eve_e>
40"/a>242   6     6   =perf_event_context" cl * *ctx hrefvent_nample_> *iop/eve_e>
40"/a>242   6     6   =pert_regsass="sref">ctx rt_regsent_ *n *ctx regsent_>>)
40"/a>  sample_> *iop/eve_e>
40"/a> *ctx u6/a>242=  *ctx hrefvent_sched_inctx *)
40"/a>       24""L>240ment"ts/core.c#L1540"6id="L1640" clas2436ine" na24="L1640" c>40"6a>       24=n *ctx head echedsched_in *ctx PERF_RECORD_SAMPLEent_a>)
40"7a>       24=n *ctx head echedsched_in * *ctx head eched> +="L>242= ctx hrefvent_sched_in *)
40"/a>{
>)
40"9a>       24=n *ctx head echedsched_inctx miscent_ hr0a>)
40" a>       24=n *ctx head echedsched_inctx miscent_ |href="kdivisorctxprefvmisc_flagsass="sref">ctx rrefvmisc_flags *ctx regsent_>a>)
40"1a>)
40"2a>16time *ctx head echedn n * *pedatachedn n *ctx hrefvent_>a>)
40"/a>  >)
40"/a>242=  *ctx PERF_SAMPLE_IPent_>     24""L>240/events/core.c#L1640"5id="L1640" clas2345ine" na23="L1640" c>40"/a>       24="L>237  _in *pedatachedsched_inctx ipched href="kdivisorctxprefvin"L>242ion_point eass="sref">ctx prefvin"L>242ion_point e *ctx regsent_>a>)
40"/a>)
40"7a>       22="L>2ef="kdivisorctxsample_typfctx> *ctx PERF_SAMPLE_CALLCHAINent_>rsample_> *iop/eve_e>
40"/a>{
 *)
40"9a>       24""L>240/events/core.c#L16405 id="L1640" clas235line" na23="L1540" c>40" a>       24="L>237  _in *pedatachedsched_inctx callchainent_ href="kdivisorctxprefvcallchainass="sref">ctx prefvcallchain *ctx hrefvent_np"L>242= ctx regsent_>a>)
40"1a>)
40"/a>2ef="kdivisorctxdatac> *pedatachedsched_inctx callchainent_>>)
40"/a>       23="L>241"+++++++++n * *ctx callchainent_sched_inctx nrent_a>)
40"/a>  >)
40"/a>       24="L>237  _inctx head echedsched_in *ctx u6/a>)
40"/a>
40"/a>       24""L>240/events/core.c#L1640"8id="L1640" clas2358ine" na23="L1640" c>40"/a>{
ctx PERF_SAMPLE_RAWent_>rsample_> *iop/eve_e>
40"/a>       22="L>228= "ddddddddddddddddddsizcctx> * *ctx u32a>)
40" a>       24""L>240/events/core.c#L164061id="L1640" clas2361ine" na23="L1540" c>40"/a>2ef="kdivisorctxdatac> *pedatachedsched_inctx rawent_>     24""L>240/events/core.c#L164062id="L1640" clas2362ine" na23="L1540" c>40"/a>16time *ctx rawent_sched_in *)
40"/a>       23="L>241"+else>)
40"/a>16time * *ctx u32a>)
40"/a>       24""L>240ment"ts/core.c#L154066id="L1640" clas2366ine" na23="L1540" c>40"/a>
ctx WARN_ON_ONCE * * *ctx u6/a>a>)
40"7a>16timectx head echedsched_in *40"/a>{
40"9a>       24""L>240/events/core.c#L16407 id="L1640" clas237line" na23="L1540" c>40" a>{
ctx PERF_SAMPLE_BRANCH_STACKched>rsample_> *iop/eve_e>
40"/a> * *ctx u6/a>/* nr+*/)
40"/a>2ef="kdivisorctxdatac> *pedatachedsched_inctxrsample_> *iop/eve_e>
40"/a>       23="L>241"+++++++++n * *ctxctx nrent_>)
40"/a>242   6     6   =perf_evbranch_xfvryass="sref">ctx rf_evbranch_xfvryched>a>)
40"/a>       24="L>237   6     6      struc}ts/core.c#L164076id="L1640" clas2376ine" na23="L1540" c>40"/a>
ctx head echedsched_in *40"7a>40"/a>{
 6     6      struc}ts/core.c#L1640"9id="L1640" clas2379ine" na23="L1540" c>40"9a>       24""L>240/events/core.c#L16408 id="L1640" clas238line" na23="L1540" c>40" a>  static voidmext_timectx rf_event_s_output242   6     6   =perf_event_context" cl * *ctx hrefvent_nample_> *iop/eve_e>
40"/a>242   6     6   =perf_evsample_datac> *pepf_evsample_datached_in * *pedatachednample_> *iop/eve_e>
40"/a>242   6     6   =pert_regsass="sref">ctx rt_regsent_ *n *ctx regsent_>>)
40"/a>  sample_> *iop/eve_e>
40"/a>40"5a>ctx prefvent_s_head eched_dddddddddddddddhead eass="sref">ctx head echeda>)
40"/a>)
40"7a>       24=nspanlas2392icomm cla>/* protect the callchain buff es+*/)
40"/a>{
 *ctxa>)
40"9a>       24""L>240/events/core.c#L16409 id="L1640" clas239line" na23="L1540" c>40" a>{
 *ctx head echedn n * *pedatachedn n *ctx hrefvent_np"L>242= ctx regsent_>a>)
40"1a>)
40"2a>ctx prefvoutput_begin * *ctx hrefvent_n cal64_sefvent"ahead eass="sref">ctx head eched._in *>)
40"/a>       23="L>241"+goto n *ctx hxilcheda>)
40"/a>  >)
40"5a>{
 * *ctx head echedn n * *pedatachedn n *ctx hrefvent_>a>)
40"/a>)
40"7a>       24=n * * *a>)
40"/a>{
>)
40"9a>  n *ctx hxilched:>)
410 a>{
 *ctxa>)
41"/a>41"/a>240/events/core.c#L1541"3id="L1641" clas2393ine" na23="L1541" c>41"/a>  "spanlas2392icomm cla>/*)
41"/a>=* read ent_s_id)
41"/a>  _spanlas2392icomm cla>=*/)
410/a>)
41"7a>242   6     6   =perf_evread_ent_context" cl *{
 *iop/eve_e>
41"/a>{
ctx prefvent_s_head eched_a hr23=n *ctx head echeda>)
41"9a>       24""L>240/events/core.c#L16411 id="L1641" clas241line" na24="L1641" c>411 a>{
 *ctx u32a>)
41"/a> *ctx u32a>)
41"/a>)
41"/a>  >)
41"/a>)
41"/a>    6     6   =perf_event_c_read_ent_context" cl *242   6     6   =perf_event_context" cl * *ctx hrefvent_nample_> *iop/eve_e>
411/a>
242   6     6   =petask_"L>242e_from*242ched_in *>)
41"7a> *iop/eve_e>
411/a>{
41"/a>       22="L>242   6     6   =perf_evsample_datac> *pepf_evsample_datached_n * *)
41" a>{
{
<"L>242= {
 *iop/eve_e>
412/a>ctx head eched *iop/eve_e>
4122a> *ctx PERF_RECORD_READent_nample_> *iop/eve_e>
41"/a>       23="L>241"+++++++++._inctx miscent_ hr0nample_> *iop/eve_e>
41"/a> * *{
> +="L>242= ctx hrefvent_sched_in * *iop/eve_e>
41"/a>       24="L>237   nample_> *iop/eve_e>
412/a>
ctx hrefvent_n cal64_sefvent"ataske_from*nample_> *iop/eve_e>
4127a>ctx hrefvent_n cal64_sefvent"ataske_from*nample_> *iop/eve_e>
412/a>{
)
4129a>       23="ddddddddddddddddddrecontext" cl *)
413 a>       24""L>240/events/core.c#L1641"1id="L1641" clas2431ine" na24="L1641" c>413/a> *{
._inctx head echedn n * *ctx hrefvent_>a>)
4132a>16timectx prefvoutput_begin * *ctx hrefvent_n cal64_sefvent"aread_ent_context" cl *{
._inctx head eched._in *)
4133a>       22="L>2ef="kdivisorctxrecontext" cl *>)
413/a>)
41"/a>       24""L>240ment"ts/core.c#L1541"6id="L1641" clas2436ine" na24="L1641" c>41"6a>       24=n * * * *{
>a>)
41"7a>       24=n * * * *ctx hrefvent_>a>)
413/a>{
 * *ctx hrefvent_n n * *a>)
4139a>       24""L>240/events/core.c#L16414 id="L1641" clas234line" na23="L1641" c>41" a>       24=n * * *a>)
414/a>414/a>240/events/core.c#L1541"3id="L1641" clas2343ine" na23="L1641" c>414/a>  "spanlas2392icomm cla>/*)
414/a>=* task tracking -- fork/hxilchspans>)
414/a>  _spanlas2392icomm cla>=*chspans>)
41"/a>=* enabled by: attr.comm | attr.mmap | attr.mmap_data | attr.taskenspans>)
41"7a>  _spanlas2392icomm cla>=*/)
414/a>{
>)
41"9a>  "L>242   6     6   =perf_evtask_ent_context" cl *{
 *iop/eve_e>
415 a>{
242e_from*242ched______________in *)
4151a>{
{
 *)
415/a>240/events/core.c#L1541"3id="L1641" clas2353ine" na23="L1541" c>41"/a>       23="L>242 sample_> *iop/eve_e>
415/a>ctx prefvent_s_head eched_a hr23=n *ctx head echeda>)
415/a>       24""L>240ment"ts/core.c#L1541"6id="L1641" clas23=6ine" na23="L1541" c>415/a>
ctx u32a>)
4157a>16timectx u32a>)
415/a>{
ctx u32a>)
41"/a>       22="L>228= "">16timectx u32a>)
416 a>       24="L>237  _inctx u6/a> *)
41"/a>ctx hrefv_id)
416/a>)
416/a>  >)
416/a>ctx rf_event_s_task_output242   6     6   =perf_event_context" cl * *ctx hrefvent_nample_> *iop/eve_e>
416/a>       24="L>237          +++++ 4======"L>242   6     6   =perf_evtask_ent_context" cl *{
 *{
>>)
41"/a>
 *iop/eve_e>
41"7a>416/a>{
416/a>       22="L>242   6     6   =petask_"L>242e_from*242ched_in *{
sched_in)
41" a>{
 * *{
sched_inctx hrefv_idctx head eched._in *)
4171a>)
4172a>16time{
sched_inctx hrefv_idctx head echedn n * *ctx hrefvent_>a>)
417/a>  >)
41"/a>16timectx prefvoutput_begin * *ctx hrefvent_n>)
41"/a>       24="L>237  cccccccccccccccc  6     6   =petask_ent_context" cl *{
sched_inctx hrefv_idctx head eched._in *)
41"/a>
>)
4177a> *ctx oulcheda>)
417/a>{
>)
4179a>       24=n *{
sched_inctx hrefv_idctx hrefvent_n cal64_sefvent"ataske_from*a>)
418 a>       24=n *{
sched_inctx hrefv_idctx hrefvent_n cal64_sefvent"acurr class="sref">ctx curr clent_>a>)
4181a>)
4182a>16time{
sched_inctx hrefv_idctx hrefvent_n cal64_sefvent"ataske_from*a>)
4183a>16time{
sched_inctx hrefv_idctx hrefvent_n cal64_sefvent"acurr class="sref">ctx curr clent_>a>)
418/a>  >)
41"5a> * * *{
sched_inctx hrefv_ida>)
41"/a>)
4187a>       24=n * *ctx hrefvent_n n * *a>)
418/a>{
>)
4189a>       24=n * * *a>)
41" a>{
n *ctx oulched:>)
419/a> *{
sched_inctx hrefv_idctx head eched._in *41"2a>419/a>  >)
419/a>ctx rf_event_s_task_match242   6     6   =perf_event_context" cl * *ctx hrefvent_>>)
41"5a>{
sample_> *iop/eve_e>
419/a>
ctx hrefvent_sched_in *
 *>)
4197a>)
41"/a>{
>)
4199a>
ctx ent_s_filter_match *ctx hrefvent_)>>)
420 a>       24="L>237  returnr0a>)
4201a>)
4202a>ctx hrefvent_sched_inctxctx comma>242= ctx hrefvent_sched_inctxctx)
420/a>       23="L>2"L>242= ctx hrefvent_sched_inctx *pemmap_dataa>242= ctx hrefvent_sched_inctx>)
420/a>)
420/a>       24""L>240ment"ts/core.c#L1542"6id="L1642" clas2396ine" na23="L1542" c>420/a>
)
42"7a>420/a>{
>)
4209a>242   6     6   =perf_event_c_contexcontext" cl *{
 *)
421 a>       24="L>237                    "L>242   6     6   =perf_evtask_ent_context" cl *{
 *{
>>)
42"/a> *iop/eve_e>
4212a> *ctx hrefvent_a>)
42"/a>  >)
421/a>16timectx liss_for_each_xfvry_rcu *ctx hrefvent_n nctx ent_s_lisschedn n *ctx x" cl_xfvrya>{
> sample_> *iop/eve_e>
421/a>       24="L>237  "L>2ef="kdivisorctxpe_event_s_task_matchass="sref">ctx rf_event_s_task_match *ctx hrefvent_)>>)
421/a>
ctx rf_event_s_task_output *ctx hrefvent_n cal64_sefvent"atask_ent_context" cl *{
>a>)
4217a>421/a>{
 6     6      struc}ts/core.c#L1642"9id="L1642" clas24=9ine" na24="L1642" c>4219a>       24""L>240/events/core.c#L16422 id="L1642" clas242line" na24="L1642" c>422 a>  static voidmext_time242   6     6   =perf_evtask_ent_context" cl *{
 *{
>>)
422/a> *iop/eve_e>
4222a>{
 *)
422/a>       23="L>242   6     6   =perf_event_c_contexcontext" cl *{
 *)
42"/a>ctx rmua>{
 *ctx rmua>{
a>)
42"/a>       24="ddddddddddddddddddctxnass="sref">ctx ctxna>{
a>)
422/a>)
4227a>       24=n *ctxa>)
422/a>{
 *ctx liss_for_each_xfvry_rcu *ctx rmua>{
n nctx rmuschedn n *ctx xfvrya>{
> sample_> *iop/eve_e>
422/a>       22="L>228= "">16timectx *ctx rmua>{
sched_in{
>a>)
423 a>       24="L>237  "L>2ef="kdivisorctxcpuctxe_from*ctx active_rmua>   !href="kdivisorctxpmuass="sref">ctx rmua>{
>>)
423/a>{
a>)
4232a>{
>a>)
423/a>  >)
423/a>{
sched_in)
423/a>       24="L>237  "L>2!_in sample_> *iop/eve_e>
423/a>
ctx ctxna>{
 href="kdivisorctxpmuass="sref">ctx rmua>{
sched_inctx task_ctx_neent_a>)
4237a>2ef="kdivisorctxctxnass="sref">ctx ctxna>{
 <or0>>)
423/a>{
237          goto n *{
a>)
423/a>       22="L>228=         _in * *ctx curr clent_sched_inctxctx ctxna>{
]>a>)
424 a>       24="L>237   6     6      struc}ts/core.c#L164241id="L1642" clas2341ine" na23="L1642" c>424/a>2ef="kdivisorctxctxe_from*6     6      struc}ts/core.c#L164242id="L1642" clas2342ine" na23="L1642" c>4242a>{
>a>)
424/a>  " *{
:>)
424/a>ctx *ctx rmua>{
sched_in{
>a>)
424/a>       24= 6     6      struc}ts/core.c#L164246id="L1642" clas2346ine" na23="L1642" c>4246a>       24=n *ctxa>)
4247a>424/a>{
>)
4249a>242   6     6   =petask_"L>242e_from*242ched_in *)
425 a>       24="L>237                "L>242   6     6   =perf_event_c_contexcontext" cl *{
 *)
425/a>6     6      struc}ts/core.c#L164252id="L1642" clas2352ine" na23="L1542" c>425/a> *iop/eve_e>
42"/a>       23="L>242   6     6   =perf_evtask_ent_context" cl *{
{
a>)
425/a>  >)
425/a>       24="L>2!_in *ctx nr_comm_ent_cs n)
425/a>
 *ctx nr_mmap_ent_cs n)
4257a> *ctx nr_task_ent_csent_)>>)
425/a>{
4259a>       24""L>240/events/core.c#L16426 id="L1642" clas236line" na23="L1542" c>426 a>       24=n *{
 hri"L>242   6     6   =perf_evtask_ent_context" cl *{
)sample_> *iop/eve_e>
426/a>4262a>426/a>       23="L>241"+._inctx hrefv_id *iop/eve_e>
426/a>ctx head eched *iop/eve_e>
426/a>       24="L>237          +++++ 4=._in *)
426/a>
ctx miscent_ hr0nample_> *iop/eve_e>
4267a> * *{
._inctx hrefv_idnample_> *iop/eve_e>
426/a>{
237   nample_> *iop/eve_e>
426/a>       22="L>228=         _spanlas2392icomm cla>/* .pidr=*/)
427 a>       24="L>237          _spanlas2392icomm cla>/* .ppidr*/)
427/a>4272a>/* .ptidr*/)
427/a>       23="L>241"+++++++++._in *ctxnample_> *iop/eve_e>
427/a> *iop/eve_e>
42"/a>       24=}a>)
427/a>)
4277a>       24=n *{
>a>)
427/a>{
 6     6      struc}ts/core.c#L1642"9id="L1642" clas2379ine" na23="L1542" c>4279a>       24""L>240/events/core.c#L16428 id="L1642" clas238line" na23="L1542" c>428 a>  voidref="kdivisorctxprefvent_c_forkontext" cl *242   6     6   =petask_"L>242e_from*242ched_in *>)
428/a> *iop/eve_e>
4282a>16time16timea>)
4283a>428/a>  >)
428/a>  _spanlas2392icomm cla>/*)
428/a>=* comm tracking)
4287a>  _spanlas2392icomm cla>=*/)
428/a>{
>)
4289a>  "L>242   6     6   =perf_evcomm_ent_cass="sref">ctx *iop/eve_e>
429 a>{
242e_from*242ched______in *)
429/a> *ctx comma>)
4292a>429/a>  >)
429/a>429/a>       24="L>237  "L>242   6     6   =perf_event_c_head eass="sref">ctx prefvent_s_head eched_a hr23=n *ctx head echeda>)
429/a>)
4297a> *ctx u32a>)
429/a>{
ctx u32a>)
4299a>
ctx hrefv_id)
430 a>  }a>)
4301a>)
4302a>ctx rf_event_s_comm_output242   6     6   =perf_event_context" cl * *ctx hrefvent_nample_> *iop/eve_e>
430/a>       23="L>22222222222222222222222222"L>242   6     6   =perf_evcomm_ent_cass="sref">ctx *ctx>)
430/a> *iop/eve_e>
4305a>{
430/a>
4307a> * *ctxctx hrefv_idctx head eched._in *)
4308a>)
4309a>       24""L>240/events/core.c#L16431 id="L1643" clas241line" na24="L1643" c>431 a>       24=n *ctxctx hrefv_idctx head echedn n * *ctx hrefvent_>a>)
431/a> *ctx prefvoutput_begin * *ctx hrefvent_n>)
4312a> *ctxctx hrefv_idctx head eched._in *)
43"/a>  >)
431/a>>)
431/a>       24="L>237  goto n *ctx oulcheda>)
431/a>)
4317a>       24=n *ctxctx hrefv_idctx hrefvent_n cal64_sefvent"acomm_ent_cass="sref">ctxa>)
431/a>{
 *ctxctx hrefv_idctx hrefvent_n cal64_sefvent"acomm_ent_cass="sref">ctxa>)
4319a>       24""L>240/events/core.c#L16432 id="L1643" clas242line" na24="L1643" c>432 a>       24=n * * * *ctxctx hrefv_ida>)
432/a> *ctx _voutput_copy * *ctxctx comma>)
4322a> *ctx *a>)
432/a>  >)
43"/a> *ctx hrefvent_n n * *a>)
432/a>       24""L>240ment"ts/core.c#L1543"6id="L1643" clas2426ine" na24="L1643" c>4326a>       24=n * * *a>)
4327a>  n *ctx oulched:>)
432/a>{
 *ctxctx hrefv_idctx head eched._in *432/a>   6     6      struc}ts/core.c#L16433 id="L1643" clas243line" na24="L1643" c>433 a>  6     6      struc}ts/core.c#L164331id="L1643" clas2431ine" na24="L1643" c>433/a>ctx rf_event_s_comm_match242   6     6   =perf_event_context" cl * *ctx hrefvent_>>)
433/a> *iop/eve_e>
433/a>       23="L>2ef="kdivisorctxx" class="sref">ctx hrefvent_sched_in *
 *>)
433/a>)
433/a>       24""L>240ment"ts/core.c#L1543"6id="L1643" clas2436ine" na24="L1643" c>433/a>
ctx ent_s_filter_match *ctx hrefvent_)>>)
4337a>)
433/a>{
>)
4339a>
ctx hrefvent_sched_inctxctx comma>>)
434 a>       24="L>237  returnr1a>)
4341a>)
4342a>)
4343a>434/a>  >)
434/a>  static voidref="kdivisorctxprefvent_c_comm_ctxe_from*242   6     6   =perf_event_c_contexcontext" cl *{
 *)
434/a>
242   6     6   =perf_evcomm_ent_cass="sref">ctx *ctx>)
4347a> *iop/eve_e>
434/a>{
 *ctx hrefvent_a>)
4349a>       24""L>240/events/core.c#L16435 id="L1643" clas235line" na23="L1543" c>435 a>       24=n *ctx liss_for_each_xfvry_rcu *ctx hrefvent_n nctx ent_s_lisschedn n *ctx x" cl_xfvrya>{
> sample_> *iop/eve_e>
435/a>2ef="kdivisorctxpe_event_s_comm_matchass="sref">ctx rf_event_s_comm_match *ctx hrefvent_)>>)
4352a>ctx rf_event_s_comm_output *ctx hrefvent_n cal64_sefvent"acomm_ent_cass="sref">ctxa>)
43"/a>       23= 6     6      struc}ts/core.c#L1643"4id="L1643" clas2354ine" na23="L1543" c>435/a>   6     6      struc}ts/core.c#L1643"5id="L1643" clas23=5ine" na23="L1543" c>435/a>       24""L>240ment"ts/core.c#L1543"6id="L1643" clas23=6ine" na23="L1543" c>435/a>
242   6     6   =perf_evcomm_ent_cass="sref">ctx *ctx>)
4357a> *iop/eve_e>
435/a>{
{
 *)
4359a>{
{
 *)
436 a>       24=char _inctx comma>ctx TASK_COMM_LENa>)
436/a> *)
4362a>ctx rmua>{
 *ctx rmua>{
a>)
436/a>       23="ddddddddddddddddddctxnass="sref">ctx ctxna>{
a>)
436/a>  >)
436/a>       24=dddddddddddddddmemsecontext" cl * *ctx comma> *ctx comma>>a>)
4366a>       24=n *lcpyass="sref">ctx "L>lcpy *ctx comma>ctxctx comma> *ctx comma>>a>)
4367a>       24=n * *ctx ALIGN *lenass="sref">ctx "L>len *ctx comma> *ctx u6/a>  >>a>)
436/a>{
>)
4369a>       24=n *ctxctx comma> *ctx comma>)
437 a>       24=n *ctx *4371a>)
4372a>16timectxctx hrefv_idctx head eched._in * *ctxctx hrefv_id +ref="kdivisorctxsizcctx> *)
437/a>       23=ef="kdivisorctxrcu_read_lockass="sref">ctxa>)
437/a> *ctx liss_for_each_xfvry_rcu *ctx rmua>{
n nctx rmuschedn n *ctx xfvrya>{
> sample_> *iop/eve_e>
437/a>       24="L>237  n *ctx *ctx rmua>{
sched_in{
>a>)
437/a>
2ef="kdivisorctxcpuctxe_from*ctx active_rmua>   !href="kdivisorctxpmuass="sref">ctx rmua>{
>>)
4377a>{
a>)
437/a>{
ctxa>)
4379a>       24""L>240/events/core.c#L16438 id="L1643" clas238line" na23="L1543" c>438 a>       24="L>237  dddddddddddddddctxnass="sref">ctx ctxna>{
 href="kdivisorctxpmuass="sref">ctx rmua>{
sched_inctx task_ctx_neent_a>)
438/a>2ef="kdivisorctxctxnass="sref">ctx ctxna>{
 <or0>>)
4382a> *{
a>)
438/a>  >)
438/a>ctx curr clent_sched_inctxctx ctxna>{
]>a>)
438/a>       24="L>237  "L>2ef="kdivisorctxctxe_from*6     6      struc}ts/core.c#L164386id="L1643" clas2386ine" na23="L1543" c>438/a>
ctxa>)
4387a>  n *{
:>)
438/a>{
ctx *ctx rmua>{
sched_in{
>a>)
4389a>
)
439 a>       24=n *ctxa>)
439/a>)
4392a>)
439/a>  voidref="kdivisorctxprefvent_c_comme_from*242   6     6   =petask_"L>242e_from*242ched_in *>)
439/a> *iop/eve_e>
439/a>       24="L>242   6     6   =perf_evcomm_ent_cass="sref">ctxctx)
439/a>
{
 *)
4397a>ctx ctxna>{
a>)
439/a>{
>)
4399a>       24=n *ctx for_each_task_contexc_nectx ctxna>{
> sample_> *iop/eve_e>
440 a>       24="L>237  dddddddddddddddctxe_from*ctxctx ctxna>{
]a>)
440/a>2!_in>)
4402a>)
440/a>  >)
440/a>ctx prefvent_c_enable_on_execa>)
4405a>{
)
440/a>)
4407a> *ctx nr_comm_ent_cs>>)
440/a>{
4409a>       24""L>240/events/core.c#L16441 id="L1644" clas241line" na24="L1644" c>441 a>       24=n *ctx242   6     6   =perf_evcomm_ent_cass="sref">ctx *iop/eve_e>
441/a>4412a>/* .comm      */)
441/a>       23="L>22222espanlas2392icomm cla>/* .comm_sizc */)
441/a>ctx hrefv_id *iop/eve_e>
441/a>       24="L>237          ._inctx head eched *iop/eve_e>
441/a>
 *4417a>ctx miscent_ hr0nample_> *iop/eve_e>
441/a>{
22222espanlas2392icomm cla>/* .sizc */)
441/a>       22="L>228=          nample_> *iop/eve_e>
442 a>       24="L>237          _spanlas2392icomm cla>/* .pidr*/)
442/a>4422a> *iop/eve_e>
442/a>       23= a>)
442/a>  >)
442/a>       24=dddddddddddddddprefvent_c_comm_ent_context" cl *ctxa>)
4426a>  }>)
4427a>  >)
442/a>{
_spanlas2392icomm cla>/*)
442/a>  _spanlas2392icomm cla>=* mmap tracking)
443 a>  _spanlas2392icomm cla>=*/)
4431a>)
4432a>242   6     6   =perf_evmmap_ent_context" cl *   sample_> *iop/eve_e>
443/a>       23="L>242   6     6   =pevm_area_"L>242e_from*242a>     in * *pevmaa>{
a>)
443/a>  >)
443/a>       24=const=char 23="L>241"+++in *ctx file_24="a>{
a>)
443/a>
4437a>  >)
443/a>{
443/a>       22="L>228= "L>242   6     6   =perf_event_c_head eass="sref">ctx prefvent_s_head eched_a hr23=n *ctx head echeda>)
444 a>  6     6      struc}ts/core.c#L164441id="L1644" clas2341ine" na23="L1644" c>444/a>ctx u32a>)
4442a> *ctx u32a>)
444/a>       23="L>22222e *ctx u6/a>  pan ccccccccccccccccccccccccc  6     6   =pestar2e_from*)
444/a>ctx u6/a>  pan ccccccccccccccccccccccccc  6     6   =pelenass="sref">ctx len)
444/a>       24="L>237  n *ctx u6/a>  pan ccccccccccccccccccccccccc  6     6   =pepgoffe_from*)
444/a>
ctx hrefv_id)
4447a>)
444/a>{
>)
4449a>  "Latic voidref="kdivisorctxprefvent_c_mmap_outputass="sref">ctx rf_event_s_mmap_outputa>242   6     6   =perf_event_context" cl * *ctx hrefvent_nample_> *iop/eve_e>
445 a>       24="L>237                       st>242   6     6   =perf_evmmap_ent_context" cl *   in *  >>)
445/a> *iop/eve_e>
4452a>445/a>       23="L>242   6     6   =perf_evsample_datac> *pepf_evsample_datached_n * *)
445/a> * *  sched_inctx hrefv_idctx head eched._in *)
4455a>)
445/a>)
4457a>       24=n *  sched_inctx hrefv_idctx head echedn n * *ctx hrefvent_>a>)
445/a>{
ctx prefvoutput_begin * *ctx hrefvent_n>)
445/a>       22="L>228=           sched_inctx hrefv_idctx head eched._in *)
446 a>       24="L>2ef="kdivisorctxrecontext" cl *>)
446/a>ctx oulcheda>)
4462a>)
446/a>       23=ef="kdivisorctxmmap_ent_context" cl *  sched_inctx hrefv_idctx hrefvent_n cal64_sefvent"acurr class="sref">ctx curr clent_)a>)
446/a>  pan ccccef="kdivisorctxmmap_ent_context" cl *  sched_inctx hrefv_idctx hrefvent_n cal64_sefvent"acurr class="sref">ctx curr clent_)a>)
446/a>       24""L>240ment"ts/core.c#L154466id="L1644" clas2366ine" na23="L1544" c>4466a>       24=n * * * *  sched_inctx hrefv_id)
4467a>       24=n *ctx _voutput_copy * *  sched_inctx file_24="a>{
n>)
446/a>{
22222cccef="kdivisorctxmmap_ent_context" cl *  sched_in *{
)a>)
4469a>       24""L>240/events/core.c#L16447 id="L1644" clas237line" na23="L1544" c>447 a>       24=n * *ctx hrefvent_n n * *a>)
4471a>)
4472a>16time * *a>)
447/a>  n *ctx oulched:>)
447/a> *  sched_inctx hrefv_idctx head eched._in *447/a>  }>)
447/a>)
4477a>ctx rf_event_s_mmap_matcha>242   6     6   =perf_event_context" cl * *ctx hrefvent_nample_> *iop/eve_e>
447/a>{
   in *  nample_> *iop/eve_e>
447/a>       22="L>228=         ctx hxecutableched>>)
448 a>  sample_> *iop/eve_e>
448/a>ctx hrefvent_sched_in *
 *>)
4482a>)
448/a>  >)
448/a>ctx ent_s_filter_match *ctx hrefvent_)>>)
448/a>       24="L>237  returnr0a>)
448/a>)
4487a>ctx hxecutableched n *ctx hrefvent_sched_inctx *pemmap_dataent_) ||>)
448/a>{
ctx hxecutableched n *ctx hrefvent_sched_inctx *pemmapent_)>>)
448/a>       22="L>228= returnr1a>)
449 a>  6     6      struc}ts/core.c#L164491id="L1644" clas2391ine" na23="L1544" c>449/a>)
4492a>)
449/a>  >)
449/a>242   6     6   =perf_event_c_contexcontext" cl *{
 * *iop/eve_e>
449/a>       24="L>237                    st>242   6     6   =perf_evmmap_ent_context" cl *   in *  nample_> *iop/eve_e>
449/a>
ctx hxecutableched>>)
4497a> *iop/eve_e>
449/a>{
 *ctx hrefvent_a>)
4499a>       24""L>240/events/core.c#L1645" id="L1645" idas2399ine" na23="L1545" i>450 a>       24=n *ctx liss_for_each_xfvry_rcu *ctx hrefvent_n nctx ent_s_lisschedn n *ctx x" cl_xfvrya>{
> sample_> *iop/eve_e>
450/a>2dddddddddddddddrf_event_s_mmap_matchass="sref">ctx rf_event_s_mmap_matcha> *ctx hrefvent_n cal64_sefvent"ammap_ent_context" cl *  n _inctx hxecutableched>>>)
4502a>ctx rf_event_s_mmap_outputa> *ctx hrefvent_n cal64_sefvent"ammap_ent_context" cl *  >a>)
450/a>       23= 6     6      struc}ts/core.c#L1645"4id="L1645" clas2394ine" na23="L1545" c>450/a>   6     6      struc}ts/core.c#L1645"5id="L1645" clas2395ine" na23="L1545" c>450/a>       24""L>240ment"ts/core.c#L1545"6id="L1645" clas2396ine" na23="L1545" c>450/a>
242   6     6   =perf_evmmap_ent_context" cl *   in *  >>)
4507a> *iop/eve_e>
450/a>{
{
 *)
4509a>{
{
 *)
451 a>       24="L>242   6     6   =pevm_area_"L>242e_from*242a>   in * *pevmaa>{
 hrn *  sched_in *pevmaa>{
a>)
451/a> *{
a>)
4512a> *)
451/a>       23=char _in *petmpa>  [16]a>)
451/a> *   hrn *)
451/a>       24=const=char in *ctx 24="a>{
a>)
451/a>
ctx rmua>{
 *ctx rmua>{
a>)
4517a>ctx ctxna>{
a>)
451/a>{
>)
4519a>       24=n * * *petmpa>  n 0,rsizcofin * *petmpa>  >>a>)
452 a>  6     6      struc}ts/core.c#L1645"1id="L1645" clas24=1ine" na24="L1645" c>452/a> *  > sample_> *iop/eve_e>
4522a>/*)
452/a>  _spanlas2392icomm cla>=================* d_path works from the end of the rb backwards,rso we)
452/a>  _spanlas2392icomm cla>=================* need=to add enough zero bytes after the "L>ing=to handefchspans>)
452/a>  _spanlas2392icomm cla>=================* the 64bit alignm cl we do later.chspans>)
4526a>  _spanlas2392icomm cla>=================*/)
4527a> *   hrn *ctx kzalloc * *   +rsizcofin *ctx u6/a>  >n cal64_sefvent"aGFP_KERNELe_from*  >a>)
452/a>{
2!_in  > sample_> *iop/eve_e>
452/a>       22="L>228=         n *ctx 24="a>{
 href="kdivisorctxstrncpyass="sref">ctx "L>ncpy * *petmpa>  n _spanlas2392i"L>ing">"//enomem" * *petmpa>  >>a>)
453 a>       24="L>237          goto n *ctx got_24="a>{
a>)
453/a>4532a> *ctx 24="a>{
 href="kdivisorctxd_pathass="sref">ctx d_path *  sched_inctx f_path  n cal64_sefvent"aPATH_MAXctx> *  >a>)
453/a>       23="L>22222"L>2ef="kdivisorctxIS_ERRctx> * *ctx 24="a>{
)> sample_> *iop/eve_e>
453/a>  pan ccccccccccccccccccccn *ctx 24="a>{
 href="kdivisorctxstrncpyass="sref">ctx "L>ncpy * *petmpa>  n _spanlas2392i"L>ing">"//toolong" * *petmpa>  >>a>)
453/a>       24="L>237          goto n *ctx got_24="a>{
a>)
453/a>
4537a> *iop/eve_e>
453/a>{
2_inctx arch_vma_24=" *  sched_in *pevmaa>{
)> sample_> *iop/eve_e>
453/a>       22="L>228= ccccccccn *ctx 24="a>{
 href="kdivisorctxstrncpyass="sref">ctx "L>ncpy * *petmpa>  n _inctx arch_vma_24=" *  sched_in *pevmaa>{
)nample_> *iop/eve_e>
454 a>       24="L>237                        rsizcofin * *petmpa>  >>a>)
454/a>ctx got_24="a>{
a>)
4542a>454/a>  >)
454/a> *pevmaa>{
sched_in  > sample_> *iop/eve_e>
454/a>       24="L>237  ccccccccn *ctx 24="a>{
 href="kdivisorctxstrncpyass="sref">ctx "L>ncpy * *petmpa>  n _spanlas2392i"L>ing">"[vdso]" * *petmpa>  >>a>)
454/a>
ctx got_24="a>{
a>)
4547a>2_in *pevmaa>{
sched_in * *pevmaa>{
sched_in  sched_in)
454/a>{
22222e * *pevmaa>{
sched_in * * *pevmaa>{
sched_in  sched_in sample_> *iop/eve_e>
454/a>       22="L>228= ccccccccn *ctx 24="a>{
 href="kdivisorctxstrncpyass="sref">ctx "L>ncpy * *petmpa>  n _spanlas2392i"L>ing">"[heap]" * *petmpa>  >>a>)
455 a>       24="L>237          goto n *ctx got_24="a>{
a>)
455/a>2_in *pevmaa>{
sched_in * *pevmaa>{
sched_in  sched_inctx)
4552a> * *pevmaa>{
sched_in * * *pevmaa>{
sched_in  sched_inctx sample_> *iop/eve_e>
455/a>       23="L>22222ccccccccn *ctx 24="a>{
 href="kdivisorctxstrncpyass="sref">ctx "L>ncpy * *petmpa>  n _spanlas2392i"L>ing">"[stack]" * *petmpa>  >>a>)
455/a>  pan ccccccccccccccccccccgoto n *ctx got_24="a>{
a>)
455/a>       24="L>237   6     6      struc}ts/core.c#L1645"6id="L1645" clas23=6ine" na23="L1545" c>455/a>)
4557a> *ctx 24="a>{
 href="kdivisorctxstrncpyass="sref">ctx "L>ncpy * *petmpa>  n _spanlas2392i"L>ing">"//anon" * *petmpa>  >>a>)
455/a>{
ctx got_24="a>{
a>)
4559a>
)
456 a>  6     6      struc}ts/core.c#L164561id="L1645" clas2361ine" na23="L1545" c>456/a> *ctx got_24="a>{
:>)
4562a>16time *lenass="sref">ctx "L>len *ctx 24="a>{
)+1,rsizcofin *ctx u6/a>  >>a>)
456/a>  >)
456/a>  pan ccccef="kdivisorctxmmap_ent_context" cl *  sched_inctx file_24="a>{
 href="kdivisorctx24="ass="sref">ctx 24="a>{
a>)
456/a>       24=dddddddddddddddmmap_ent_context" cl *  sched_in *{
 href="kdivisorctxsizcctx> *)
456/a>)
4567a>       24=n *  sched_inctx hrefv_idctx head eched._in * *  sched_inctx hrefv_id456/a>{
>)
4569a>       24=n *ctxa>)
457 a>       24=n *ctx liss_for_each_xfvry_rcu *ctx rmua>{
n nctx rmusa>  n _inctx xfvrya>{
> sample_> *iop/eve_e>
457/a>ctx *ctx rmua>{
sched_in  >a>)
4572a>2_inctx active_rmua>ctx rmua>{
>>)
457/a>       23="L>22222ccccccccgoto n *  a>)
457/a>  pan ccccccccccccef="kdivisorctxprefvent_c_mmap_ctxe_from*  n>)
457/a>       24="L>237                    ccccccef="kdivisorctxvmac> *pevmaa>{
sched_inctx vm_flagsa>ctx VM_EXECa>  >a>)
457/a>)
4577a> *ctx ctxna>{
 href="kdivisorctxpmuass="sref">ctx rmua>{
sched_inctx  a>)
457/a>{
2_inctx ctxna>{
 <or0>>)
457/a>       22="L>228=         goto n *  a>)
458 a>  6     6      struc}ts/core.c#L164581id="L1645" clas2381ine" na23="L1545" c>458/a> * *ctx curr clent_sched_in *perrefvent_c_ctxpent_[_inctx ctxna>{
]>a>)
4582a>2_in sample_> *iop/eve_e>
458/a>       23="L>22222ccccccccn *  n>)
458/a>  pan cccccccccccccccccccc"L>22222ccccccccn * *pevmaa>{
sched_inctx vm_flagsa>ctx VM_EXECa>  >a>)
458/a>       24="L>237  }>)
458/a> *  :>)
4587a> *ctx *ctx rmua>{
sched_in  >a>)
458/a>{
)
4589a>       24=n *ctxa>)
459 a>  6     6      struc}ts/core.c#L164591id="L1645" clas2391ine" na23="L1545" c>459/a> * * *  >a>)
4592a>)
459/a>  >)
459/a>242   6     6   =pevm_area_"L>242e_from*242a>   in * *pevmaa>{
>>)
459/a>  sample_> *iop/eve_e>
459/a>
   cal64_sefvent"ammap_ent_context" cl *  a>)
4597a>  >)
459/a>{
ctx atomic_reada>ctx nrvmmap_ent_csa>  >>>)
459/a>       22="L>228= returna>)
460 a>  6     6      struc}ts/core.c#L1646"1id="L1646" clas2391ine" na23="L1546" c>460/a> *   hri"L>242   6     6   =perf_evmmap_ent_context" cl *  )sample_> *iop/eve_e>
4602a> *pevmaa>{
    hrn * *pevmaa>{
n>)
460/a>       23="L>22222espanlas2392icomm cla>/* .file_24="=*/)
460/a>  pan ccccccccccccespanlas2392icomm cla>/* .file_sizc=*/)
460/a>       24="L>237  ._inctx hrefv_id *iop/eve_e>
460/a>
ctx head eched hrsample_> *iop/eve_e>
4607a> *460/a>{
22222._inctx misc460/a>       22="L>228=         /* .sizc=*/)
461 a>       24="L>237          }n>)
461/a>4612a>/* .tidr*/)
461/a>       23="L>22222cccccccc._in * *pevmaa>{
sched_in)
461/a>  pan cccccccccccccccccccc._inctx len * *pevmaa>{
sched_in * * *pevmaa>{
sched_in)
461/a>       24="L>237          ._in *ctx u6/a>  >n * *pevmaa>{
sched_in{
 <o<or_in *)
461/a>
4617a>)
461/a>{
>)
4619a>       24=n *  >a>)
462 a>  }>)
4621a>)
4622a>/*)
462/a>  _spanlas2392icomm cla>=* IRQ throttle logging)
462/a>  _spanlas2392icomm cla>=*/)
462/a>       24""L>240ment"ts/core.c#L154626id="L1646" clas2426ine" na24="L1646" c>462/a>
242   6     6   =perf_event_context" cl * *ctx hrefvent_n2"nt _inctx hnableched>>)
4627a> *iop/eve_e>
462/a>{
 *)
4629a>{
 *)
463 a>       24="nt _in)
4631a>)
4632a>242 sample_> *iop/eve_e>
463/a>       23="L>22222"L>242   6     6   =perf_event_c_head eass="sref">ctx rf_event_c_head ea>       24=n *ctx head echeda>)
463/a>  pan ccccccccccccn *ctx u6/a>       24="L>237          cccccn *ctx ti="cheda>)
463/a>       24="L>237  n *ctx u6/a>       24="L>237          cccccn *ctx id)
463/a>
ctx u6/a>       24="L>237          cccccn *eam_idass="sref">ctx "L>eam_id)
4637a> * *iop/eve_e>
463/a>{
ctx head eched hrsample_> *iop/eve_e>
463/a>       22="L>228= cccccccc._in *464 a>       24="L>237          ._inctx misc)
464/a> * * *iop/eve_e>
4642a> *iop/eve_e>
464/a>       23="L>22222._inctx ti="ched23="L>22222href="kdivisorctxprefvclockass="sref">ctxnample_> *iop/eve_e>
464/a>ctx idctx primary_ent_s_id *ctx hrefvent_>nample_> *iop/eve_e>
464/a>       24="L>237  ._ineam_idass="sref">ctx "L>eam_idctx hrefvent_sched_inctx id *iop/eve_e>
464/a>
)
4647a>  >)
464/a>{
ctx hnableched>>)
464/a>       22="L>228= n *ctx head eched._in *465 a>  6     6      struc}ts/core.c#L164651id="L1646" clas2351ine" na23="L1546" c>465/a> *ctx pf_event_c_head e__inis_ida>ctx head echedn n * *ctx hrefvent_>a>)
4652a>)
465/a>       23=_inctx prefvoutput_begina> * *ctx hrefvent_nample_> *iop/eve_e>
465/a>  pan cccccccccccccccccccc"L>228= n *ctx head eched._in *a>)
465/a>       24="L>2_in>)
465/a>
4657a>  >)
465/a>{
ctx rf_evoutput_puta> * *)
4659a>       24=n * * *ctx hrefvent_n n * *)
466 a>       24=n * * *)
466/a>)
4662a>)
466/a>  _spanlas2392icomm cla>/*)
466/a>  _spanlas2392icomm cla>=* Generic _nts/ ovf_elow handeing, sampling.chspans>)
466/a>  _spanlas2392icomm cla>=*/)
466/a>)
4667a>  static "nt _in *242   6     6   =perf_event_context" cl * *ctx hrefvent_n>)
466/a>{
22222 4="nt _in242   6     6   =perf_evsample_datac> *perf_evsample_dataa>   in * *pedataa>  n>)
466/a>       22="L>228=         242   6     6   =pert_regsass="sref">ctx rt_regsa>   in *ctx regsa>  >>)
467 a>  sample_> *iop/eve_e>
467/a>ctx ent_csa>  2href="kdivisorctxatomic_readass="sref">ctx atomic_reada>ctx hrefvent_sched_inctx ent_s_limisched)a>)
4672a>242 cal64_sefvent"ahw_rf_event_context" cl *   in *ctx hwca>  2hrnctx hrefvent_sched_in *)
467/a>       23=_inctx u6/a>   cal64_sefvent"aseqctx> *)
467/a>  pan cccc"nt _in)
467/a>       24""L>240ment"ts/core.c#L154676id="L1646" clas2376ine" na23="L1546" c>467/a>
/*)
4677a>=========* Non-sampling counters mightc"Lill use the PMI=to fold shor2a>spans>)
467/a>{
_spanlas2392icomm cla>=========* hardware counters, igne.c those.chspans>)
467/a>  _spanlas2392icomm cla>=========*/)
468 a>       24="L>2_inctx unlikelya> *ctx hrefvent_>>>>)
468/a>4682a>)
468/a>       23=_in *ctx __this_cpu_read * *)
468/a>  pan cccc"L>2_in *ctx hwca>  sched_in * *iop/eve_e>
468/a>       24="L>237  ef="kdivisorctxhwcass="sref">ctx hwca>  sched_in *468/a>
ctx hwca>  sched_in *)
4687a> *iop/eve_e>
468/a>{
ctx hwca>  sched_in *)
468/a>       22="L>228= "L>2_inctx unlikelya>)
469 a>       24="L>237               & *ctx hwca>  sched_in * *ctx> sample_> *iop/eve_e>
469/a>ctx __this_cpu_inc * *)
4692a> *ctx hwca>  sched_in * *)
469/a>       23="L>22222ccccccccn * *ctx hrefvent_n 0)a>)
469/a>  pan ccccccccccccccccccccn *)
469/a>       24="L>237  }>)
469/a>
)
4697a>  >)
469/a>{
ctx hrefvent_sched_inctx * *iop/eve_e>
469/a>       22="L>228= _inctx u6/a>   cal64_sefvent"anowctx> *ctxa>)
470 a>       24="L>237  ef="kdivisorctxs" clas2364i">ctx s6/a>   cal64_sefvent"adeltac> *pedelta * *ctx hwca>  sched_in *pefreq_ti="_stamp)
4701a>)
4702a> *ctx hwca>  sched_in *pefreq_ti="_stamp *)
470/a>  >)
470/a>  pan cccccccccccc"L>2cal64_sefvent"adeltac> *pedelta * *pedelta *ctx TICK_NSECa>  >>)
470/a>       24="L>237  ccccccccn * * *ctx hrefvent_n n * *pedelta *ctx hwca>  sched_in * *)
470/a>
)
4707a>  >)
470/a>{
/*)
470/a>  _spanlas2392icomm cla>=========* XXX ent_s_limis mightcnot quite work as expected on inhf_ited)
471 a>  _spanlas2392icomm cla>=========* ent_csa>spans>)
471/a>=========*/)
4712a>)
471/a>       23=_inctx hrefvent_sched_in *471/a>  pan cccc"L>2_inctx ent_csa>  2& *ctx atomic_dec_and_tesla>ctx hrefvent_sched_inctx ent_s_limisched))rsample_> *iop/eve_e>
471/a>       24="L>237  n *)
471/a>
ctx hrefvent_sched_in *4717a> *ctx hrefvent_sched_inctx pendingvdisableched hr1a>)
471/a>{
ctx hrefvent_sched_inctx pendingched)a>)
4719a>
)
472 a>  6     6      struc}ts/core.c#L1647"1id="L1647" clas24=1ine" na24="L1647" c>4721a>  pan cccc"L>2_inctx hrefvent_sched_inctx  >>)
4722a> *ctx hrefvent_sched_inctx  in *ctx hrefvent_n n * *pedataa>  n n *ctx regsa>  >a>)
472/a>       23=else>)
472/a>  pan ccccccccccccef="kdivisorctxprefvent_c_outputctx> *  in *ctx hrefvent_n n * *pedataa>  n n *ctx regsa>  >a>)
472/a>       24""L>240ment"ts/core.c#L154726id="L1647" clas2426ine" na24="L1647" c>4726a>  pan cccc"L>2_inctx hrefvent_sched_inctx fasynca>  2& *ctx hrefvent_sched_in * *iop/eve_e>
4727a> *ctx hrefvent_sched_in)
472/a>{
ctx hrefvent_sched_inctx pendingched)a>)
4729a>
)
473 a>  6     6      struc}ts/core.c#L164731id="L1647" clas2431ine" na24="L1647" c>4731a>  pan ccccreturnrn *)
4732a>)
473/a>  >)
473/a>  "nt _in *242   6     6   =perf_event_context" cl * *ctx hrefvent_n>)
473/a>       24="L>237            "L>242   6     6   =perf_evsample_datac> *perf_evsample_dataa>   in * *pedataa>  n>)
473/a>
242   6     6   =pert_regsass="sref">ctx rt_regsa>   in *ctx regsa>  >>)
4737a> *iop/eve_e>
473/a>{
 * * *ctx hrefvent_n 1n n * *pedataa>  n n *ctx regsa>  >a>)
473/a>  }>)
474 a>  6     6      struc}ts/core.c#L164741id="L1647" clas2341ine" na23="L1647" c>474/a>/*)
4742a>=* Generic software _nts/ infra"L>242ure)
474/a>  _spanlas2392icomm cla>=*/)
474/a>)
474/a>  "L>242   6     6   =peswent_c_htableass="sref">ctx swent_c_htablea>{
 *iop/eve_e>
474/a>
ctx swent_c_hlissa>
ctx swent_c_hlissa>
)
4747a>
236      n *
)
474/a>{
474/a>  >)
475 a>       24=nspanlas2392icomm cla>/* Recursion avoidance="s each contexcs=*/)
475/a>ctx recursiona> *)
4752a>)
475/a>  >)
475/a>  static _in *242   6     6   =peswent_c_htableass="sref">ctx swent_c_htablea>{
n n *ctx swent_c_htablea>{
>a>)
475/a>       24""L>240ment"ts/core.c#L1547"6id="L1647" clas23=6ine" na23="L1547" c>475/a>
<_spanlas2392icomm cla>/*)
4757a>=* We directly="ncrem cl _nts/schedcount and keep a second value="s)
475/a>{
_spanlas2392icomm cla>=* _nts/schedhw.rf_iod_left=to count intervals. This rf_iod hrefvenspans>)
475/a>  _spanlas2392icomm cla>=* is kept in the range [-sample_rf_iod, 0] so that we canluse theenspans>)
476 a>  _spanlas2392icomm cla>=* sign as trigger.chspans>)
476/a>=*/)
4762a>)
476/a>  static _inctx u6/a>   cal64_sefvent"arf_evswent_c_set_rf_iodctx> *242   6     6   =perf_event_context" cl * *ctx hrefvent_>>)
476/a>  sample_> *iop/eve_e>
4765a>
   in *ctx hwca>  2hrnctx hrefvent_sched_in *)
476/a>
ctx u6/a>   cal64_sefvent"arf_iodctx> *ctx hwca>  sched_in *)
4767a>
ctx u6/a>   cal64_sefvent"anrass="sref">ctx{
n n *)
476/a>{
ctx s6/a>   cal64_sefvent"aoldctx> *{
n n * *)
476/a>  >)
477 a>       24=n *ctx hwca>  sched_in *ctx hwca>  sched_inctx sample_rf_iodcheda>)
4771a>)
4772a>ctx againa>)
477/a>       23=_in *{
chrn * * *ctx local64_reada>ctx hwca>  sched_in *{
>a>)
477/a>  pan cccc"L>2_in *>)
477/a>       24="L>237  returnr0a>)
477/a>)
4777a>
ctx{
chrn *ctx div64_u"  * * * * * *a>)
477/a>{
ctx{
c* n * *)
4779a>       24=n * *)
478 a>       24="L>2_inctx local64_cmpxchga>ctx hwca>  sched_in *{
n n * *{
n n * * *{
>>)
478/a>ctx againa>)
4782a>)
478/a>       23=returnrn *ctx{
a>)
478/a>  }>)
478/a>       24""L>240ment"ts/core.c#L154786id="L1647" clas2386ine" na23="L1547" c>478/a>
242   6     6   =perf_event_context" cl * *ctx hrefvent_n=_inctx u6/a>   cal64_sefvent"aovf_elowctx> *)
4787a>242   6     6   =perf_evsample_datac> *perf_evsample_dataa>   in * *pedataa>  n>)
478/a>{
236          e23="L>242   6     6   =pert_regsass="sref">ctx rt_regsa>   in *ctx regsa>  >>)
478/a>  sample_> *iop/eve_e>
479 a>       24="L>242   6     6   =pehw_rf_event_context" cl *   in *ctx hwca>  2hrnctx hrefvent_sched_in *)
479/a>)
4792a>)
479/a>       23="L>2!_in *>)
479/a>  pan cccccccccccc_in *ctx hrefvent_>a>)
479/a>       24""L>240ment"ts/core.c#L154796id="L1647" clas2396ine" na23="L1547" c>4796a>  pan cccc"L>2_inctx hwca>  sched_in * *>)
4797a>)
479/a>{
>)
479/a>       22=for (o n * * * * *iop/eve_e>
480 a>       24="L>237  "L>2_in * *ctx hrefvent_n _in)
480/a>ctx regsa>  >)rsample_> *iop/eve_e>
4802a>/*)
480/a>  _spanlas2392icomm cla>=========================* We inhibit the ovf_elow from happening whes)
480/a>  _spanlas2392icomm cla>=========================* hwcschedinterrupts hhrMAX_INTERRUPTS.chspans>)
480/a>  _spanlas2392icomm cla>=========================*/)
480/a>
4807a>)
480/a>{
)
4809a>
)
481 a>  }>)
4811a>)
4812a>242   6     6   =perf_event_context" cl * *ctx hrefvent_n=_inctx u6/a>   cal64_sefvent"anrass="sref">ctx{
n>)
481/a>       23========================"L>242   6     6   =perf_evsample_datac> *perf_evsample_dataa>   in * *pedataa>  n>)
481/a>  pan cccccccccccc==============="L>242   6     6   =pert_regsass="sref">ctx rt_regsa>   in *ctx regsa>  >>)
481/a>  sample_> *iop/eve_e>
481/a>
   in *ctx hwca>  2hrnctx hrefvent_sched_in *)
4817a>  >)
481/a>{
ctx local64_add *ctx{
n nctx hrefvent_sched_in *)
481/a>  >)
482 a>       24="L>2!_inctx regsa>  >>)
482/a>4822a>)
482/a>       23="L>2!_in *ctx hrefvent_>>>)
482/a>  pan ccccccccccccreturna>)
482/a>       24""L>240ment"ts/core.c#L154826id="L1648" clas2426ine" na24="L1648" c>4826a>  pan cccc"L>22cal64_sefvent"ax" class="sref">ctx hrefvent_sched_inctx * * *ctx hrefvent_sched_inctx * *iop/eve_e>
4827a> * *pedataa>  sched_in *ctx{
a>)
482/a>{
ctx hrefvent_n=1n n * *pedataa>  n n *ctx regsa>  >a>)
4829a>
)
483 a>       24="L>237  ef="kdivisorctxdatac> *pedataa>  sched_in *ctx hrefvent_sched_in * *)
4831a>)
4832a>  pan cccc"L>2ef="kdivisorctxnrass="sref">ctx{
 hhr1 & *ctx hwca>  sched_inctx sample_rf_iodched hhr1 &ctx hrefvent_sched_inctx *)
483/a>       23=========returnrn * * *ctx hrefvent_n=1n n * *pedataa>  n n *ctx regsa>  >a>)
483/a>)
483/a>       24="L>2_in * *ctx{
n nctx hwca>  sched_in *{
>)>)
483/a>
4837a>  >)
483/a>{
 * *ctx hrefvent_n=0n n * *pedataa>  n n *ctx regsa>  >a>)
483/a>  }>)
484 a>  6     6      struc}ts/core.c#L164841id="L1648" clas2341ine" na23="L1648" c>484/a>242   6     6   =perf_event_context" cl * *ctx hrefvent_n6     6      struc}ts/core.c#L164842id="L1648" clas2342ine" na23="L1648" c>4842a>242   6     6   =pert_regsass="sref">ctx rt_regsa>   in *ctx regsa>  >>)
484/a>  sample_> *iop/eve_e>
484/a>  pan cccc"L>2_inctx hrefvent_sched_in * * * *  >>)
484/a>       24="L>237  returnr1a>)
484/a>)
4847a>
ctx regsa>  >rsample_> *iop/eve_e>
484/a>{
2cal64_sefvent"ax" class="sref">ctx hrefvent_sched_inctxctx *ctx usfr_mefc *ctx regsa>  >)ample_> *iop/eve_e>
484/a>       22="L>228=         returnr1a>)
485 a>  6     6      struc}ts/core.c#L164851id="L1648" clas2351ine" na23="L1548" c>485/a>2cal64_sefvent"ax" class="sref">ctx hrefvent_sched_inctxctxctx usfr_mefc *ctx regsa>  >)ample_> *iop/eve_e>
4852a>)
485/a>       23=}>)
485/a>)
485/a>       24=returnr0a>)
485/a>
<}>)
4857a>  >)
485/a>{
static "nt _in *242   6     6   =perf_event_context" cl * *ctx hrefvent_n6     6      struc}ts/core.c#L1648"9id="L1648" clas2359ine" na23="L1548" c>485/a>       22="L>228=                 enum   6     6   =perf_evtypc_idctx> *   cal64_sefvent"atypcctx> *486 a>       24="L>237                3=_inctx u32a>  pn * *486/a>242   6     6   =perf_evsample_datac> *perf_evsample_dataa>   in * *pedataa>  n>)
4862a>242   6     6   =pert_regsass="sref">ctx rt_regsa>   in *ctx regsa>  >>)
486/a>  sample_> *iop/eve_e>
486/a>  pan cccc"L>2_inctx hrefvent_sched_inctx * *>)
486/a>       24="L>237  returnr0a>)
486/a>)
4867a>
ctx hrefvent_sched_inctxctx configched2!href="kdivisorctxx" cl_idctx> *>)
486/a>{
486/a>  >)
487 a>       24="L>2_in *ctx hrefvent_n=n *ctx regsa>  >)ample_> *iop/eve_e>
487/a>4872a>)
487/a>       23=returnr1a>)
487/a>  }>)
487/a>       24""L>240ment"ts/core.c#L154876id="L1648" clas2376ine" na23="L1548" c>487/a>
 *ctx inne" a>  pn *ctx u6/a>   cal64_sefvent"aswent_c_hashctx> * *ctx u6/a>   cal64_sefvent"atypcctx> *ctx u32a>  pn * * *iop/eve_e>
4877a> *iop/eve_e>
487/a>{
ctx u6/a>   cal64_sefvent"avalctx> * * *2_in *a>)
487/a>  >)
488 a>       24=returnrn *ctx hash_"  * * * *  >a>)
488/a>)
4882a>)
488/a>  static _inctx inne" a>  p"L>242   6     6   =pehliss_headass="sref">ctx hliss_heada>   i>)
488/a>    6     6   =pe__findvswent_c_headass="sref">ctx __findvswent_c_head242   6     6   =peswent_c_hlissass="sref">ctx swent_c_hlissa>
 *ctx hlissa>
ctx u6/a>   cal64_sefvent"atypcctx> *ctx u32a>  pn * * *iop/eve_e>
488/a>  sample_> *iop/eve_e>
488/a>
ctx u6/a>   cal64_sefvent"ahashctx> * * * * * *)
4887a>  >)
488/a>{
ctx hlissa>
ctx headsa>
<[_in *)
488/a>  }>)
489 a>  6     6      struc}ts/core.c#L164891id="L1648" clas2391ine" na23="L1548" c>489/a>/* For the read side: ent_cs whes they trigger=*/)
4892a>  static _inctx inne" a>  p"L>242   6     6   =pehliss_headass="sref">ctx hliss_heada>   i>)
489/a>    6     6   =pefindvswent_c_head_rcuass="sref">ctx findvswent_c_head_rcu242   6     6   =peswent_c_htableass="sref">ctx swent_c_htablea>{
 * *ctx u6/a>   cal64_sefvent"atypcctx> *ctx u32a>  pn * * *iop/eve_e>
489/a>  sample_> *iop/eve_e>
4895a>
ctx swent_c_hlissa>
 *ctx hlissa>
)
489/a>)
4897a>
ctx hlissa>
 * * * *ctx swent_c_hlissa>
<)a>)
489/a>{
ctx hlissa>
<)ample_> *iop/eve_e>
489/a>       22="L>228= returnrn *ctx NULLa>
)
490 a>  6     6      struc}ts/core.c#L1649"1id="L1649" clas2391ine" na23="L1549" c>490/a> *ctx __findvswent_c_head *ctx hlissa>
 * *)
4902a>)
490/a>  >)
490/a>  _spanlas2392icomm cla>/* For the _nts/ head insertion and=removal in the hliss=*/)
4905a>  static _inctx inne" a>  p"L>242   6     6   =pehliss_headass="sref">ctx hliss_heada>   i>)
490/a>
<  6     6   =pefindvswent_c_headass="sref">ctx findvswent_c_head242   6     6   =peswent_c_htableass="sref">ctx swent_c_htablea>{
 * * *ctx hrefvent_>>)
4907a> *iop/eve_e>
490/a>{
ctx swent_c_hlissa>
 *ctx hlissa>
)
4909a>       24=n *ctx u32a>  pn * *ctx hrefvent_sched_inctxctx configcheda>)
491 a>       24=n *ctx u6/a>   cal64_sefvent"atypcctx> *ctx hrefvent_sched_inctx *)
4911a>)
4912a>/*)
491/a>  _spanlas2392icomm cla>=========* Ents/ scheduling is always serialized againss=hliss=allocationa>spans>)
491/a>  _spanlas2392icomm cla>=========* and=release. Which makes the protected version suitable he.c#a>spans>)
491/a>  _spanlas2392icomm cla>=========* The contexc lock guarantees that#a>spans>)
491/a>
<_spanlas2392icomm cla>=========*/)
4917a>
ctx hlissa>
 * * * *ctx swent_c_hlissa>
)
491/a>{
236          e23=hre23=_in *ctx hrefvent_sched_in *  >)a>)
4919a>       24="L>2!_inctx hlissa>
<)ample_> *iop/eve_e>
492 a>       24="L>237  returnrn *ctx NULLa>
)
4921a>)
4922a> *ctx __findvswent_c_head *ctx hlissa>
 * *)
492/a>  }>)
492/a>)
4925a>  static voidref="kdivisorctxdo_prefvswvent_context" cl * *   cal64_sefvent"atypcctx> *ctx u32a>  pn * *492/a>
ctx u6/a>   cal64_sefvent"anrass="sref">ctx{
n>)
4927a>492/a>{
242   6     6   =pert_regsass="sref">ctx rt_regsa>   in *ctx regsa>  >>)
492/a>  sample_> *iop/eve_e>
493 a>       24="L>242   6     6   =peswent_c_htableass="sref">ctx swent_c_htablea>{
 * *ctx<__get_cpu_var *ctx swent_c_htablea>{
)a>)
4931a>       24="L>242   6     6   =perf_event_context" cl * *ctx hrefvent_a>)
4932a>  pan cccc"L>242   6     6   =pehliss_nofcclas2364i">ctx hliss_nofcched_in *ctx nofccheda>)
493/a>       23="L>242   6     6   =pehliss_headass="sref">ctx hliss_heada>   i_inctx headcheda>)
493/a>)
493/a>       24=n * *)
493/a>
ctx headchedchrn *ctx findvswent_c_head_rcu * * * *)
4937a>
ctx headched>>)
493/a>{
493/a>  >)
494 a>       24=n *ctx hliss_for_each_ts/ry_rcu *ctx hrefvent_n=_inctx nofcchedn=_inctx headchedn=_inctx hliss_ts/ryched>rsample_> *iop/eve_e>
494/a>2cal64_sefvent"arf_evswent_c_matchctx> * *ctx hrefvent_n=_in * * * *pedataa>  n n *ctx regsa>  >>>)
4942a> *ctx hrefvent_n=_inctx{
n n * *pedataa>  n n *ctx regsa>  >a>)
494/a>       23=}>)
494/a>    6     6   =peendctx> *)
494/a>       24=n * *)
494/a>
<}>)
4947a>  >)
494/a>{
"nt _in>)
494/a>  sample_> *iop/eve_e>
495 a>       24="L>242   6     6   =peswent_c_htableass="sref">ctx swent_c_htablea>{
 * *ctx<__get_cpu_var *ctx swent_c_htablea>  >a>)
4951a>)
4952a> * * *ctx recursiona>  >a>)
495/a>  }>)
495/a>    6     6   =peEXPORT_SYMBOL_GPLass="sref">ctx EXPORT_SYMBOL_GPL *a>)
495/a>       24""L>240ment"ts/core.c#L1549"6id="L1649" clas23=6ine" na23="L1549" c>495/a>
<  6     6   =peinne" nas="sref">ctx inne" a>  pvoidref="kdivisorctxprefvswent_c_put_recursion_contexcontext" cl *>)
4957a> *iop/eve_e>
495/a>{
ctx swent_c_htablea>{
 * *ctx<__get_cpu_var *ctx swent_c_htablea>  >a>)
495/a>  >)
496 a>       24=n * * *ctx recursiona>  n n *a>)
496/a>)
4962a>)
496/a>  voidref="kdivisorctx__prefvswvent_context" cl *ctx u32a>  pn * *ctx u6/a>   cal64_sefvent"anrass="sref">ctx{
n "L>242   6     6   =pert_regsass="sref">ctx rt_regsa>   in *ctx regsa>  n=_inctx u6/a>   cal64_sefvent"aaddrass="sref">ctx>)
496/a>  sample_> *iop/eve_e>
4965a>
4966a>  pan cccc"nt _in)
4967a>  >)
496/a>{
 *)
4969a>       24=n *)
497 a>       24="L>2_in>)
497/a>4972a>)
497/a>       23=  6     6   =perf_evsample_data_inicontext" cl * *pedataa>  n n *ctxa>)
497/a>)
497/a>       24=n * * * *ctx{
n n *pedataa>  n n *ctx regsa>  >a>)
497/a>)
4977a>
 *a>)
497/a>{
 *)
497/a>  }>)
498 a>  6     6      struc}ts/core.c#L164981id="L1649" clas2381ine" na23="L1549" c>498/a>ctx prefvswent_c_read242   6     6   =perf_event_context" cl * *ctx hrefvent_>>)
4982a> *iop/eve_e>
498/a>  }>)
498/a>)
4985a>  static "nt _inctx rf_evswent_c_add242   6     6   =perf_event_context" cl * *ctx hrefvent_, "nt _inctx flagsent_>>)
498/a>
 *iop/eve_e>
4987a>
ctx swent_c_htablea>{
 * *ctx<__get_cpu_var *ctx swent_c_htablea>  >a>)

498/a>{
   in *ctx hwca>  2hrnctx hrefvent_sched_in *)
4989a>{
ctx hliss_heada>   i_inctx headcheda>)
499 a>  6     6      struc}ts/core.c#L164991id="L1649" clas2391ine" na23="L1549" c>499/a> *ctx hrefvent_>>rsample_> *iop/eve_e>
4992a> *ctx hwca>  sched_in *ctx hwca>  sched_inctx sample_rf_iodcheda>)
499/a>       23=========_in * *ctx hrefvent_>a>)
499/a>  pan cccc}>)
499/a>       24""L>240ment"ts/core.c#L154996id="L1649" clas2396ine" na23="L1549" c>499/a>
ctx hwca>  sched_in * *ctx flagsent_cc *a>)
4997a>  >)
499/a>{
ctx headchedchrn *ctx findvswent_c_head * *ctx hrefvent_>a>)
4999a>       24="L>2_inctx headched>>>)
50" a>ctx EINVALcheda>)/pre>)
50"1a>)
50"2a>{
ctx hliss_add_head_rcuctx hrefvent_sched_inctx hliss_ts/rychedn=_inctx headched>a>)
50"/a>  >)
50"/a>  pan ccccreturnr0a>)
50"5a>  }>)
50"/a>)
50"7a>ctx242   6     6   =perf_event_context" cl * *ctx hrefvent_, "nt _inctx flagsent_>>)
50"8a>
 *iop/eve_e>
50"9a>       24=n *ctx hliss_dtr_rcuctx hrefvent_sched_inctx hliss_ts/ryched>a>)
50" a>  }>)
50"1a>)
50"2a>242   6     6   =perf_event_context" cl * *ctx hrefvent_, "nt _inctx flagsent_>>)
50"/a>  sample_> *iop/eve_e>
50"4a>       24=n *ctx hrefvent_sched_in * *)
50"5a>  }>)
50"/a>)
50"7a>242   6     6   =perf_event_context" cl * *ctx hrefvent_, "nt _inctx flagsent_>>)
50"8a>
 *iop/eve_e>
50"9a>       24=n *ctx hrefvent_sched_in * * * *  a>)
50" a>  }>)
50"1a>)
50"2a>/* De *< the hliss=from the updatc side=*/)
50"/a>  static _inctx inne" a>  p"L>242   6     6   =peswent_c_hlissass="sref">ctx swent_c_hlissa>
)
50"/a>    6     6   =peswent_c_hliss_de *ctx swent_c_hliss_de *<242   6     6   =peswent_c_htableass="sref">ctx swent_c_htablea>{
 * *>)
50"/a>  sample_> *iop/eve_e>
50"/a>
 * * * *ctx swent_c_hlissa>
)
50"7a> * * *>a>)
50"8a>  }>)
50"/a>  >)
50" a>ctx swent_c_hliss_release242   6     6   =peswent_c_htableass="sref">ctx swent_c_htablea>{
 * *>)
50"1a>  sample_> *iop/eve_e>
50"2a>  pan cccc"L>242   6     6   =peswent_c_hlissass="sref">ctx swent_c_hlissa>
 *ctx hlissa>
 *ctx swent_c_hliss_de *< * *a>)
50"/a>  >)
50"4a>       24="L>2!_inctx hlissa>
<)ample_> *iop/eve_e>
50"/a>       24="L>237  returna>)
50"/a>)
50"7a>
ctx * *ctx swent_c_hlissa>
 *ctx NULLa>
<>a>)
50"/a>{
ctx kfree_rcu *ctx hlissa>
ctx rcu_heada>
<>a>)
50"/a>  }>)
50" a>)
50"/a>ctx swent_c_hliss_put_cpu242   6     6   =perf_event_context" cl * *ctx hrefvent_, "nt _inctx cpu *iop/eve_e>
50"2a> *iop/eve_e>
50"/a>       23="L>242   6     6   =peswent_c_htableass="sref">ctx swent_c_htablea>{
 * *ctx hre_cpu *ctx swent_c_htablea>{
n=_inctx cpu)
50"/a>)
50"/a>       24=n * * *a>)
50"/a>)
50"7a>
 *iop/eve_e>
50"/a>{
ctx swent_c_hliss_release * *a>)
50"/a>  >)
50" a>       24=n * * *a>)
50"/a>)
50"2a>)
50"3a>ctx swent_c_hliss_put242   6     6   =perf_event_context" cl * *ctx hrefvent_)ample_> *iop/eve_e>
50"/a>  sample_> *iop/eve_e>
50"/a>       24="nt _inctx cpu)
50"/a>)
50"7a>
ctx hrefvent_sched_inctx cpursample_> *iop/eve_e>
50"/a>{
ctx swent_c_hliss_put_cpu *ctx hrefvent_, n *ctx hrefvent_sched_inctx cpua>)
50"/a>       22="L>228= returna>)
50" a>       22=}>)
50"1a>)
50"2a>{
ctx for_each_possible_cpu *ctx cpu *iop/eve_e>
50"/a>       23=========_inctx swent_c_hliss_put_cpu *ctx hrefvent_, n *ctx cpua>)
50"4a>)
50"/a>       24""L>240ment"ts/core.c#L1550"6id="L1650" clas2366ine" na23="L1550" c>50"6a>ctx swent_c_hliss_get_cpu242   6     6   =perf_event_context" cl * *ctx hrefvent_, "nt _inctx cpu *iop/eve_e>
50"7a> *iop/eve_e>
50"/a>{
ctx swent_c_htablea>{
 * *ctx hre_cpu *ctx swent_c_htablea>{
n=_inctx cpu)
50"9a>       24="nt _inctx)
50" a>       24""L>240ment"ts/core.c#L155071id="L1650" clas2371ine" na23="L1550" c>50"1a>{
 * *a>)
50"2a>)
50"/a>       23="L>2!_inctx swent_c_hliss_de *< * *rn *ctx cpu_onne"  *ctx cpursample_> *iop/eve_e>
50"4a>       23========="L>242   6     6   =peswent_c_hlissass="sref">ctx swent_c_hlissa>
 *ctx hlissa>
)
50"/a>       24""L>240ment"ts/core.c#L155076id="L1650" clas2376ine" na23="L1550" c>50"/a>
ctx hlissa>
 *ctx kzalloc *ctx hlissa>
<)n=_inctx GFP_KERNELched>a>)
50"7a>ctx hlissa>
<)rsample_> *iop/eve_e>
50"/a>{
ctxctx
)
50"/a>       22="L>228=         goto n *
)
50" a>       22="L>228= }>)
50"/a>ctx * *ctx swent_c_hlissa>
 *ctx hlissa>
<)a>)
50"2a>{
)
50"/a>       23=  6     6   =peswhashctx> *)
50"/a>    6     6   =peexicontext" cl *
<:>)
50"/a>       24=n * * *a>)
50"/a>)
50"7a> *ctx)
50"8a>  }>)
50"/a>  >)
50" a>ctx swent_c_hliss_get242   6     6   =perf_event_context" cl * *ctx hrefvent_)ample_> *iop/eve_e>
50"1a>  sample_> *iop/eve_e>
50"2a>{
ctx)
50"3a>{
ctx cpu *ctx failed_cpu)
50"/a>)
50"/a>       24="L>2n *ctx hrefvent_sched_inctx cpu>)
50"/a>
ctx swent_c_hliss_get_cpu *ctx hrefvent_, n *ctx hrefvent_sched_inctx cpua>)
50"7a>  >)
50"/a>{
ctx get_onne" _cpusa>)
50"9a>       24=n *ctx for_each_possible_cpu *ctx cpu *iop/eve_e>
51" a>ctx *ctx swent_c_hliss_get_cpu *ctx hrefvent_, n *ctx cpua>)
510/a>2cal64_sefvent"aerrass="sref">ctx *iop/eve_e>
5102a> *ctx failed_cpu *ctx cpu)
510/a>       23=================goto n *ctx fail)
5104a>       23=========}>)
510/a>       24=}>)
510/a>
ctx put_onne" _cpusa>)
5107a>  >)
510/a>{
)
51"9a>  n *ctx fail)
511 a>       24=n *ctx for_each_possible_cpu *ctx cpu *iop/eve_e>
511/a>2cal64_sefvent"acpuass="sref">ctx cpu *ctx failed_cpu>)
5112a>)
511/a>       23=========_inctx swent_c_hliss_put_cpu *ctx hrefvent_, n *ctx cpua>)
51"4a>       24=}>)
511/a>       24""L>240ment"ts/core.c#L155116id="L1651" clas24=6ine" na24="L1651" c>511/a>
ctx put_onne" _cpusa>)
5117a> *ctx)
5118a>  }>)
511/a>  >)
512 a>242   6     6   =pestatic_keyass="sref">ctx static_keya> * *)
51"1a>)
5122a>ctx sw_rf_event_c_dest>oy242   6     6   =perf_event_context" cl * *ctx hrefvent_)ample_> *iop/eve_e>
512/a>  sample_> *iop/eve_e>
5124a>       24=n *ctx u6/a>   cal64_sefvent"aent_c_idctx> * *ctx hrefvent_sched_inctxctx config)
512/a>       24""L>240ment"ts/core.c#L1551"6id="L1651" clas2426ine" na24="L1651" c>512/a>
ctx WARN_ON *ctx hrefvent_sched_ina>)
5127a>  >)
512/a>{
ctx static_key_slow_dec * *a>)
5129a>       24=n *ctx swent_c_hliss_put *ctx hrefvent_)a>)
513 a>  }>)
5131a>)
5132a>242   6     6   =perf_event_context" cl * *ctx hrefvent_)ample_> *iop/eve_e>
513/a>  sample_> *iop/eve_e>
51"4a>       24="nt _in * *ctx hrefvent_sched_inctxctx config)
513/a>       24""L>240ment"ts/core.c#L155136id="L1651" clas2436ine" na24="L1651" c>5136a>  pan cccc"L>2n *ctx hrefvent_sched_inctxctx typ  *iop/eve_e>
5137a>)
51"/a>{
>)
5139a>       24=nspanlas2392icomm cla>/*)
51" a>=        * no branch sampling for softwart _nts/c)
51"/a>=        */)
5142a>  pan cccc"L>2n * * *ctx hrefvent_))ample_> *iop/eve_e>
514/a>       23=========return -  6     6   =peEOPNOTSUPPontext" cl *)
51"/a>)
51"/a>       24=switch in * * *iop/eve_e>
5146a>  pan cccccase   6     6   =pePERF_COUNT_SW_CPU_CLOCKctx> *)
51"7a>
 *)
51"/a>{
)
51"/a>  >)
51" a>       24=default:>)
515/a>5152a>{
)
515/a>  >)
5154a>       24="L>2_in * * *iop/eve_e>
51"/a>       24="L>236  return -  6     6   =peENOENTontext" cl *)
51"/a>)
51"7a>
ctx hrefvent_sched_inrsample_> *iop/eve_e>
51"/a>{
ctx)
515/a>  >)
516 a>ctx *ctx swent_c_hliss_get *ctx hrefvent_)a>)
516/a>2cal64_sefvent"aerrass="sref">ctx)
5162a> *ctx)
516/a>  >)
5164a>       23=========ef="kdivisorctxstatic_key_slow_incass="sref">ctx static_key_slow_inc * *a>)
516/a>       24="L>236  _inctx hrefvent_sched_inoyass="sref">ctx dest>oy *oyass="sref">ctx sw_rf_event_c_dest>oy)
5166a>{
)
5167a>  >)
516/a>{
)
516/a>  }>)
51" a>       24""L>240ment"ts/core.c#L155171id="L1651" clas2371ine" na23="L1551" c>517/a>242   6     6   =perf_event_context" cl * *ctx hrefvent_)ample_> *iop/eve_e>
5172a> *iop/eve_e>
51"/a>       23=returnr0a>)
5174a>)
51"/a>       24""L>240ment"ts/core.c#L155176id="L1651" clas2376ine" na23="L1551" c>5176a>242   6     6   =permuass="sref">ctx rmua> *iop/eve_e>
51"7a>ctx *)
517/a>{
>)
51"/a>       22=._in *)
51" a>       22=._inctx addctx rf_evswent_c_add)
51"/a>ctxctx)
51"2a>{
)
51"/a>       23=._in236  hrn *)
5184a>       23=._inctx readchedc4="L>236  hrn *ctx rf_evswent_c_read)
518/a>       24""L>240ment"ts/core.c#L155186id="L1651" clas2386ine" na23="L1551" c>5186a>       22=._in236  hrn *)
51"7a>)
518/a>{
>)
51"/a>  #ifdefrn *{
>)
519 a>       24""L>240ment"ts/core.c#L155191id="L1651" clas2391ine" na23="L1551" c>519/a> *242   6     6   =perf_event_context" cl * *ctx hrefvent_n>)
5192a>242   6     6   =perf_evsample_datae_from* * *iop/eve_e>
519/a>  sample_> *iop/eve_e>
5194a>       23=voidrin *ctx ree.cd * *)
519/a>       24""L>240ment"ts/core.c#L155196id="L1651" clas2396ine" na23="L1551" c>5196a>  pan cccc"L>2n *ctx likelyctx hrefvent_sched_inctx filterr||rn *ctx filter_match_preds *ctx hrefvent_sched_inctx filterctx ree.cd *iop/eve_e>
5197a>)
519/a>{
)
519/a>  }>)
520 a>       24""L>240ment"ts/core.c#L1552"1id="L1652" clas2391ine" na23="L1552" c>520/a> *242   6     6   =perf_event_context" cl * *ctx hrefvent_n>)
5202a>242   6     6   =perf_evsample_datae_from* *)
520/a>       23========================="L>242   6     6   =perc_regsass="sref">ctx rc_regsched_in *ctx regsched)ample_> *iop/eve_e>
520/a>  sample_> *iop/eve_e>
520/a>       24="L>2n *ctx hrefvent_sched_in * * * *  )ample_> *iop/eve_e>
520/a>
5207a>
/*)
520/a>{
nspanlas2392icomm cla>=        * All tracepo"nts art from OAD/ev-space.)
52"9a>  nspanlas2392icomm cla>=        */)
521 a>       24="L>2n *ctx hrefvent_sched_inctxctx hxclude_OAD/eva>  )ample_> *iop/eve_e>
521/a>5212a>)
521/a>       23="L>2!_in * *ctx hrefvent_nrn * *iop/eve_e>
5214a>       23=========returnr0a>)
521/a>       24""L>240ment"ts/core.c#L155216id="L1652" clas24=6ine" na24="L1652" c>521/a>
)
5217a>)
521/a>{
>)
521/a>  voidref="kdivisorctxrf_evtp_x" clctx> * *ctx u6/a>   cal64_sefvent"aaddrass="sref">ctx *ctx u6/a>   cal64_sefvent"acou_context" cl * *ctx ree.cdctx hclry_"izechedn>)
522 a>242   6     6   =perc_regsass="sref">ctx rc_regsched_in *ctx regsched,="L>242   6     6   =pehliss_headass="sref">ctx hliss_headched_in *ctx head)
522/a>242   6     6   =petask_"L>242ass="sref">ctx242ched_in *ctx  )ample_> *iop/eve_e>
5222a> *iop/eve_e>
522/a>       23="L>242   6     6   =perf_evsample_datae_from*)
5224a>       24="L>242   6     6   =perf_event_context" cl * *ctx hrefvent_a>)
5225a>       24="L>242   6     6   =pehliss_n =pass="sref">ctx hliss_n =pched_in *ctx n =pcheda>)
522/a>)
5227a>       24="L>242   6     6   =perf_evraw_ree.cdass="sref">ctx rf_evraw_ree.cdched__in * *iop/eve_e>
522/a>{
ctx "izeched2hrn *ctx hclry_"izechedn>)
522/a>       22="L>228= ._in *ctx ree.cd)
523 a>       22=}a>)
5231a>)
5232a>{
ctxa>)
523/a>       23=  6     6   =pedatae_from* * *)
523/a>)
523/a>       24=n *ctx hliss_for_each_hclry_rcu *ctx hrefvent_nrn *ctx n =pchednrn *ctx head *ctx hliss_hclryrsample_> *iop/eve_e>
523/a>
2n * * *ctx hrefvent_nrnctx regsched))ample_> *iop/eve_e>
5237a> *ctx hrefvent_nrn *ctx regsched)a>)
523/a>{
)
523/a>  >)
524 a>       24=nspanlas2392icomm cla>/*)
52"/a>=        * If we=got specified a target task, also iterate its contexc and)
5242a>  nspanlas2392icomm cla>=        * deliver this _nts/ there too.)
524/a>  nspanlas2392icomm cla>=        */)
5244a>       24="L>2_inctx  rn *ctx  r!=   6     6   =pecurrt_context" cl *rsample_> *iop/eve_e>
524/a>       24="L>236  "L>242   6     6   =perf_event_c_contexce_from* *)
524/a>
242   6     6   =petrace_hclryass="sref">ctx trace_hclryched_in *ctx hclryched_hrn *ctx ree.cd)
5247a>  >)
52"/a>{
 *)
524/a>       22="L>228= n * *ctx rcu_de * *ctx  sched_in  [  6     6   =perf_evsw_contexce_from*a>)
525 a>2!_in *iop/eve_e>
525/a>5252a>)
525/a>       23=========_inctx liss_for_each_hclry_rcu *ctx hrefvent_nrnctx ent_c_lisschedn cal64_sefvent"aent_c_xclryass="sref">ctx hnt_c_xclryrsample_> *iop/eve_e>
5254a>       23=========     24="L>2_inctx hrefvent_sched_inctxctx typ  *iop/eve_e>
52"/a>       24="L>236                  continuea>)
525/a>
2_inctx hrefvent_sched_inctxctx configctx hclrychedsched_inctx typ  *iop/eve_e>
5257a>)
52"/a>{
2_in * *ctx hrefvent_nrnctx regsched))ample_> *iop/eve_e>
525/a>       22="L>228=                 ef="kdivisorctxrf_evswent_c_x" cle_from* *ctx hrefvent_nrn *ctx regsched)a>)ple_> *iop/eve_e>
526 a>526/a> * *)
5262a> *)
526/a>       23=}>)
526/a>)
526/a>       24=n * *)
5266a>{
}>)
5267a>  n *ctx EXPORT_SYMBOL_GPL * *)
526/a>{
>)
526/a>  static voidref="kdivisorctxtp_rf_event_c_dest>oyass="sref">ctx tp_rf_event_c_dest>oy242   6     6   =perf_event_context" cl * *ctx hrefvent_)ample_> *iop/eve_e>
52" a>  sample_> *iop/eve_e>
5271a>       24=n *oyass="sref">ctx rf_evtrace_dest>oy *ctx hrefvent_)a>)
5272a>)
527/a>  >)
5274a>242   6     6   =perf_event_context" cl * *ctx hrefvent_)ample_> *iop/eve_e>
52"/a>  sample_> *iop/eve_e>
5276a>  pan cccc"nt _inctx)
5277a>  >)
527/a>{
ctx hrefvent_sched_inctxctx typ  *iop/eve_e>
527/a>       22="L>228= return -  6     6   =peENOENTontext" cl *)
528 a>       24""L>240ment"ts/core.c#L155281id="L1652" clas2381ine" na23="L1552" c>52"/a>/*)
5282a>  nspanlas2392icomm cla>=        * no branch sampling for tracepo"nt _nts/c)
528/a>  nspanlas2392icomm cla>=        */)
5284a>       24="L>2_in * *ctx hrefvent_))ample_> *iop/eve_e>
528/a>       24="L>236  return -  6     6   =peEOPNOTSUPPontext" cl *)
528/a>)
5287a>       24=n *ctx * *ctx hrefvent_)a>)
528/a>{
ctx)
528/a>       22="L>228= return _inctx)
529 a>       24""L>240ment"ts/core.c#L155291id="L1652" clas2391ine" na23="L1552" c>5291a>       24=n *ctx hrefvent_sched_inoyass="sref">ctx dest>oy *oyass="sref">ctx tp_rf_event_c_dest>oy)
5292a>)
529/a>       23=returnr0a>)
5294a>)
529/a>       24""L>240ment"ts/core.c#L155296id="L1652" clas2396ine" na23="L1552" c>5296a>242   6     6   =permuass="sref">ctx rmua> *iop/eve_e>
5297a>ctx *)
529/a>{
>)
529/a>       22=._in *)
530 a>       22=._inctx addctx rf_evtrace_add)
530/a>ctxctx)
5302a>{
)
530/a>       23=._in236  hrn *)
5304a>       23=._inctx readchedc4="L>236  hrn *ctx rf_evswent_c_read)
530/a>       24""L>240ment"ts/core.c#L1553"6id="L1653" clas2396ine" na23="L1553" c>5306a>       22=._in236  hrn *)
5307a>)
530/a>{
>)
530/a>  static n *voidref="kdivisorctxrf_evtp_registerass="sref">ctx rf_evtp_register)
531 a>  sample_> *iop/eve_e>
5311a>       24=n *ctx rf_evrmu_registering">"tracepo"nt")
5312a>)
531/a>  >)
5314a>ctx rf_event_c_set_filter242   6     6   =perf_event_context" cl * *ctx hrefvent_,>voidref="kdivisorctx__userass="sref">ctx __userched_in *ctx arg)
531/a>  sample_> *iop/eve_e>
531/a>
 *ctx)
5317a>
ctx revent_a>)
531/a>{
>)
531/a>       22="L>2_inctx hrefvent_sched_inctxctx typ  *iop/eve_e>
532 a>ctx EINVALent_a>)
5321a>)
5322a>{
ctx *ctx strndup_user *ctx arg)
532/a>       23="L>2cal64_sefvent"aIS_ERRontext" cl * *ctx *iop/eve_e>
5324a>       24="L>237  return cal64_sefvent"aPTR_ERRontext" cl * *ctx)
532/a>       24""L>240ment"ts/core.c#L1553"6id="L1653" clas2426ine" na24="L1653" c>5326a>{
ctx revent_2hrn *ctx ftrace_profile_set_filter *ctx hrefvent_n cal64_sefvent"aent_cass="sref">ctx hrefvent_sched_inctxctx configctx)
5327a>  >)
532/a>{
ctx kfre  *ctx)
532/a>       22=return cal64_sefvent"aretass="sref">ctx revent_a>)
533 a>  }>)
5331a>)
5332a>{
static voidref="kdivisorctxrf_event_c_fre _filterass="sref">ctx rf_event_c_fre _filter242   6     6   =perf_event_context" cl * *ctx hrefvent_)ample_> *iop/eve_e>
533/a>  sample_> *iop/eve_e>
5334a>{
ctx ftrace_profile_fre _filter *ctx hrefvent_)a>)
533/a>  }>)
533/a>)
5337a>)
533/a>{
>)
533/a>  static n *voidref="kdivisorctxrf_evtp_registerass="sref">ctx rf_evtp_register)
534 a>  sample_> *iop/eve_e>
53"/a>)
5342a>)
534/a>  static "nt _inctx rf_event_c_set_filter242   6     6   =perf_event_context" cl * *ctx hrefvent_,>voidref="kdivisorctx__userass="sref">ctx __userched_in *ctx arg)
534/a>  sample_> *iop/eve_e>
534/a>       24=return -  6     6   =peENOENTontext" cl *)
5346a>{
}>)
5347a>  >)
53"/a>{
static voidref="kdivisorctxrf_event_c_fre _filterass="sref">ctx rf_event_c_fre _filter242   6     6   =perf_event_context" cl * *ctx hrefvent_)ample_> *iop/eve_e>
534/a>  sample_> *iop/eve_e>
535 a>  }>)
5351a>)
5352a>/* CONFIG_EVENT_TRACING */)
535/a>  >)
5354a>  #ifdefrn *  >)
53"/a>  voidref="kdivisorctxrf_evbp_x" clctx> *242   6     6   =perf_event_context" cl * *voidrin * *iop/eve_e>
535/a>
 *iop/eve_e>
5357a>       24="L>242   6     6   =perf_evsample_datae_from*ctx sample)
53"/a>{
ctx rc_regsched_in *ctx regsched2hrn *)
535/a>  >)
536 a>ctx samplectxctxa>)
5361a>)
5362a>2!_in * * *n *ctx regsched))ample_> *iop/eve_e>
536/a>       23=========_in *1,=nctx samplectx regsched)a>)ple_> *iop/eve_e>
5364a>)
536/a>  #endif>)
536/a>)
5367a>  nspanlas2392icomm cla>/*)
536/a>{
nspanlas2392icomm cla>=*)
5369a>  nspanlas2392icomm cla>=*/)
537 a>       24""L>240ment"ts/core.c#L155371id="L1653" clas2371ine" na23="L1553" c>537/a> *242   6     6   =pehFtimere_from* * *iop/eve_e>
5372a> *iop/eve_e>
537/a>       23=enum n *ctx revent_2hrn *)
5374a>       24="L>242   6     6   =perf_evsample_datae_from*)
5375a>       24="L>242   6     6   =perc_regsass="sref">ctx rc_regsched_in *ctx regscheda>)
5376a>  pan cccc"L>242   6     6   =perf_event_context" cl * *ctx hrefvent_a>)
5377a>       24=n *ctx u6/a>   cal64_sefvent"ahreiodass="sref">ctx rf_iodent_a>)
537/a>{
>)
537/a>       22=n *ctx hrefvent_2hrn *ctx contae" r_of * * *)
538 a>       24""L>240ment"ts/core.c#L155381id="L1653" clas2381ine" na23="L1553" c>53"/a>ctx hrefvent_sched_in * *iop/eve_e>
5382a>)
538/a>  >)
5384a>{
ctx hrefvent_sched_inctx rmua>ctx readchedin *ctx hrefvent_)a>)
538/a>       24""L>240ment"ts/core.c#L155386id="L1653" clas2386ine" na23="L1553" c>5386a>{
ctx hrefvent_sched_in * *t_hreiodass="sref">ctx > *t_hreiodent_)a>)
5387a>       24=n *ctx regsched2hrn *ctx get_irq_regs)
538/a>{
>)
538/a>       22="L>2_inctx regsched2c *ctx hrefvent_n cal64_sefvent"aregsass="sref">ctx regsched))rsample_> *iop/eve_e>
539 a>2!2n *ctx hrefvent_sched_inctxctx exclude_idleched2cctx *))ample_> *iop/eve_e>
539/a>2_in * *ctx hrefvent_n 1,=nctx regsched))ample_> *iop/eve_e>
5392a>ctx revent_2hrn *)
539/a>       23=}>)
539/a>)
539/a>       24=n *ctx rf_iodent_2hrn *ctx max_t *ctx u6/a>  n 10000n cal64_sefvent"aent_cass="sref">ctx hrefvent_sched_in *ctx sample_rf_iodent_)a>)
5396a>{
 * * * *ctx rf_iodent_))a>)
5397a>  >)
539/a>{
ctx revent_a>)
539/a>  }>)
540 a>       24""L>240ment"ts/core.c#L1554"1id="L1654" clas2391ine" na23="L1554" c>540/a>242   6     6   =perf_event_context" cl * *ctx hrefvent_)ample_> *iop/eve_e>
5402a> *iop/eve_e>
540/a>       23="L>242   6     6   =pehw_rf_event_context" cl * *ctx hrefvent_sched_in *)
5404a>{
ctx s6/a>   cal64_sefvent"ahreiodass="sref">ctx rf_iodent_a>)
540/a>       24""L>240ment"ts/core.c#L1554"6id="L1654" clas2396ine" na23="L1554" c>5406a>       22="L>2!_in *ctx hrefvent_))ample_> *iop/eve_e>
5407a>)
540/a>{
>)
540/a>       22=n *ctx rf_iodent_2hrn *ctx local64_read)
5410a>       22="L>2n *ctx rf_iodent_)rsample_> *iop/eve_e>
541/a>2n *ctx rf_iodent_ < 0)ample_> *iop/eve_e>
5412a> *ctx rf_iodent_2hr10000a>)
541/a>  >)
5414a>       24="L>237  n *ctx local64_seta>)
541/a>       24=} elsersample_> *iop/eve_e>
541/a>
ctx rf_iodent_2hrn *ctx max_t *ctx u6/a>  n 10000n cal64_sefvent"ahwcontext" cl *ctx sample_rf_iodent_)a>)
5417a>
)
541/a>{
ctx __hFtimer_starc_range_ns)
541/a>       22="L>228=                 ef="kdivisorctxns_to_ktimee_from* *ctx rf_iodent_)n 0n>)
542 a>a>)
542/a>)
5422a>)
542/a>  static voidref="kdivisorctxrf_evswent_c_cancel_hFtimere_from*242   6     6   =perf_event_context" cl * *ctx hrefvent_)ample_> *iop/eve_e>
542/a>  sample_> *iop/eve_e>
5425a>       24="L>242   6     6   =pehw_rf_event_context" cl * *ctx hrefvent_sched_in *)
542/a>)
5427a>
 *ctx hrefvent_))rsample_> *iop/eve_e>
542/a>{
ctx ktime_ta>   cal64_sefvent"aremaining"ss="sref">ctx remainingent_2hrn *ctx hFtimer_get_remaininga>)
542/a>       22="L>228= n *ctx local64_setctx ktime_to_nschedin *ctx remainingent_))a>)
543 a>       24""L>240ment"ts/core.c#L155431id="L1654" clas2431ine" na24="L1654" c>543/a>ctx hFtimer_cancela>)
5432a>)
543/a>  }>)
543/a>)
543/a>  static voidref="kdivisorctxrf_evswent_c_inic_hFtimere_from*242   6     6   =perf_event_context" cl * *ctx hrefvent_)ample_> *iop/eve_e>
543/a>
 *iop/eve_e>
5437a>       24="L>242   6     6   =pehw_rf_event_context" cl * *ctx hrefvent_sched_in *)
543/a>{
>)
543/a>       22="L>2!_in *ctx hrefvent_))ample_> *iop/eve_e>
544 a>5441a>)
5442a>{
 * *a>)
5443a>{
 *)
544/a>)
544/a>       24=nspanlas2392icomm cla>/*)
5446a>{
nspanlas2392icomm cla>=        * Since hFtimers have a fixed rate, we can do a static freqschedrf_iodenspans>)
5447a>  nspanlas2392icomm cla>=        * mapping and avoidrthe whole rf_iod adjust feedback stuff.enspans>)
544/a>{
nspanlas2392icomm cla>=        */)
544/a>       22="L>2_inctx hrefvent_sched_inctx *iop/eve_e>
545 a> *ctx hrefvent_sched_inctx)
5451a>)
5452a> *ctx hrefvent_sched_inctxctx s