This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Use binary search instead of linear search in corefile.c of gprof


Hi Homer,

Thank you. I have updated the patch with bsearch().

Thanks - I have applied your patch, along with the changelog entry below.


Please note for future submissions: it really helps if you can include a ChangeLog entry along with a patch.

Cheers
  Nick

gprof/ChangeLog
2009-06-16  Homer Xing  <homer.xing@yahoo.com>

	* corefile.c (cmp_symbol_map): New function.
	(read_function_mappins): Use qsort to sort the symbols.
	(search_mapped_symbol): New function.
	(core_create_function_syms): Use bsearch to find symbols.
	* corefile.h (struct function_map): Add new bit-field: is_first.
	* cg_print.c (cmp_symbol_map): New function.
	(cg_print_file_ordering): Sort the symbol map.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]