Home | History | Annotate | Download | only in daemon

Lines Matching refs:trans

33 static void process_spu_samples(struct transient * trans);
42 * trans.buffer is empty.
44 void code_spu_profiling(struct transient * trans)
47 unsigned long long num_spus = pop_buffer_value(trans);
52 process_spu_samples(trans);
55 void code_spu_ctx_switch(struct transient * trans)
57 clear_trans_current(trans);
59 if (!enough_remaining(trans, 6)) {
60 trans->remaining = 0;
67 trans->cpu = pop_buffer_value(trans);
68 trans->tid = pop_buffer_value(trans);
69 trans->tgid = pop_buffer_value(trans);
70 trans->app_cookie = pop_buffer_value(trans);
73 char const * app = find_cookie(trans->app_cookie);
75 (unsigned long)trans->tid, (unsigned long)trans->tgid,
76 trans->app_cookie, app ? app : "none");
79 /* The trans->cookie will point to the binary file where the SPU ELF
82 * library, then trans->cookie will differ from the previously obtained
83 * trans->app_cookie. For the non-embedded case, trans->cookie always
86 trans->cookie = pop_buffer_value(trans);
87 trans->embedded_offset = pop_buffer_value(trans);
91 static void cache_spu_context_info(struct transient * trans)
93 int i = trans->cpu;
94 spu_context_cache[i].tid = trans->tid;
95 spu_context_cache[i].tgid = trans->tgid;
96 spu_context_cache[i].app_cookie = trans->app_cookie;
97 spu_context_cache[i].embedded_offset = trans->embedded_offset;
98 spu_context_cache[i].spu_cookie = trans->cookie;
101 static void update_trans_for_spu(struct transient * trans)
103 int i = trans->cpu;
104 trans->tid = spu_context_cache[i].tid;
105 trans->tgid = spu_context_cache[i].tgid;
106 trans->app_cookie = spu_context_cache[i].app_cookie;
107 trans->embedded_offset = spu_context_cache[i].embedded_offset;
108 trans->cookie = spu_context_cache[i].spu_cookie;
114 (struct transient * trans, unsigned long long pc)
117 if (trans->cpu != spu_number) {
118 trans->cpu = spu_number;
119 clear_trans_current(trans);
120 update_trans_for_spu(trans);
123 if (!trans->current)
124 trans->current = sfile_find(trans);
126 if (trans->tracing != TRACING_ON)
127 trans->event = SPU_CYCLES_COUNTER;
129 trans->pc = (pc & ~SPU_NUM_MASK);
131 sfile_log_sample(trans);
134 if (trans->tracing == TRACING_START)
135 trans->tracing = TRACING_ON;
137 update_trans_last(trans);
145 * stored in trans.
147 static void process_spu_samples(struct transient * trans)
150 trans->in_kernel = 0;
151 while (trans->remaining) {
152 code = pop_buffer_value(trans);
155 opd_put_spu_sample(trans, code);
159 if (!trans->remaining) {
166 code = pop_buffer_value(trans);
173 handlers[code](trans);
174 cache_spu_context_info(trans);