예제 #1
0
/* search for symbols that have overlapping address ranges and decide for
 * one */
int resolve_overlaps(unsigned long long start_time)
{
	int rc = OP_JIT_CONV_OK;
	int cnt = 0;

	invalidate_earlybirds(start_time);
	while ((rc = scan_overlaps()) && rc != OP_JIT_CONV_FAIL) {
		resort_address();
		if (cnt == 0) {
			verbprintf(debug, "WARNING: overlaps detected. "
				   "Removing overlapping JIT methods\n");
		}
		cnt++;
	}
	if (cnt > 0 && rc != OP_JIT_CONV_FAIL)
		resort_symbol();
	return rc;
}
예제 #2
0
/*
 * Invalidate all symbols that are not alive at sampling start time.
 */
static void invalidate_earlybirds(unsigned long long start_time)
{
	u32 i;
	int flag;
	struct jitentry * a;

	flag = 0;
	for (i = 0; i < entry_count; i++) {
		a = entries_address_ascending[i];
		if (a->life_end < start_time) {
			invalidate_entry(a);
			flag = 1;
		}
	}
	if (flag) {
		resort_address();
		resort_symbol();
	}
}
예제 #3
0
static void invalidate_zero_size_entries(void)
{
	u32 i;
	int flag;
	struct jitentry * a;

	flag = 0;
	for (i = 0; i < entry_count; i++) {
		a = entries_address_ascending[i];
		if (a->code_size == 0) {
			invalidate_entry(a);
			flag = 1;
		}
	}
	if (flag) {
		resort_address();
		resort_symbol();
	}
}