• Home
  • Raw
  • Download

Lines Matching refs:counter

197 def output_rpn_equation_code(set, counter, equation):  argument
219 …able " + operand + " in equation " + equation + " for " + set.name + " :: " + counter.get('name'));
229counter.get('name') + ".\nThis is probably due to some unhandled RPN function, in the equation \""…
241 def splice_rpn_expression(set, counter, expression): argument
257 … " + operand + " in expression " + expression + " for " + set.name + " :: " + counter.get('name'));
266counter.get('name') + ".\nThis is probably due to some unhandled RPN operation, in the expression …
271 def output_counter_read(gen, set, counter): argument
273 c("/* {0} :: {1} */".format(set.name, counter.get('name')))
275 if counter.read_hash in hashed_funcs:
276 c("#define %s \\" % counter.read_sym)
278 c("%s" % hashed_funcs[counter.read_hash])
281 ret_type = counter.get('data_type')
285 read_eq = counter.get('equation')
288 c(counter.read_sym + "(UNUSED struct gen_perf_config *perf,\n")
289 c_indent(len(counter.read_sym) + 1)
292 c_outdent(len(counter.read_sym) + 1)
296 output_rpn_equation_code(set, counter, read_eq)
300 hashed_funcs[counter.read_hash] = counter.read_sym
303 def output_counter_max(gen, set, counter): argument
304 max_eq = counter.get('max_equation')
306 if not counter.has_max_func():
310 c("/* {0} :: {1} */".format(set.name, counter.get('name')))
312 if counter.max_hash in hashed_funcs:
313 c("#define %s \\" % counter.max_sym())
315 c("%s" % hashed_funcs[counter.max_hash])
318 ret_type = counter.get('data_type')
323 c(counter.max_sym() + "(struct gen_perf_config *perf)\n")
326 output_rpn_equation_code(set, counter, max_eq)
330 hashed_funcs[counter.max_hash] = counter.max_sym()
364 def output_counter_report(set, counter, current_offset): argument
365 data_type = counter.get('data_type')
372 semantic_type = counter.get('semantic_type')
380 availability = counter.get('availability')
382 output_availability(set, availability, counter.get('name'))
386 …c("counter->oa_counter_read_" + data_type + " = " + set.read_funcs[counter.get('symbol_name')] + "…
387 c("counter->name = \"" + counter.get('name') + "\";\n")
388 c("counter->desc = \"" + counter.get('description') + "\";\n")
389 c("counter->symbol_name = \"" + counter.get('symbol_name') + "\";\n")
390 c("counter->category = \"" + counter.get('mdapi_group') + "\";\n")
393 c("counter->units = GEN_PERF_COUNTER_UNITS_" + output_units(counter.get('units')) + ";\n")
394 c("counter->raw_max = " + set.max_values[counter.get('symbol_name')] + ";\n")
541 counter = Counter(self, xml_counter)
542 self.counters.append(counter)
543 self.counter_vars["$" + counter.get('symbol_name')] = counter
544 self.read_funcs[counter.get('symbol_name')] = counter.read_sym
545 self.max_values[counter.get('symbol_name')] = counter.max_value()
547 for counter in self.counters:
548 counter.compute_hashes()
666 for counter in set.counters:
667 output_counter_read(gen, set, counter)
668 output_counter_max(gen, set, counter)
727 for counter in counters:
728 offset = output_counter_report(set, counter, offset)