ABOUT ME

-

Today
-
Yesterday
-
Total
-
  • [2021/09/29][짤막한 이야기 - 계측 & 분석]
    짤막한 이야기 2021. 9. 29. 11:07
    728x90
    반응형

    [2021/09/29][짤막한 이야기 - 계측 & 분석]
    “계측”과 “분석”은 PinTool을 구성하는 가장 기본적이며 중요한 개념이다.
    계측은 "분석용 코드를 삽입할 위치"를 나타내는 용어이다.
    분석은 "분석용 코드의 분석 행위"를 나타내는 용어이다.
    PinTool의 구현에는 두 개념을 반드시 포함하여야 한다.
    두 개념은 함수 형태로 정의되며, 먼저 삽입할 위치를 정의한 후 삽입할 코드를 정의한다.
    이를 각각 “계측 함수(Instrumentation Function)”와 “분석 함수(Analysis Function)라고 한다.
    메인 함수에서 계측 함수를 호출하고, 그 계측 함수에서 (특정 조건을 만족시) 분석 함수를 호출한다.
    계측 함수(INS_AddInstrumentFunction)에서 “INS_”는 접두사이며 하나의 “명령어(INStruction)”가 실행될 때마다 분석을 수행한다는 의미이다.
    분석 함수(INS_InsertCall)에서는 “Analysis” 함수를 콜백형태로 호출한다.
    위 코드에서는 특정 조건에 대한 정의가 없기 때문(계측 함수 내에 if문이 없음)에 항상 INS_InsertCall을 호출한다.
    또한 Analysis 함수의 내용이 없기 때문(분석 함수 내에 코드가 없음)에 아무런 분석도 수행하지 않는다.
    [관련된 문서 - 핀툴 프로그래밍 기본서[제1부. 헬로 핀툴 월드!]]
    #이야기 #루니프 #핀 #핀툴 #계측 #분석

    [2021/09/29][Short Story - Instrumentation & Analysis]
    “Instrumentation” and “Analysis” are the most basic and important concepts composing PinTool.
    Instrumentation is a term used to indicate "where to insert code for analysis".
    Analysis is a term that indicates "the act of analyzing code".
    two concepts must be included in order to implement PinTool.
    Both concepts are defined with function. First, the location to be inserted is defined, and then the code to be inserted is defined.
    These are called “Instrumentation Function” and “Analysis Function”.
    The main function calls the instrumentation function, and the instrumentation function calls the analysis function (if certain conditions are satisfied).
    In the instrumentation function (INS_AddInstrumentFunction), “INS_” is a prefix and means to perform analysis every time a single “instruction (INStruction)” is executed.
    In the analysis function (INS_InsertCall), the “Analysis” function is called in the form of a callback.
    In the code above, INS_InsertCall is always called because there is no definition for a specific condition (there is no if statement in the function body).
    Also, no analysis is performed since there is no content in the analysis function (there is no code in the function).
    [Related Documents - Basic Book for PinTool Programming[Part1.Hello PinTool World!]]
    #Story #LootNiP #Pin #PinTool #Instrumentation #Analysis

    728x90
    반응형
Designed by Tistory.