x86기반 linux에 이미 TestRT가 설치되어 있었고 환경 정보는 아래와 같았다.
1. 환경
Linux: XX.XX.XX.XX:11 (vnc server)
Printer target: XX.XX.XX.XX (COM Port, Telnet)
2. TestRT수행
Linux에서 TestRT는 /opt/Rational 에 설치가 되어 있었으며 구동을 하기 위해서는 config directory의 startlmgrd_on_localhost라는 script를 수행해야했다.
3. 적용할 과제 및 범위
X Project의 Portability_Print라는 모듈을 대상으로 적용하게 되었다.
4. Makefile 수정
CC := attolcc --atl_multi_threads=1 --no_sys_include --att_timestamp=1 --att_thread_info=1 -tsfdir=TestRT -fdcdir=TestRT -trace -mempro -perfpro -block=logical -proc=ret -ignore=PifcLib.c,PifcLibAux.c,PifcLibInit.c,PifcLibModelInfo.c,PifcLibRW.c -- $(CC)
* thread환경이라는 것을 고려해서 --atl_multi_threads(1/0) --no_sys_include를 지정해 주었다.
trace view에서 timestamp info를 보이기 위해서 --att_timestamp(1/0)를 지정하였다. -tsfdir, -fdcdir은 생성되는 파일의 위치를 가리킨다. -trace -mempro -perfpro -block=logical은 출력할 view정보를 가리킨다.
-ignore로 특정 파일들을 무시할 수 있었다.
...........
C_SRCS += \
../src/TestRT/TestRT.c
OBJS += \
./src/TestRT/TestRT.o
C_DEPS += \
./src/TestRT/TestRT.d
Module 내부에 helloTestRT라는 함수를 넣고는 이 함수가 불리는지 확인해 보기로 하였다.
5. Preprocessing
profiling결과를 file로 memory dump를 하기 위해서는 코드의 특정 위치에 전처리 구문을 넣어야했다.
ex)
#pragma attol insert _ATCPQ_DUMP(_ATCPQ_RESET);
6. TP.o 생성
Studio를 사용하여 TDP(Target Deployment Port) Editor를 열수가 있다. 그리고 이를 사용하여 xdp파일을 편집할 수 있다. 처음에는 이것저것 수정을 하였으나 결국 그대로(standard mode) 사용하게 되었다.
TDP Editor로 xdp를 save하게 되면 /opt/Rational/releases/TestRealTime.7.5.0.0/targets 에 directory가 생성된다. 그러면 ATLTGT라는 환경 변수로 해당 directory를 지정해 주어야한다.
TDP설정은 TP.c 파일로 쓰여지고 build를 하면 TP.o로 생성이 된다.
7. Build
X Project는 C 그리고 Java로 구성이 되어 있었다. Ant build script를 사용하면 자동으로 make까지 연계되어 build가 되었다. build를 하면 지정된 TestRT directory에 *.tsf, *.fdc 등 파일이 생성되는 것을 확인할 수 있다.
Build된 이미지를 Target에 넣고는(by samba) ./start.sh로 수행을 시켜 보았다.
8. atlout.spt
xdp 파일에서 지정한 directory에 atlout.spt 파일이 생성되는 것을 확인할 수 있다.(on target)
이 파일을 TestRT linux로 가지고 가서 split를 수행한다.
ex) atlsplit atlout.spt
그러면 atltrace.tdf, attolcov.tio, purifylt.tdf, quantifylt.tdf 가 생성되는 것을 확인할 수 있다.
studio *을 하여 GUI 결과를 확인할 수 있다.
궁금한 사항은 아래 사이트를 접속하거나 googling하여 찾아볼 수 있을 듯 하다.
http://www-01.ibm.com/software/awdtools/test/realtime/support/doc.html
'Papers > Static&Dynamic Analysis' 카테고리의 다른 글
JProbe에 의한 Dynamic Analysis 활용 (0) | 2009.05.10 |
---|---|
Object Flow Analysis - Taking an Object-Centric View on Dynamic Analys (0) | 2009.05.03 |
Exception-chain Analysis_Revealing Exception Handling Architecture in (0) | 2009.05.03 |
Towards Employing Use-cases and Dynamic Analysis to Comprehend Mozilla (0) | 2009.05.01 |
Dynamic Analysis Techniques for the Reconstruction of Architectural ~ (0) | 2009.05.01 |