This is the mail archive of the cygwin-patches mailing list for the Cygwin 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] you can use this patch to profile cygwin-2


On 2011-07-31 PM 6:16, jojelino wrote:
> # in i686-pc-cygwin/winsup/cygwin/Makefile, you should add CFLAGS '-pg
> -finstrument-functions' , to make new profiling code effective.
> and comment out ifneq "${filter -O%,$(CFLAGS)}" "" too. it would make
> profiling code functional ( in cases you need to profile cygheap thread
> etc...)
I missed important one.
Please find rule in Makefile and apply following.

# Rule to build cygwin.dll
$(TEST_DLL_NAME): $(LDSCRIPT) dllfixdbg $(DLL_OFILES) $(DLL_IMPORTS) $(LIBSERVER) $(LIBC) $(LIBM) $(API_VER) Makefile winver_stamp
$(CXX) $(CXXFLAGS) -Wl,--gc-sections $(nostdlib) -Wl,-T$(firstword $^) \
-Wl,--heap=0 -Wl,--out-implib,cygdll.a -shared -o $@ \
-e $(DLL_ENTRY) $(DEF_FILE) gcrt1.o $(DLL_OFILES) version.o winver.o \
$(MALLOC_OBJ) $(LIBSERVER) $(LIBM) $(LIBC) boundbuffer.o instrument.o gmon.o mcount.o profil.o /lib/w32api/libkernel32.a \
-lgcc $(DLL_IMPORTS) -Wl,-Map,cygwin.map
@$(word 2,$^) $(OBJDUMP) $(OBJCOPY) $@ ${patsubst %0.dll,%1.dbg,$@}
@ln -f $@ new-$(DLL_NAME)



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