Verified Commit 67bc9195 authored by Camil Staps's avatar Camil Staps
Browse files

Add callgraph profiling support for x86

parent 3f3db544
Loading
Loading
Loading
Loading
+2 −2
Changes for cgcode.c: 2 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -1192,7 +1192,7 @@ void code_build_u (char descriptor_name[],int a_size,int b_size,char *code_name)
		--b_size;

		if (profile_current_cost_centre_label==NULL)
# ifdef MACH_O64
# if (defined (I486) && !defined (G_AI64) && !defined (LINUX_ELF)) || defined (MACH_O) || defined (MACH_O64)
			profile_current_cost_centre_label=enter_label ("_profile_current_cost_centre",IMPORT_LABEL | DATA_LABEL);
# else
			profile_current_cost_centre_label=enter_label ("profile_current_cost_centre",IMPORT_LABEL | DATA_LABEL);
@@ -3300,7 +3300,7 @@ void code_fill_u (char descriptor_name[],int a_size,int b_size,char *code_name,i
		--b_size;

		if (profile_current_cost_centre_label==NULL)
# ifdef MACH_O64
# if (defined (I486) && !defined (G_AI64) && !defined (LINUX_ELF)) || defined (MACH_O) || defined (MACH_O64)
			profile_current_cost_centre_label=enter_label ("_profile_current_cost_centre",IMPORT_LABEL | DATA_LABEL);
# else
			profile_current_cost_centre_label=enter_label ("profile_current_cost_centre",IMPORT_LABEL | DATA_LABEL);
+6
Changes for cgias.c: 6 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -6122,6 +6122,12 @@ static void as_node_entry_info (struct basic_block *block)
		store_l (0);
	*/
	
	if (callgraph_profiling && block->block_n_node_arguments>=0){
		if (block->block_descriptor && block->block_descriptor->label_name!=NULL && !strcmp (block->block_descriptor->label_name,"EMPTY"))
			store_l (0);
		else
			store_l (block->block_n_node_arguments+257);
	} else
		store_l (block->block_n_node_arguments);
}

+6
Changes for cgiwas.c: 6 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -5506,6 +5506,12 @@ static void w_as_node_entry_info (struct basic_block *block)
	if (block->block_descriptor!=NULL && (block->block_n_node_arguments<0 || parallel_flag || module_info_flag))
		w_as_label_in_code_section (block->block_descriptor->label_name);

	if (callgraph_profiling && block->block_n_node_arguments>=0){
		if (block->block_descriptor && block->block_descriptor->label_name!=NULL && !strcmp (block->block_descriptor->label_name,"EMPTY"))
			w_as_number_of_arguments (0);
		else
			w_as_number_of_arguments (block->block_n_node_arguments+257);
	} else
		w_as_number_of_arguments (block->block_n_node_arguments);
}