gcov 는 사용하지 않는 함수를 찾는데 유용한 유틸리티 이다.
이녀석을 사용하기 위해서는 컴파일시 -fprofile-arcs -ftest-coverage 두개의 옵션을 줘야 하는데
gcc 문서를 보니 아래와 같이 --coverage 하나만 주어도 무방할 것으로 보인다.(2010.01.24 추가 : --coverage만 해도 된다)
위의 옵션을 주고 컴파일을 하면, [파일명.gcno] 라는 파일이 생성되고,
파일을 실행하면 [파일명.gcda] 라는 파일이 생성된다. gcov [소스파일] 을 입력하면 분석을 한다.
-fprofile-arcs
Add code so that program flow arcs are instrumented. During execution
the program records how many times each branch and call is executed and
how many times it is taken or returns. When the compiled program exits
it saves this data to a file called auxname.gcda for each source file.
The data may be used for profile-directed optimizations
(-fbranch-probabilities), or for test coverage analysis
(-ftest-coverage). Each object file's auxname is generated from the
name of the output file, if explicitly specified and it is not the
final executable, otherwise it is the basename of the source file. In
both cases any suffix is removed (e.g. foo.gcda for input file
dir/foo.c, or dir/foo.gcda for output file specified as -o dir/foo.o).
--coverage
This option is used to compile and link code instrumented for coverage analysis. The option is a synonym for -fprofile-arcs -ftest-coverage (when compiling) and -lgcov (when linking). See the documentation for those options for more details.
-ftest-coverage
Produce a notes file that the gcov code-coverage utility can use to
show program coverage. Each source file's note file is called
auxname.gcno. Refer to the -fprofile-arcs option above for a
description of auxname and instructions on how to generate test
coverage data. Coverage data will match the source files more closely,
if you do not optimize.
프로파일링은 어떤 함수가 몇번이나 불려지고(call), 누가 이 함수를 부르는지(call tree)
그리고 어떤 함수가 실행하는데 오래걸리는지를 분석하는 방법이다.
일반적으로 -pg 옵션을 주고 컴파일 한뒤, 한번 실행하면 프로파일링 파일이 생성된다.(정상종료 되어야 생성됨)
프로그램 실행이후에는 gmon.out 파일이 생성되고, 이 파일을 이용하여 분석한다.
-p
Generate extra code to write profile information suitable for the analysis program prof. You must use this option when compiling the source files you want data about, and you must also use it when linking.
-pg
Generate extra code to write profile information suitable for the analysis program gprof. You must use this option when compiling the source files you want data about, and you must also use it when linking.
우여곡절끝에 VLC를 컴파일 해서 samr / H.263 코덱으로 접속을 해도 에러는 나지 않도록 했는데..
RTSP 10초 timeout으로 플레이 까지는 하지 못한다.
도대체 VLC로 유튜브 플레이한 사람은.. 용자인가 -ㅁ-?
./configure --help
Input plugins:
--with-live555-tree=PATH live.com tree for static linking
--with-dv-raw1394=PATH libraw1394 headers and libraries
--with-dv-raw1394=PATH libraw1394 tree for static linking
--with-dv-avc1394=PATH libavc1394 headers and libraries
--with-dv-avc1394=PATH libavc1394 tree for static linking
--with-dvdread=PATH libdvdread headers and libraries
--with-dvdread-tree=PATH libdvdread tree for static linking
--with-dvdnav-config-path=PATH dvdnav-config path (default search in \$PATH)
--with-opencv-tree=PATH opencv tree for linking
--with-dvbpsi=PATH libdvbpsi headers and libraries
--with-dvbpsi-tree=PATH libdvbpsi tree for static linking
--with-v4l=PATH path to a v4l-enabled kernel tree
--with-v4l2=PATH path to a v4l2-enabled kernel tree
--with-videodev2=FILE Location of videodev2.h file (default /usr/include/linux/videodev2.h)
--with-dvb=PATH path to a dvb- and v4l2-enabled kernel tree
--with-ogg-tree=PATH ogg tree for static linking
--with-mod-tree=PATH mod tree for static linking
--with-gme-tree=PATH gme tree for static linking
Codec plugins:
--with-mad=PATH path to libmad
--with-mad-tree=PATH mad tree for static linking
--with-faad-tree=PATH faad tree for static linking
--with-twolame-tree=PATH twolame tree for static linking
--with-a52=PATH a52 headers and libraries
--with-a52-tree=PATH a52dec tree for static linking
--with-a52-fixed specify if liba52 has been compiled with fixed point support
--with-dca-tree=PATH libdca tree for static linking
--with-flac-tree=PATH flac tree for static linking
--with-libmpeg2-tree=PATH libmpeg2 tree for static linking
--with-vorbis-tree=PATH vorbis tree for static linking
--with-speex-tree=PATH speex tree for static linking
--with-tarkin-tree=PATH tarkin tree for static linking --with-x264-tree=PATH x264 tree for static linking
Video plugins:
--with-x use the X Window System
--with-sdl-config-path=PATH sdl-config path (default search in \$PATH)
--with-sdl-prefix=PATH path to libsdl (needed for cross-compiling),
e.g use as:
--with-sdl-prefix=/usr/local/arm/2.95.3/arm-linux/usr)
--with-qte=PATH Qt Embedded headers and libraries
--with-directx=PATH Win32 DirectX headers
--with-directfb=PATH path to DirectFB headers and libraries
--with-ggi=PATH path to libggi
--with-caca-config-path=PATH caca-config path (default search in \$PATH)
vlc의 트리구조는 다음과 같은데
vlc-1.0.4
|-- autotools
|-- bin
|-- compat
|-- doc
|-- extras
|-- include
|-- libs
|-- m4
|-- modules
|-- po
|-- projects
|-- share
|-- src
`-- test
vlc/extras 에 plugin들을 다운로드 한 다음
./configure --with-x264=tree=./extras/x264
이런식으로 설정해주면 하위까지 같이 컴파일하게 된다.
문제는, samr은 이전에 설정해 준, opencore-amr 쪽에서 알아서 samr 코덱이 들어간듯.
이건 어떻게 분리해서 넣어야 하나..
아무튼, youtube + RTSP로 검색하다보니, xHTML이 빠져서 그런거 같은 느낌이 강하게 든다..
도대체 이넘은 또 어떻게 산을 넘어가야 하나?
YouTube launched its mobile site, YouTube Mobile on 15 June 2007. It is based on xHTML and uses 3GP videos with H263/AMR codec and RTSP streaming. It is available via a web interface at m.youtube.com or via YouTube's Mobile Java Application.