'프로그램 사용'에 해당되는 글 2290건

  1. 2010.01.24 gprof flat view 이해하기
  2. 2010.01.23 colinux와 UML
  3. 2010.01.23 gcov, gprof
  4. 2010.01.22 uboot tftp 부팅시 decompress 에러
  5. 2010.01.20 freeciv - 문명 오픈소스 6
  6. 2010.01.18 CellWriter 컴파일 하기 / 한글적용
  7. 2010.01.18 CellWriter 소스코드
  8. 2010.01.18 youtube mobile on VLC
  9. 2010.01.15 VLC compile [링크]
  10. 2010.01.15 시너지 (Synergy) for linux 4
gprof는 기본적으로 flat view로 출력된다.
index % time    self  children    called     name
                0.00    0.00     100/100         tt [3]
[1]      0.0    0.00    0.00     100         aa [1]
-----------------------------------------------
                0.00    0.00     100/100         tt [3]
[2]      0.0    0.00    0.00     100         bb [2]
-----------------------------------------------
                0.00    0.00     100/100         main [9]
[3]      0.0    0.00    0.00     100         tt [3]
                0.00    0.00     100/100         aa [1]
                0.00    0.00     100/100         bb [2]
-----------------------------------------------
아무튼 아래와 같은 형식의 출력이 보이는데, 참 봐도 무슨 소리인지 모르겠다.

간단하게 생각하자면
[%d] 값은 함수이고, 숫자 나온 것에 대한 구조를 보여준다.
[1] 은 aa() 를 실행한 녀석이 tt() 이라는 의미이고
[2] 는 bb() 를 실행한 녀석이 tt()
[3] 는 tt()를 실행한 녀석이 main() 이라는 이야기이다.

tt()
{
  aa();
  bb();
}

main()
{
   tt();
}

이런 구조를 지니게 된다.

만약, 하나의 함수를 여러개에서 호출한다면
위와 같이 [%d] 위에 하나씩 있는게 아니라 여러개가 나타나게 된다.

아래는 Kprof에서 실행한 결과이다.(main 함수는 어디로 가출한겨 ㄱ-)





'프로그램 사용 > gcov, gprof' 카테고리의 다른 글

gcov와 gcovr  (0) 2023.07.20
gcovr - gocv 를 html로  (0) 2023.07.10
gprof gui  (0) 2023.07.10
gcc -p -pg  (0) 2016.02.25
gcov, gprof  (0) 2010.01.23
Posted by 구차니
프로그램 사용/coLinux2010. 1. 23. 20:49
colinux가 예전에 user mode linux라고 듣기는 했지만,
그게 UML 이라고 생각을 전혀 하지 못하다니 ㄱ-

아무튼 UML을 이용해서 독립적으로 구동되게 한것이 바로 colinux 이고,
가상화의 한종류 중에 하나이기도 하다.

