Exemple #1
0
	def __repr__(self):
		#global indent_depth

		result = common.indent_string()
		result += "FuncNode(func_id = %s, func_name = %s, func_lexical_id = %s, loop_lexical_id = %s, total_count = %s, invoke_count = %s, sq_err_sum = %s)\n" \
			% (self.func_id, self.func_name, self.func_lexical_id, self.loop_lexical_id, self.total_count, self.invoke_count, self.sq_err_sum)

		result += common.indent_string() + ".analysis = " + self.analysis.__repr__() + "\n" #GENERALIZE, CONTROL
		result += common.indent_string() + ".cross_sq_err_sum:\n"
		common.indent_depth += 1
		for i in range(len(self.cross_sq_err_sum)):
			result += common.indent_string()
			for j in range(len(self.cross_sq_err_sum)):
				result += self.cross_sq_err_sum[i][j].__repr__() + " "
			result += "\n"
		common.indent_depth -= 1

		result += common.indent_string() + ".funcs_called = [\n"
		common.indent_depth += 1
		for c in self.funcs_called:
			if c == None: #special case
				result += common.indent_string() + "Uninvoked-child" + "\n\n"
			else:
				result += c.__repr__()
		common.indent_depth -= 1
		result += common.indent_string() + "]\n"
		result += common.indent_string() + ".funcs_per_invoke_distr = " + self.funcs_per_invoke_distr.__repr__() + "\n"

		result += "\n"

		return result
Exemple #2
0
	def __repr__(self):
		children_repr  = "["
		common.indent_depth += 1
		for i, (cc, et_child) in enumerate(self.extracted_children_tuples):
			children_repr += "\n" + common.indent_string() + (cc, et_child).__repr__()
			if i+1 < len(self.extracted_children_tuples):
				children_repr += ","
		common.indent_depth -= 1

		if len(self.extracted_children_tuples) > 0:
			children_repr += "\n" + common.indent_string()
		children_repr += "]"

		result = 'ExtractTree(%s, "%s", %s, %s, %s, %s, "%s", %s, %s, %s, %s, %s)' \
					% (self.id, self.func_name, self.total_count, self.invoke_count, self.mean, self.cov, \
						self.type, self.contributesVariance, self.contrib_fraction, self.mean_under_task, self.contribution_callcontext, children_repr)

		return result
Exemple #3
0
    def __repr__(self):
        result = "\n"
        result += common.indent_string()
        result += "Pattern:\n"

        result += common.indent_string()
        result += "  user_scope_id = %s\n" % (self.user_scope_id,)  # special, since this is a tuple

        result += common.indent_string()
        result += "  invoke_count_vec = %s\n" % (self.invoke_count_vec)

        result += common.indent_string()
        result += "  call_chain = %s\n" % (self.call_chain)

        result += common.indent_string()
        result += "  pred_probability = %s\n" % (self.pred_probability)

        result += common.indent_string()
        result += "  exec_time_weight = %s\n" % (self.exec_time_weight)

        result += common.indent_string()
        result += "  pred_behavior = %s\n" % (self.pred_behavior)

        return result
Exemple #4
0
	def __repr__(self):
		#global indent_depth

		result = common.indent_string()
		result += "FuncInfo(func_name = %s, exec_time = %s) " % (self.func_name, self.exec_time)
		return result