[링크 : http://www.hanb.co.kr/network/view.html?bi_id=1395]  UML vs KML
[링크 : http://www.hanb.co.kr/network/view.html?bi_id=267] 시스템 재해 복구 연습 해보기

[링크 : http://www.colinux.org/]
[링크 : http://user-mode-linux.sourceforge.net/]
Posted by 구차니
gcov - coverage testing tool
[링크 : http://korea.gnu.org/manual/release/gcov/gcov_1.ko.html]
[링크 : http://linux.die.net/man/1/gcov]

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.

[링크 : http://linux.die.net/man/1/gcc]



gprof - display call graph profile data
[링크 : http://linux.die.net/man/1/gprof]
[링크 : http://kprof.sourceforge.net/] + [링크 : http://www.graphviz.org/]

프로파일링은 어떤 함수가 몇번이나 불려지고(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.

[링크 : http://linux.die.net/man/1/gcc]



"리눅스 디버깅과 성능 튜닝 - 오픈소스 도구를 사용한 문제 원인 발견과 해결"
[링크 : http://www.yes24.com/24/goods/1948002?scode=032&srank=1]

'프로그램 사용 > gcov, gprof' 카테고리의 다른 글

gcov와 gcovr  (0) 2023.07.20
gcovr - gocv 를 html로  (0) 2023.07.10
gprof gui  (0) 2023.07.10
gcc -p -pg  (0) 2016.02.25
gprof flat view 이해하기  (0) 2010.01.24
Posted by 구차니
프로그램 사용/u-boot2010. 1. 22. 19:50
denx.de에 나온 메시지는 아래와는 좀 다른데,

GUNZIP ERROR - must RESET board to recover
에러가 발생할경우, 메모리가 부족해서 겹쳐서 제대로 압축을 해제하지 못했을 가능성이 있다고 한다.
그것도 아니라면.. 도대체 머가 문제일까?

   Verifying Checksum ... OK
   Uncompressing Kernel Image ... Error: Bad gzipped data
GUNZIP ERROR - must RESET board to recover

[링크 : http://www.denx.de/wiki/view/DULG/Manual]
    [링크 : http://www.denx.de/wiki/view/DULG/HowCanILoadAndUncompressACompressedImage]
    [링크 : http://www.denx.de/wiki/view/DULG/LinuxHangsAfterUncompressingKernel]
    [링크 : http://www.denx.de/wiki/view/DULG/LinuxUncompressingError]
Posted by 구차니
프로그램 사용2010. 1. 20. 14:43


다운로드 & 게임고고싱 ㅋㅋ
한번 받아서 2000년까지 왔는데 증기기관도 못 만들었어 ㅠ.ㅠ

[링크 : http://freeciv.wikia.com/wiki/Main_Page]
[링크 : http://sourceforge.net/projects/freeciv/] << 다운로드

'프로그램 사용' 카테고리의 다른 글

IE8 에서 APM 접속시 (인트라넷)  (0) 2010.04.03
X-LUK DBC-UP 모니터 프로그램 :: somikon  (0) 2010.02.18
Cooliris (piclens)  (6) 2010.01.05
Fast Picture Viewer 제한사항  (0) 2009.12.27
BeeGIF - 대박 GIF 프로그램!  (2) 2009.12.13
Posted by 구차니
libxtst-dev 와
libgtk2.0-dev를 필요로 한다.


아무튼, CellWriter의 구조상.. 논리적 오류로
모든 변수들이 int 형이지, unsigned int형이 존재하지 않는다.

즉, 한글의 영역인 0xAC00은 마이너스 값으로 인식해서 제대로 계산을 하지 못한다.

수정할 곳은

common.h 46 line
typedef struct {
        short enabled;
        const unsigned int start, end;
        const char *name;
} UnicodeBlock;

cellwidget.c 1793 line
void cell_widget_train(void)
{
        UnicodeBlock *block;
        unsigned int i, pos, range;

        stop_timeout();

        /* Save cells */
        if (!training) {
                cells_saved = cells;
                cell_rows_saved = cell_rows;
                cell_cols_saved = cell_cols;
                cell_row_view_saved = cell_row_view;
                cells = NULL;
                cell_row_view = 0;
        }

        /* Clear if not training any block */
        if (training_block < 0) {
                free_cells();
                pack_cells(1, cell_cols);
                cell_widget_render();
                return;
        }

        /* Pack the Unicode block's characters into the cell grid */
        block = unicode_blocks + training_block;
        range = block->end - block->start + 1;
        training = TRUE;
        pack_cells((range + cell_cols - 1) / cell_cols, cell_cols);

        /* Preset all of the characters for training */
        for (i = 0, pos = 0; i < range; i++) {
                unsigned short ch;

                ch = block->start + i;
                if (char_disabled(ch))
                        continue;
                cells[pos].ch = ch;
                cells[pos].alts[0] = NULL;
                cells[pos++].flags = 0;
        }
        range = pos;
        for (; pos < cell_rows * cell_cols; pos++)
                clear_cell(pos);
        pack_cells(1, cell_cols);

        unclear(FALSE);
        cell_widget_render();
}


음.. 생각해보니
ㅋㅋㅋ 이런 자소도 있어야지 이모티콘을 쓰니 이녀석들을 위해 Jamo도 복구를 해야겠다.

그런데 대충 12000 자 인데.. 언제 학습시키지? ㄱ-

'프로그램 사용 > CellWriter' 카테고리의 다른 글

CellWriter 소스코드  (0) 2010.01.18
CellWriter - 리눅스용 필기인식 프로그램  (2) 2009.12.29
Posted by 구차니
C:\cellwriter-1.3.4\src\window.c
849            { FALSE, 0x1100, 0x11FF, "Hangul Jamo" },
911            { FALSE, 0x3130, 0x318F, "Hangul Compatibility Jamo" },
927            { FALSE, 0xAC00, 0xD7AF, "Hangul Syllables" },


음.. 내용을 검색해보니 window.c 에서 Hangul 이라는 키워드가 검출 되었다.

WindowsXP "굴림" 문자표 검색을 해보니
 Hangul Syllable (음절) 링크
 0xAC00 ~ 0xD7A3
 Hangul Choseong (초성)  0x1100 ~ 0x115F
 Hangul Jungseon (중성)  0x1160 ~ 0x11A2
 Hangul jongseon (종성)  0x11A8 ~ 0x11F9
이렇게 구분이 된다.

Unicode.org 에서

Hangul Jamo

Hangul Jamo Extended-A

Hangul Jamo Extended-B

Hangul Compatibility Jamo

Halfwidth Jamo

Hangul Syllables (.7MB)


이렇게 구분되긴 하지만, 실질적으로 우리가 보는 조합된 문자는 Syllabels에 들어있다.
그나저나.. Syllabels만 해도 11,171 글자인데.. 어느 세월에 학습을 하고 직접 입력을 하나 ㄱ-

2009/12/29 - [Linux/Ubuntu] - CellWriter - 리눅스용 필기인식 프로그램

Posted by 구차니
프로그램 사용/VLC2010. 1. 18. 15:40
우여곡절끝에 VLC를 컴파일 해서 samr / H.263 코덱으로 접속을 해도 에러는 나지 않도록 했는데..
RTSP 10초 timeout으로 플레이 까지는 하지 못한다.
도대체 VLC로 유튜브 플레이한 사람은.. 용자인가 -ㅁ-?




아무튼, 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.

[링크 : http://blog.daum.net/johagnes/1890446]

'프로그램 사용 > VLC' 카테고리의 다른 글

의미는 없는 Linux / Windows VLC 차이  (0) 2010.01.26
VLC로 youtube 동영상 감상하기  (0) 2010.01.26
VLC compile [링크]  (0) 2010.01.15
ffmpeg + AMR + x264 + VLC?  (0) 2010.01.14
우분투에서 VLC 컴파일하기  (3) 2010.01.13
Posted by 구차니
프로그램 사용/VLC2010. 1. 15. 17:45
git로 소스를 받아 컴파일하는데
음.. vlc가 왜 git 소스로는 컴파일이 안될까..

vlc/extras/ffmpeg
vlc/extras/x264

이런식으로 받아서 추가적으로 컴파일해주는 내용이 들어있는게 다른 문서들과의 차이점.
아무튼 확인이 필요함

[링크 : http://www.jbkempf.com/blog/post/2008/03/28/Build-VLC-media-player-under-Ubuntu-Hardy-804]

'프로그램 사용 > VLC' 카테고리의 다른 글

VLC로 youtube 동영상 감상하기  (0) 2010.01.26
youtube mobile on VLC  (0) 2010.01.18
ffmpeg + AMR + x264 + VLC?  (0) 2010.01.14
우분투에서 VLC 컴파일하기  (3) 2010.01.13
VLC configure --help  (0) 2010.01.13
Posted by 구차니
프로그램 사용/synergy2010. 1. 15. 15:38
quicksynergy는 리눅스용 시너지 GUI-Frontend 이다.
(다르게 말하면 synergy는 별도 설치가 필요하다)

Share는 서버설정 / Use는 클라이언트 설정이다.
Use는 간단하게 서버의 아이피(윈도우 pc이름을 잘못찾으므로 아이피를 추천)
그리고 현재 리눅스PC의 모니터이름을 넣어준다.

퀵시너지가 실행되면 이런식으로 상단에 표시된다.

설치는 quicksynergy 혹은 synergy로 검색하면 나온다.



서버 설정은 이전글 참고

'프로그램 사용 > synergy' 카테고리의 다른 글

barrier on ubuntu 22.04 실패!  (2) 2023.06.15
synergyc - synergy client for linux  (2) 2010.03.20
시너지 (Synergy) - KVM 프로그램(?)  (4) 2009.11.13
Posted by 구차니