KR101541617B1 - Method and apparatus for analyzing application in multicore embedded linux system - Google Patents

Method and apparatus for analyzing application in multicore embedded linux system Download PDF

Info

Publication number
KR101541617B1
KR101541617B1 KR1020130164175A KR20130164175A KR101541617B1 KR 101541617 B1 KR101541617 B1 KR 101541617B1 KR 1020130164175 A KR1020130164175 A KR 1020130164175A KR 20130164175 A KR20130164175 A KR 20130164175A KR 101541617 B1 KR101541617 B1 KR 101541617B1
Authority
KR
South Korea
Prior art keywords
monitoring
resource
program
memory
period
Prior art date
Application number
KR1020130164175A
Other languages
Korean (ko)
Other versions
KR20150075830A (en
Inventor
박문주
주윤덕
Original Assignee
인천대학교 산학협력단
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 인천대학교 산학협력단 filed Critical 인천대학교 산학협력단
Priority to KR1020130164175A priority Critical patent/KR101541617B1/en
Publication of KR20150075830A publication Critical patent/KR20150075830A/en
Application granted granted Critical
Publication of KR101541617B1 publication Critical patent/KR101541617B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Debugging And Monitoring (AREA)

Abstract

본 발명은 멀티코어 임베디드 리눅스 시스템을 위한 응용프로그램 분석 방법에 있어서, 실행 인터페이스를 통해 사용자로부터 모니터링하고자 하는 프로그램의 위치 기반 경로 탐색을 위한 기설정된 타입의 경로명 혹은 프로세스 ID를 입력받는 과정과, 상기 실행 인터페이스를 통해 경로명 및 프로세스 ID 중 어느 하나의 입력 여부에 따라 상기 경로명에 대응하는 프로그램의 API를 순차적으로 호출하여 해당 프로그램을 실행하거나 혹은 리눅스 시스템에서 현재 실행 중인 적어도 하나의 프로세스에 대한 자원 모니터링을 수행하여 응용 프로그램에 대한 자원 모니터링을 수행하는 과정을 포함함을 특징으로 한다.A method for analyzing an application program for a multi-core embedded Linux system, the method comprising: receiving a path name or a process ID of a predetermined type for searching for a location-based path of a program to be monitored from a user through an execution interface; The API of the program corresponding to the path name is sequentially called according to whether the path name or the process ID is input through the interface, or the resource is monitored for at least one process currently executing in the Linux system And performing resource monitoring on the application program.

Description

멀티코어 임베디드 리눅스 시스템을 위한 응용 프로그램 분석 방법 및 장치{METHOD AND APPARATUS FOR ANALYZING APPLICATION IN MULTICORE EMBEDDED LINUX SYSTEM}[0001] METHOD AND APPARATUS FOR ANALYZING APPLICATION IN MULTICORE EMBEDDED LINUX SYSTEM [0002]

본 발명은 멀티코어 통신 처리 서비스에 관한 것으로, 보다 상세하게는 멀티코어 임베디드 시스템상에서 동작하는 리눅스(Linux) 응용의 수행 특성을 분석할 수 있는 수행 분석 도구를 통해 기존의 리눅스 정책보다 성능 및 에너지 소모 측면에서 향상된 수행 기술에 관한 것이다.The present invention relates to a multi-core communication processing service, and more particularly, to a multi-core communication processing service capable of analyzing performance characteristics of a Linux application running on a multicore embedded system, The present invention relates to an improved performance technique in terms of reliability.

임베디드 시스템을 위한 프로세서의 성능이 높아짐에 따라, 스마트 폰, 태블릿 등을 중심으로 멀티코어 프로세서의 채택이 보편화 되고 있다. 사용자는 멀티코어 프로세서를 사용함으로써 병렬처리를 통한 성능 향상을 기대하나, 임베디드 시스템 상의 응용이 병렬화되어 있지 않다면 오히려 소프트웨어 복잡성을 높이고 시스템의 에너지 사용량을 증가시킬 가능성이 있다. 따라서 멀티코어 프로세서 기반의 임베디드 시스템에서는 멀티코어 프로세서의 처리 능력과 에너지 소모와의 균형을 유지하는 것이 매우 중요한 이슈이다.As the performance of processors for embedded systems increases, the adoption of multi-core processors is becoming common, especially in smartphones and tablets. Users are expected to improve performance through parallel processing by using multicore processors. However, if the applications on the embedded system are not parallelized, it is likely to increase software complexity and increase energy usage of the system. Therefore, in an embedded system based on a multicore processor, it is very important to balance the processing power and energy consumption of a multicore processor.

과거의 임베디드 시스템에서는 단일 처리기 시스템으로 구성되는 경우가 많았으며, 이에 따라 임베디드 시스템을 위한 응용들은 병렬처리를 고려하지 않은 경우가 대부분이다. 따라서 기존의 응용들은 멀티코어 임베디드 시스템의 하드웨어를 충분히 활용하지 못할 가능성이 높다. In the past embedded systems, a single processor system is often used, and most applications for embedded systems do not consider parallel processing. Therefore, existing applications are likely to fail to fully utilize the hardware of multicore embedded systems.

반면, 새로 개발되고 있는 응용들은 멀티코어 프로세서나 GPGPU와 같은 현대 임베디드 시스템의 고성능 하드웨어를 고려하여 만들어졌을 수 있다. 이러한 응용의 특성에 따라 시스템에서의 해당 응용의 성능은 달라질 것이다.On the other hand, newly developed applications may have been made considering high performance hardware of modern embedded systems such as multicore processor or GPGPU. Depending on the nature of the application, the performance of the application in the system will vary.

그러나 운영체제가 응용의 특성을 알고 있지 못하다면 그 특성에 적합한 처리를 하지 못하여 비효율성이 발생하게 되고, 결과적으로 성능의 저하나 고에너지 소모가 발생할 수 있다.However, if the operating system does not know the characteristics of the application, the inefficiency occurs due to the inability to perform the processing suitable for the characteristics, and consequently, performance degradation or high energy consumption may occur.

멀티코어 임베디드 시스템에서는 응용의 특성에 따른 운영체제의 서비스가 필요하며, 이를 위해서는 응용의 특성을 파악하기 위한 방법이 필요하다. 현재 멀티코어 임베디드 시스템 소프트웨어 개발을 위해 사용할 수 있는 분석도구는 제한적이다.In a multicore embedded system, an operating system service is required depending on the characteristics of an application. For this purpose, a method for identifying characteristics of an application is required. Currently, there are limited analysis tools available for developing multicore embedded system software.

예를 들어, 리눅스 시스템을 위한 기존의 자원 측정 도구로 리눅스에 기본 탑재된 top과 그의 개선된 htop[1]을 대표적으로 들 수 있는데, 이들은 특정 응용에 대한 CPU 코어별 이용률만 확인할 수 없고 전체 응용을 대상으로 한 코어별 이용률만 확인 가능하다. 그 외에는 JTAG 인터페이스를 이용한 하드웨어 디버거를 이용하는 방법들이 있는데, 이러한 장비들은 매우 고가이며 디버깅용 JTAG 인터페이스가 노출되어 있지 않은 경우 사용할 수 없는 단점이 있다For example, the traditional resource measurement tool for Linux systems is top-mounted on Linux and its improved htop [1], which can not identify only the utilization rate of CPU core for a specific application, Of the total number of cores. There are other ways to use a hardware debugger using the JTAG interface, which are very expensive and can not be used unless the JTAG interface for debugging is exposed

따라서 본 발명은 멀티코어 임베디드 시스템상에서 수행하는 응용의 특성을 분석하기 위한 것으로, 호환성 있는 사용을 위해 운영체제의 수정 없이 분석 도구의 결과를 활용하여 응용의 성능 및 에너지 효율을 향상시키기 위한 멀티코어 임베디드 리눅스 시스템을 위한 응용 프로그램 분석 방법 및 장치를 제공하고자 한다.Accordingly, the present invention is directed to analyzing the characteristics of an application executed on a multicore embedded system. In order to improve the performance and energy efficiency of an application using the results of the analysis tool without operating system modification for compatibility, And to provide an application analysis method and apparatus for the system.

본 발명의 일 견지에 따르면, 멀티코어 임베디드 리눅스 시스템을 위한 응용프로그램 분석 방법에 있어서, 실행 인터페이스를 통해 사용자로부터 모니터링하고자 하는 프로그램의 위치 기반 경로 탐색을 위한 기설정된 타입의 경로명 혹은 프로세스 ID를 입력받는 과정과, 상기 실행 인터페이스를 통해 경로명 및 프로세스 ID 중 어느 하나의 입력 여부에 따라 상기 경로명에 대응하는 프로그램의 API를 순차적으로 호출하여 해당 프로그램을 실행하거나 혹은 리눅스 시스템에서 현재 실행 중인 적어도 하나의 프로세스에 대한 자원 모니터링을 수행하여 응용 프로그램에 대한 자원 모니터링을 수행하는 과정을 포함함을 특징으로 한다.According to an aspect of the present invention, there is provided an application program analysis method for a multi-core embedded Linux system, the method comprising: receiving a path name or a process ID of a predetermined type for searching for a location- And sequentially executing an API of a program corresponding to the path name according to whether a path name or a process ID is input through the execution interface to execute the corresponding program or to execute at least one process currently executed in the Linux system And performing resource monitoring on the application program by performing resource monitoring on the application program.

본 발명의 다른 견지에 따르면, 멀티코어 임베디스 리눅스 시스템을 위한 응용 프로그램 분석 장치에 있어서, 사용자로부터 모니터링하고자 하는 프로그램의 위치 기반 경로 탐색을 위한 기설정된 타입의 경로명 혹은 프로세스 ID를 입력받는 실행 인터페이스부와, 상기 실행 인터페이스부를 통해 경로명 및 프로세스 ID 중 어느 하나의 입력 여부에 따라 상기 경로명에 대응하는 프로그램의 API를 순차적으로 호출하여 해당 프로그램을 실행하거나 혹은 리눅스 시스템에서 현재 실행 중인 적어도 하나의 프로세스에 대한 자원 모니터링을 수행하여 응용 프로그램에 대한 자원 모니터링을 수행하도록 제어하는 제어부를 포함함을 특징으로 한다.According to another aspect of the present invention, there is provided an apparatus for analyzing an application program for a multicore embedded Linux system, the apparatus comprising: an execution interface unit for receiving a path name or a process ID of a predetermined type for searching for a location- And an execution interface unit for sequentially executing an API of the program corresponding to the path name according to whether a path name or a process ID is inputted or executing the corresponding program or for executing at least one process currently executed in the Linux system And a control unit for performing resource monitoring and controlling resource monitoring for an application program.

본 발명은 멀티코어 임베디드 시스템상에서 동작하는 리눅스(Linux) 응용의 수행 특성을 분석할 수 있는 수행 분석 도구를 통해 기존의 리눅스 정책보다 성능 및 에너지 소모 측면에서 향상된 효과를 발휘한다.The present invention has improved performance and energy consumption over existing Linux policy through performance analysis tools that can analyze performance characteristics of Linux applications running on multicore embedded systems.

도 1은 본 발명의 일 실시 예에 따른 멀티코어 임베디드 리눅스 시스템을 위한 응용 프로그램 분석 방법에 관한 전체 흐름도.
도 2는 본 발명의 일 실시 예에 따른 멀티코어 임베디드 리눅스 시스템을 위한 응용 프로그램 분석 방법이 적용된 요구 거버너와 성능 거버너가 사용되었을 때의 각 CPU 코어의 이용률을 보인 그래프.
도 3a는 기존 리눅스 시스템에서의 벤치마크 결과를 보인 테이블.
도 3b는 본 발명의 분석도구의 결과가 활용된 Firefox 수행 분석 결과를 보인 테이블.
도 4a는 본 발명이 적용된 분석도구의 테스트 결과를 바탕으로 벤치마크를 수행했을 때의 SunSpider 벤치마크 수행결과를 보인 테이블.
도 4b는 본 발명이 적용된 분석도구의 테스트 결과를 바탕으로 벤치마크를 수행했을 때의 Firefox 벤치마크 수행결과를 보인 테이블.
도 5는 본 발명이 적용된 분석도구의 테스트 결과를 바탕으로 벤치마크를 수행했을 때의 Firefox 벤치마크 수행결과에 따른 캐시미스에 대한 테이블.
도 6은 본 발명의 일 실시 예에 따른 멀티코어 임베디스 리눅스 시스템을 위한 응용 프로그램 분석에 관한 상세 블록도.
1 is an overall flowchart of an application program analysis method for a multicore embedded Linux system according to an embodiment of the present invention.
FIG. 2 is a graph showing a utilization ratio of each CPU core when a demand governor and a performance governor to which an application program analysis method for a multicore embedded Linux system according to an embodiment of the present invention is applied.
Figure 3a is a table showing the benchmark results in an existing Linux system.
FIG. 3B is a table showing an analysis result of Firefox using the results of the analysis tool of the present invention.
FIG. 4A is a table showing a result of performing a benchmark of a SunSpider when a benchmark is performed based on test results of an analysis tool to which the present invention is applied.
FIG. 4B is a table showing the results of the Firefox benchmark performed when a benchmark is performed based on test results of the analysis tool to which the present invention is applied.
FIG. 5 is a table of cache misses according to the results of the benchmarking performed when the benchmark is performed based on the test results of the analysis tool to which the present invention is applied.
6 is a detailed block diagram of an application program analysis for a multicore Embedded Linux system in accordance with an embodiment of the present invention.

이하 본 발명에 따른 바람직한 실시 예를 첨부한 도면을 참조하여 상세히 설명한다. 하기 설명에서는 구체적인 구성 소자 등과 같은 특정 사항들이 나타나고 있는데 이는 본 발명의 보다 전반적인 이해를 돕기 위해서 제공된 것일 뿐 이러한 특정 사항들이 본 발명의 범위 내에서 소정의 변형이나 혹은 변경이 이루어질 수 있음은 이 기술 분야에서 통상의 지식을 가진 자에게는 자명하다 할 것이다.
Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings. It will be appreciated that those skilled in the art will readily observe that certain changes in form and detail may be made therein without departing from the spirit and scope of the present invention as defined by the appended claims. To those of ordinary skill in the art.

본 발명은 멀티코어 통신 처리 서비스에 관한 것으로, 더욱 상세하게는 모니터링하고자 하는 프로그램의 위치 기반 경로 탐색을 위한 경로명 혹은 프로세스 ID를 입력받아, 상기 경로명에 대응하는 프로그램을 실행하거나 혹은 리눅스 시스템에서 현재 실행 중인 적어도 하나의 프로세스에 대한 자원 모니터링을 수행하여 리소스(resource) 정보 항목별 특성에 따라 기설정된 주기별 적절성(suitability) 여부를 판단하여 그룹핑을 수행하고, 리눅스 시스템에서 지원하는 모니터링을 위한 규칙에 따라 각 그룹별 리소스 정보 항목에 대한 모니터링을 수행함으로써 멀티코어 임베디드 시스템상에서 동작하는 리눅스(Linux) 응용의 수행 특성을 분석할 수 있는 수행 분석 도구를 통해 기존의 리눅스 정책보다 성능 및 에너지 소모 측면에서 향상된 수행 기술을 제공하고자 한다.
The present invention relates to a multicore communication processing service, and more particularly, to a multicore communication processing service which receives a path name or a process ID for searching for a location-based path of a program to be monitored and executes a program corresponding to the path name, And determines whether or not it is suitability according to a predetermined period according to the characteristics of each resource information item to perform grouping. In accordance with rules for monitoring supported by the Linux system, Performance and energy consumption are improved over existing Linux policy through performance analysis tool that can analyze performance characteristics of Linux application running on multicore embedded system by monitoring resource information items for each group Providing technology It wants.

이하, 본 발명의 일 실시 예에 따른 멀티코어 임베디드 리눅스 시스템을 위한 응용 프로그램 분석 방법에 대해 자세히 살펴보기로 한다.Hereinafter, an application program analysis method for a multicore embedded Linux system according to an embodiment of the present invention will be described in detail.

도 1은 본 발명의 일 실시 예에 따른 멀티코어 임베디드 리눅스 시스템을 위한 응용 프로그램 분석 방법에 관한 전체 흐름도이다.1 is an overall flowchart of an application program analysis method for a multicore embedded Linux system according to an embodiment of the present invention.

도 1을 참조하면, 110 과정에서는 응용 프로그램은 단일 프로세스 하에서 프로세스를 관리하는 운영체제 모듈이 상기 응용 프로그램의 각 S/W 컴포넌트별로 구분할 수 있는 식별값을 지정한다.Referring to FIG. 1, in operation 110, an application program specifies an identification value that an operating system module that manages a process under a single process can distinguish by each S / W component of the application program.

112 과정에서는 실행 인터페이스를 호출하고, 114 과정에서는 상기 실행 인터페이스를 통해 사용자로부터 모니터링하고자 하는 프로그램의 위치 기반 경로 탐색을 위한 기설정된 타입의 경로명 입력 여부를 체크한다.In step 112, an execution interface is called. In step 114, it is checked whether or not a predetermined type of path name is input for searching for a location-based path of a program to be monitored by the user through the execution interface.

이때, 상기 경로명은 리눅스 시스템상에 저장된 리소스의 위치를 식별하기 위한 것으로, 파일 또는 디렉토리의 위치를 식별하는 문자숫자식 기호의 시퀀스이고, 상기 경로명이 파일명에 의해 특정되면 현재의 작업 디렉토리에서 파일을 검색하고, 파일이 상이한 디렉토리에 존재하면, 파일 검색을 위한 경로가 특정된다.In this case, the path name is a sequence of alphanumeric symbols for identifying the location of a resource stored on the Linux system, and is a sequence of alphanumeric symbols for identifying the location of a file or a directory. If the path name is specified by a file name, If the file exists in a different directory, a path for searching for the file is specified.

상기 114 과정에서의 체크 결과, 경로명이 입력된 경우, 116 과정으로 이동하여 상기 경로명에 대응하는 프로그램의 API를 순차적으로 호출한다. 상기 API(application programming interface)는 프로그램 내에서 실행을 위해 특정 서브루틴에 연결을 제공하는 함수를 호출하는 것으로 구현되는 것으로, 이러한 API의 호출을 통해 122 과정에서는 해당 프로그램을 실행한다.As a result of the check in step 114, if a path name is input, the process moves to step 116 and sequentially calls the API of the program corresponding to the path name. The application programming interface (API) is implemented by calling a function that provides a connection to a specific subroutine for execution in the program. In step 122, the API is called to execute the corresponding program.

이러한 응용 프로그램은 리눅스 운영체제 하에서 프로세스/스레드 관리를 위한 PCB(process control block) 자료구조(구조체)에서와 같이, 하나의 프로세스 내에 다수의 스레드로 구성되어 실행되는 것으로, 시스템 라이브러리(system library), S/W 플랫폼(platform), 3rd party library, 어플리케이션 등의 다양한 S/W 컴포넌트들이 단일 실행파일로 링크되어 단일 프로세스로 실행될 수 있다.These applications are composed of a number of threads in a process, such as a process control block (PCB) data structure (structure) for process / thread management under the Linux operating system. / W Various software components such as platform, 3rd party library, and application can be linked to a single executable file and executed as a single process.

124 과정에서는 상기 실행 인터페이스를 통해 경로명 입력에 따라 상기 경로명에 대응하는 응용 프로그램에 대한 자원 모니터링 수행을 위해, 리소스(resource) 정보 항목별 특성에 따라 기설정된 주기별 적절성(suitability) 여부를 판단한다. In step 124, in order to perform resource monitoring for the application program corresponding to the path name according to the input of the path name through the execution interface, it is determined whether suitability is determined according to the property of each resource information item.

이후, 126 과정에서 적어도 둘 이상의 리소스 정보 항목으로 그룹핑을 수행하고, 리눅스 시스템에서 지원하는 모니터링을 위한 규칙에 따라 128 과정에서는 각 그룹별 리소스 정보 항목에 대한 모니터링을 수행한다.In step 126, grouping is performed with at least two resource information items, and in step 128, resource information items for each group are monitored according to rules for monitoring supported by the Linux system.

이러한 경로명을 입력받는 경우에는 본 발명이 적용된 멀티코어 임베디드 리눅스 시스템을 위한 응용 프로그램 분석의 제어를 위한 제어부(예컨대, 응용 프로그램 분석 도구)에서 직접 응용을 실행시켜 시작과 동시에 모니터링을 시작할 수 있다. 상기 제어부는 리눅스가 제공하는 시스템 정보를 이용하여 프로그램의 수행 특성을 조사한다.In the case of receiving the path name, the application may be directly executed in a control unit (for example, an application program analysis tool) for controlling application program analysis for the multicore embedded Linux system to which the present invention is applied, and monitoring can be started at the same time. The control unit examines performance characteristics of a program using system information provided by Linux.

이를 기반으로 상기 자원 모니터링 수행은, 프로그램별 실행에 대응하는 정책(policy) 정보에 따라 상기 정책 정보의 기설정된 실행 항목별 사용량을 이용률 측정을 위한 자료구조에 누적하고, 상기 리소스 정보 항목별 특성에 따라 그룹핑된 그룹별 기설정된 주기를 상기 실행 항목별 이용률 측정에 적용하여 산출한다.The resource monitoring is performed based on policy information corresponding to program-specific execution, and the usage amount of each policy item is accumulated in a data structure for measuring the utilization rate, The predetermined period for each group grouped is applied to the utilization rate measurement for each execution item.

더욱 상세하게는, 상기 리소스(resource) 정보 항목별 특성에 따라 정적(static) 리소스(resource) 데이터로 설정된 항목에 대하여 프로그램 실행 중 1회 모니터링이 실시되는 제1 주기, 지피(jiffy) 단위로 발생하는 스레드의 코어 이주를 기반으로 CPU 정보에 대한 1 지피별 모니터링이 실시되는 제2 지피 주기, 상기 리소스 정보 항목별 모니터링의 오버헤드를 고려하여 해당 프로그램이 구동되는 단위인 태스크 스케줄링 데이터로 설정된 항목에 대하여 사용자로부터 정의된 주기로 모니터링이 실시되는 제3 주기를 설정한 후, 상기 제1 주기로 설정된 1) 시스템의 CPU 거버너(governor)/sys/devices/system/cpu/cpu0/scaling_governor, 2) 현재 사용 가능한 코어 개수/sys/devices/system/cpu/possible, 3) 총 메모리 용량/proc/meminfo 데이터들을 모니터링한다.More specifically, the program is generated in units of a first cycle and a jiffy in which monitoring is performed once during program execution for items set as static resource data according to the characteristics of each resource information item A second trigger cycle in which monitoring is performed for each piece of CPU information on the basis of core migration of a thread to be executed, and an item set as task scheduling data, which is a unit in which the program is driven in consideration of the overhead of monitoring by each resource information item A CPU governor / sys / devices / system / cpu / cpu0 / scaling_governor of the system set to the first period after setting a third period in which monitoring is performed in a period defined by the user, Number of cores / sys / devices / system / cpu / possible, 3) monitor the total memory capacity / proc / meminfo data.

그리고, 제2 주기로 설정된 1) 프로세스의 처리기 사용량/프로세스의 스레드가 사용한 코어 및 이용량/proc/[pid]/task/[tid]/stat, 각 코어의 사용시간 /proc/stat 2) 해당 지피에서의 CPU 주파수 /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freu 및 3) 문맥전환 횟수 데이터들을 모니터링한다. 스레드의 코어 이주(migration)가 지피 단위로 발생하므로 1 지피 마다 CPU 정보를 조사한다. [pid]는 수행 프로세스의 PID 번호를, [tid]는 스레드의 TID 번호를 나타낸다./ Proc / [pid] / task / [tid] / stat, the usage time of each core / proc / stat 2) CPU / sys / devices / system / cpu / cpu0 / cpufreq / cpuinfo_cur_freu and 3) Since thread migration occurs on a per-thread basis, examine CPU information per thread. [pid] indicates the PID number of the execution process, and [tid] indicates the TID number of the thread.

또한, 제3 주기로 설정된 1) 메모리 사용량/proc/[pid]/task/[tid]/statm, 2)I/O 정보; read/write 시스템 호출 수 및 데이터 양/proc/[pid]/task/[tid]/io, 네트워크 송수신량/proc/self/dev, 3) GPU 사용량 및 4) 기타 CPU 정보; 스레드들의 코어 이주 횟수/proc/[pid]/task/sched, 스레드의 코어 친화도(affinity) /proc/[pid]/task/[tid]/status 데이터들을 모니터링 한다. 이는 기타 정보로서 시스템상 모니터링 오버헤드를 고려하여 100ms 이상의 간격으로 조사한다.1) memory usage / proc / [pid] / task / [tid] / statm, 2) I / O information set in the third cycle; proc / [pid] / task / [tid] / io, network send / receive / proc / self / dev, 3) GPU usage, and 4) other CPU information; / Proc / [pid] / task / sched, the core affinity of the thread / proc / [pid] / task / [tid] / status data. This information is surveyed at intervals of 100 ms or more considering the monitoring overhead in the system as other information.

또한, 상기 기설정된 실행 항목별 사용량은, 해당 프로그램의 코어별 이용율, GPU 이용율, 메모리 점유율 및 네트워크 송수신량을 포함한다.In addition, the usage amount for each predetermined execution item includes the utilization rate of each core of the program, the GPU usage rate, the memory occupancy rate, and the network transmission / reception amount.

상기 코어별 이용율은, 기설정된 주기별 프로세스의 스레드별 사용한 누적된 코어별 사용량을 해당 주기에 대한 총 CPU 타임으로 나눔으로써 산출되는 것으로, /proc 파일 시스템은 프로세스마다 각각의 스레드가 CPU를 사용한 시간이 지피 단위로 저장되어 이를 이용하여 매 지피마다 각 스레드가 사용한 CPU 시간과 어떤 코어에서 CPU 시간을 소모했는 지에 대한 정보를 읽어 코어별 사용량을 저장하기 위한 자료구조에 누적한다. 타겟 시스템에서 1 지피는 10ms로 설정되어 측정간격마다 프로세스의 스레드들이 사용한 누적된 코어별 사용량을 해당 간격에 대한 총 CPU time으로 나눔으로써 프로세스의 코어별 이용률을 구한다.The utilization rate per core is calculated by dividing the cumulative usage amount of each core used for each thread of the process by the predetermined cycle by the total CPU time for the cycle. The / proc file system is a time Is stored in the unit of jig and is used to accumulate the data structure for storing the usage amount per core by reading the information on the CPU time consumed by each thread and the CPU time consumed by each core. In the target system, one thread is set to 10ms to obtain the per-core utilization of the process by dividing the cumulative core usage used by the threads of the process by the total CPU time for that interval at each measurement interval.

이때, 프로세스가 자식 프로세스를 만드는 경우에는 부모 프로세스의 PID, 즉 PPID를 조사하여 CPU 사용량에 포함시킨다. /proc/[pid]/stat 파일에서 PPID를 찾을 수 있다. 이를 위해서 분석 대상 프로세스의 PID보다 큰 숫자의 PID를 가지는 프로세스에 대해 PPID를 검색해야 하는 오버헤드가 발생한다.At this time, when the process creates a child process, the PID of the parent process, that is, the PPID, is examined and included in the CPU usage. You can find the PPID in the / proc / [pid] / stat file. For this, there is an overhead to retrieve the PPID for a process having a PID number greater than the PID of the process to be analyzed.

상기 GPU 이용율은, GPU의 전원 온/오프 상태를 gpu_power_state 변수에서 읽어 누적하고 기설정된 주기별로 백분율로 환산하여 산출된다.The GPU utilization rate is calculated by reading the power on / off state of the GPU from the gpu_power_state variable and converting the power on / off ratio by a predetermined period.

상기 메모리 점유율 측정은, proc 파일 시스템으로부터 메모리에 적재된 양에 대한 정보를 획득하여 메모리 측정을 위한 자료구조에 합산하여 바이트(byte) 단위로 누적한 후 다른 응용 프로그램과 공유하는 메모리에 대해서는 공유하는 프로세스의 수로 나누어 계산하고, 기설정된 간격별 메모리에 로드된 누적량의 평균을 전체 메모리 크기로 나눔으로써 산출된다.The memory occupancy rate measurement is performed by acquiring information on the amount stored in the memory from the proc file system, accumulating the data in a data structure for memory measurement, accumulating the data in byte units, Divided by the number of processes, and dividing the average of the accumulated amount loaded into the memory by the predetermined interval by the total memory size.

상기 네트워크 송수신량 측정은, /proc 파일 시스템에 누적되는 송수신량을 측정 간격단위로 읽어 온 후, 이전 값과의 차를 네트워크 사용량 측정을 위한 자료구조에 누적한다.
In the network transmission / reception amount measurement, the transmission / reception amount accumulated in the / proc file system is read in units of measurement intervals, and the difference from the previous value is accumulated in the data structure for network usage measurement.

한편, 114 과정에서의 체크 결과, 프로그램 경로 명 입력이 아닌 경우 118 과정으로 이동하여 프로세스 ID 입력을 확인하고, 120 과정에서 현재 실행 중인 적어도 하나의 프로세스를 인식하고, 인식된 프로세스에 대하여 124 과정으로 이동하여 이후의 동작을 수행한다.If it is determined in step 114 that the program path name is not input, the flow advances to step 118 to confirm the input of the process ID. In step 120, at least one currently executed process is recognized, Moves to perform subsequent operations.

여기서, 도 2를 참조하면, 도 2는 본 발명의 일 실시 예에 따른 멀티코어 임베디드 리눅스 시스템을 위한 응용 프로그램 분석 방법이 적용된 요구 거버너와 성능 거버너가 사용되었을 때의 각 CPU 코어의 이용률을 그래프화하여 도시한 것으로, Firefox는 약 30개 이상의 스레드를 생성하지만, 실험 결과 동시에 수행되는 최대 스레드 수는 3개였다. 따라서 Firefox는 4개 코어를 가진 CPU를 모두 활용하지는 못한다.2, FIG. 2 is a graph illustrating the utilization ratio of each CPU core when a demand governor and a performance governor to which an application program analysis method for a multicore embedded Linux system according to an embodiment of the present invention is applied, Firefox generates about 30 threads, but the maximum number of threads that can be executed simultaneously is three. Therefore, Firefox can not take advantage of all four-core CPUs.

이때, 도 3a에 도시된 테이블은 각각의 거버너가 사용되었을 때 에너지 소모와 성능을 보였다. SunSpider 벤치마크에서의 성능은 처리시간이므로, 시간이 작을수록 성능이 높은 것이다. 따라서 에너지 효율은 에너지 소모와 성능의 곱(Joule-second)에 비례한다. 요구 거버너에서는 약 5153.3 Jㆍs, 성능 거버너에서는 3347.4 Jㆍs의 Joule-second를 가지며, 따라서 성능 거버너가 소요되는 에너지에 비해 더 높은 성능을 보이고 있다.At this time, the table shown in FIG. 3A shows energy consumption and performance when each governor is used. Because performance on the SunSpider benchmark is processing time, the smaller the time, the higher the performance. Thus, energy efficiency is proportional to the product of energy consumption and performance (Joule-second). The required governor has about 5153.3 J ㆍ s and the performance governor has 3347.4 J ㆍ s Joule - second. Therefore, the performance governor shows higher performance than the energy consumed by the performance governor.

도 3b의 테이블은 응용 프로그램 분석도구로 분석된 Firefox의 수행 내용을 보인 것으로, 동시에 수행되는 스레드의 최대 수는 3개였지만, 실제로 최대 CPU 이용률은 주파수에 관계없이 100% 이하임을 볼 수 있으며, 따라서 현재 버전의 Firefox의 병렬성은 멀티코어 시스템을 활용하기에 충분하지 않다. 시스템의 코어 수는 4개이나, 시스템 전체의 최대 CPU 이용률도 평균 100% 이하, 최대 213% 이하임을 볼 수 있다. 최고 속도로 수행하는 성능 거버너에서도 전체 코어를 활용하지 못하고 있다. 따라서 이 응용은 멀티코어 CPU를 충분히 활용하지 못하고 있으며, 실제로는 하나의 코어에서 수행해도 동등한 성능을 보일 것으로 예상된다. 오히려 많은 코어를 사용함으로써 코어 이주의 오버헤드가 발생하고, 이로 인한 캐시의 성능 저하가 있었을 것이다. 또한 측정 결과, ARM용의 Firefox에서는 GPU를 사용하지 않고 있었다.The table in FIG. 3B shows the execution of Firefox analyzed by the application analysis tool. The maximum number of threads executed at the same time is 3, but the maximum CPU utilization is actually 100% or less regardless of the frequency. The parallelism of the current version of Firefox is not enough to take advantage of multicore systems. The number of cores in the system is four, but the maximum CPU utilization rate of the system as a whole is less than 100% on the average and 213% or less on the average. Performance governors performing at full speed are not able to take advantage of the entire core. Therefore, this application does not fully utilize the multi-core CPU, and it is expected that the performance will be equivalent even if it is actually performed in one core. Rather, the use of many cores would result in the overhead of core migration and the resulting performance degradation of the cache. Also, as a result of measurement, Firefox for ARM did not use GPU.

이를 기반으로 다음과 같은 설정을 하여 Firefox를 이용한 SunSpider 벤치마크 테스트를 실시하였다.Based on this, I performed the SunSpider benchmark test using Firefox with the following settings.

최대 시스템 CPU 이용률이 213% 이므로, On-line 코어의 수는 2개로 한다. 나머지 2개 코어는 hot-plugging 기능을 이용하여 오프라인에서 설정한다.Since the maximum system CPU utilization is 213%, the number of on-line cores is two. The remaining two cores are configured offline using hot-plugging.

응용의 최대 CPU 이용률이 100% 이하이므로, Firefox 응용은 CPU1 코어에 고정 할당하여 코어이주를 허용하지 않는다.Because the application's maximum CPU utilization is less than 100%, Firefox applications do not allow core migration by assigning to CPU1 core fixedly.

도 4a에 도시된 테이블은 위와 같은 설정으로 벤치마크를 수행했을 때의 SunSpider 벤치마크 수행 결과를 보여준다. 도 4a의 테이블에서와 같이 한 개의 코어에 고정하여 수행시킨 결과 더 적은 에너지 소모로 더 높은 성능을 얻을 수 있다. Joule-second로 계산해 보면, 요구 거버너를 사용한 경우는 약 4592.6 Jㆍs, 성능 거버너를 사용한 경우는 약 3142.9 Jㆍs로 각각 약 10.88%와 약 6.11%가 감소하여 소모 에너지 대비 더 높은 성능을 보임을 알 수 있다.The table shown in FIG. 4A shows the result of performing the benchmark of the SunSpider when the benchmark is performed with the above setting. As shown in the table of FIG. 4A, when fixed to one core, higher performance can be obtained with less energy consumption. In the case of using Joule-second, about 4592.6 J ㆍ s when the required governor is used and about 3142.9 J ㆍ s when using the performance governor, respectively, showing about 10.88% and about 6.11%, respectively, .

도 4b에 도시된 테이블은 분석 결과가 적용된 시험에서 수행된 Firefox의 벤치마크 테스트를 분석도구로 분석한 결과를 보여준다.The table shown in FIG. 4B shows a result of analyzing the benchmark test of Firefox performed in the test in which the analysis result is applied, using the analysis tool.

도 4b에 도시된 바와 같이, 프로그램의 수행 코어를 고정하여 스레드의 이주를 제거함으로써 전체 시스템의 CPU이용률은 오히려 낮아졌으며, 메모리 사용량도 감소하였다. 또한 이주를 하지 않음으로써 캐시미스가 감소함으로 인한 성능 향상을 예상할 수 있는데, 실제 측정 결과는 도 5에 도시된 테이블과 같다.As shown in FIG. 4B, by freeing the execution core of the program and removing the migration of threads, the CPU utilization of the entire system is lowered and the memory usage is also reduced. In addition, performance improvement due to a decrease in cache miss due to no migration is expected. The actual measurement result is the same as the table shown in FIG.

캐시미스는 프로그램만의 수치를 측정할 수 없어 전체 시스템의 수치를 측정하였다. 캐시미스율을 비교하지 않은 이유는, 두 실행에서의 수행 시간 자체가 달라 시스템의 전체 수행 명령어의 수가 다르기 때문이다. 캐시미스는 프로그램만의 수치를 측정할 수 없어 전체 시스템의 수치를 측정하였다. 캐시미스율을 비교하지 않은 이유는, 두 실행에서의 수행 시간 자체가 달라 시스템의 전체 수행 명령어의 수가 다르기 때문이다. 캐시미스 회수를 비교하면, 수행 코어를 고정했을 때 DCache load/store, ICache에서 각각 17.85%, 19.12%, 6.97%의 miss가 감소했음을 알 수 있다.
The cache miss was unable to measure the program-only values, so the values of the entire system were measured. The reason why the cache miss rate is not compared is because the execution time itself is different in the two executions, and the total number of execution commands of the system is different. The cache miss was unable to measure the program-only values, so the values of the entire system were measured. The reason why the cache miss rate is not compared is because the execution time itself is different in the two executions, and the total number of execution commands of the system is different. When comparing the cache misses, it can be seen that the misses of DCache load / store and ICache decreased by 17.85%, 19.12%, and 6.97%, respectively, when the execution core was fixed.

이상에서는, 도 1을 참조하여 본 발명의 일 실시 예에 따른 멀티코어 임베디드 리눅스 시스템을 위한 응용 프로그램 분석 방법에 대해 살펴보았다.In the foregoing, an application program analysis method for a multicore embedded Linux system according to an embodiment of the present invention has been described with reference to FIG.

이하, 본 발명의 일 실시 예에 따른 멀티코어 임베디드 리눅스 시스템을 위한 응용 프로그램 분석 장치에 대해 도 6을 참조하여 살펴보기로 한다.Hereinafter, an application program analyzing apparatus for a multi-core embedded Linux system according to an embodiment of the present invention will be described with reference to FIG.

도 6은 본 발명의 일 실시 예에 따른 멀티코어 임베디스 리눅스 시스템을 위한 응용 프로그램 분석에 관한 상세 블록도이다.6 is a detailed block diagram of an application program analysis for a multicore Embedded Linux system according to an embodiment of the present invention.

도 6을 참조하면, 본 발명이 적용된 장치(600)은 실행 인터페이스부(610), 시스템 메모리(612), 제어부(616), 정책 정보부(618), 리소스 사용량 산출부(620), 주기 설정부(622) 및 모니터링부(624)를 포함한다.6, the apparatus 600 to which the present invention is applied includes an execution interface unit 610, a system memory 612, a control unit 616, a policy information unit 618, a resource usage calculation unit 620, (622) and a monitoring unit (624).

상기 실행 인터페이스부(610)은 사용자로부터 모니터링하고자 하는 프로그램의 위치 기반 경로 탐색을 위한 기설정된 타입의 경로명 혹은 프로세스 ID를 입력받는다.The execution interface unit 610 receives a path name or a process ID of a predetermined type for searching for a location based path of a program to be monitored by a user.

상기 시스템 메모리(612)는 휘발성(RAM 등), 비휘발성(ROM, 플래쉬 메모리 등), 또는 2개의 조합일 수 있다. 시스템 메모리(612)는 일반적으로 구동 시스템(614), 하나 이상의 프로그램 모듈을 포함하고, 프로그램 데이터를 포함할 수 있다.The system memory 612 can be volatile (such as RAM), nonvolatile (such as ROM, flash memory, etc.), or a combination of the two. The system memory 612 generally includes a drive system 614, one or more program modules, and may include program data.

상기 제어부(616)는 상기 실행 인터페이스부(610)를 통해 경로명 및 프로세스 ID 중 어느 하나의 입력 여부에 따라 상기 경로명에 대응하는 프로그램의 API를 순차적으로 호출하여 해당 프로그램을 실행하거나 혹은 리눅스 시스템에서 현재 실행 중인 적어도 하나의 프로세스에 대한 자원 모니터링을 수행하여 응용 프로그램에 대한 자원 모니터링을 수행하도록 제어한다.The control unit 616 sequentially invokes the API of the program corresponding to the path name according to whether the path name or the process ID is inputted through the execution interface unit 610 and executes the corresponding program or executes the corresponding program in the Linux system And performs resource monitoring for at least one process in execution to perform resource monitoring for the application program.

상기 모니터링부(624)는 제어부(616)의 제어에 따라 리소스(resource) 정보 항목별 특성에 따라 기설정된 주기별 적절성(suitability) 여부를 판단하여 적어도 둘 이상의 리소스 정보 항목으로 그룹핑을 수행하고, 리눅스 시스템에서 지원하는 모니터링을 위한 규칙에 따라 각 그룹별 리소스 정보 항목에 대한 모니터링을 수행한다.Under the control of the control unit 616, the monitoring unit 624 determines whether or not suitability is determined for each predetermined period according to the characteristics of each resource information item, performs grouping into at least two or more resource information items, Monitoring of resource information items for each group is performed according to the rules for monitoring supported by the system.

상기 리소스 사용량 산출부(620)는 제어부(616)의 제어 하에 프로그램의 실행에 대응하는 정책(policy) 정보부의 정책 정보에 따라 상기 정책 정보의 기설정된 실행 항목별 사용량을 이용률 측정을 위한 자료구조에 누적하고, 상기 리소스 정보 항목별 특성에 따라 그룹핑된 그룹별 기설정된 주기를 상기 실행 항목별 이용률 측정에 적용하여 산출한다.Under the control of the control unit 616, the resource usage calculation unit 620 calculates a usage amount for each execution item of the policy information according to the policy information of the policy information unit corresponding to the execution of the program, And a predetermined period for each group grouped according to the characteristics of each resource information item is calculated and applied to the utilization rate of each execution item.

상기 주기 설정부(622)는 상기 제어부(622)의 제어 하에 정적(static) 리소스(resource) 데이터로 설정된 항목에 대하여 프로그램 실행 중 1회 모니터링이 실시되는 제1 주기, 지피(jiffy) 단위로 발생하는 스레드의 코어 이주를 기반으로 CPU 정보에 대한 1 지피별 모니터링이 실시되는 제2 지피 주기 및 상기 리소스 정보 항목별 모니터링의 오버헤드를 고려하여 해당 프로그램이 구동되는 단위인 태스크 스케줄링 데이터로 설정된 항목에 대하여 사용자로부터 정의된 주기로 모니터링이 실시되는 제3 주기를 각각 설정한다.The period setting unit 622 generates a period in a first cycle and a jiffy unit in which monitoring is performed once during program execution for items set as static resource data under the control of the controller 622 In consideration of an overhead of monitoring according to the resource information item and a second trigger cycle in which monitoring is performed for each piece of CPU information on the basis of the core migration of the thread to which the task is scheduled to be executed, And a third period in which monitoring is performed at a period defined by the user.

여기서, 상기 제1 주기는, 시스템의 CPU 거버너(governor), 현재 사용 가능한 코어 개수 및 총 메모리 용량을 나타내는 리소스 정보 항목에 설정되고, 상기 제2 지피 주기는, 프로세스의 처리기 사용량, 해당 지피에서의 CPU 주파수, 문맥전환 횟수를 나타내는 리소스 정보 항목에 설정되고, 상기 제3 주기는, 메모리 사용량, I/O 정보, GPU 사용량 및 기타 CPU 정보를 나타내는 리소스 항목에 설정된다.Here, the first period is set in a resource information item indicating a CPU governor of the system, a number of cores currently available, and a total memory capacity, and the second period is set to a value obtained by multiplying the processor usage of the process, The CPU frequency, and the number of times of context switching, and the third cycle is set in a resource item indicating memory usage, I / O information, GPU usage, and other CPU information.

이어서, 상기 리소스 사용량 산출부(620)는 해당 프로그램의 코어별 이용율, GPU 이용율, 메모리 점유율 및 네트워크 송수신량을 산출하되, 상기 코어별 이용율은, 기설정된 주기별 프로세스의 스레드별 사용한 누적된 코어별 사용량을 해당 주기에 대한 총 CPU 타임으로 나눔으로써 산출되고, 상기 GPU 이용율은, GPU의 전원 온/오프 상태를 gpu_power_state 변수에서 읽어 누적하고 기설정된 주기별로 백분율로 환산하여 산출되고, 상기 메모리 점유율 측정은, proc 파일 시스템으로부터 메모리에 적재된 양에 대한 정보를 획득하여 메모리 측정을 위한 자료구조에 합산하여 바이트(byte) 단위로 누적한 후 다른 응용 프로그램과 공유하는 메모리에 대해서는 공유하는 프로세스의 수로 나누어 계산하고, 기설정된 간격별 메모리에 로드된 누적량의 평균을 전체 메모리 크기로 나눔으로써 산출된다.
Then, the resource usage calculation unit 620 calculates a usage rate, a GPU usage rate, a memory occupancy rate, and a network transmission / reception amount for each core of the corresponding program, and the usage rate for each core is calculated by a cumulative core Wherein the GPU usage rate is calculated by reading the GPU power ON / OFF status from the gpu_power_state variable and converting the GPU power ON / OFF status into a percentage for each predetermined period, and the memory occupancy rate is calculated by dividing The proc file system acquires information about the amount of data stored in the memory, adds it to the data structure for memory measurement, accumulates it in byte units, and divides it by the number of processes shared by other application programs And the average of the accumulated amount loaded in the predetermined interval-specific memory is stored in the total memory Size. ≪ / RTI >

상기와 같이 본 발명에 따른 멀티코어 임베디드 리눅스 시스템을 위한 응용 프로그램 분석 방법 및 장치에 관한 동작이 이루어질 수 있으며, 한편 상기한 본 발명의 설명에서는 구체적인 실시 예에 관해 설명하였으나 여러 가지 변형이 본 발명의 범위를 벗어나지 않고 실시될 수 있다. 따라서 본 발명의 범위는 설명된 실시 예에 의하여 정할 것이 아니고 청구범위와 청구범위의 균등한 것에 의하여 정하여져야 할 것이다.As described above, the operation of the method and apparatus for analyzing an application program for a multi-core embedded Linux system according to the present invention can be performed. While the present invention has been described with respect to specific embodiments thereof, Can be carried out without departing from the scope. Accordingly, the scope of the present invention should not be limited by the illustrated embodiments, but should be determined by equivalents of the claims and the claims.

Figure 112013119064896-pat00001
Figure 112013119064896-pat00001

610: 실행 인터페이스부 612: 시스템 메모리
616: 제어부 618: 정책 정보부
620: 리소스 사용량 산출부 622: 주기 설정부
624: 모니터링부
610: execution interface unit 612: system memory
616: Control section 618: Policy information section
620: Resource usage calculation unit 622: Period setting unit
624:

Claims (12)

멀티코어 임베디드 리눅스 시스템을 위한 응용프로그램 분석 방법에 있어서,
실행 인터페이스를 통해 사용자로부터 모니터링하고자 하는 프로그램의 위치 기반 경로 탐색을 위한 기설정된 타입의 경로명 혹은 프로세스 ID를 입력받는 과정과,
상기 실행 인터페이스를 통해 경로명 및 프로세스 ID 중 어느 하나의 입력 여부에 따라 상기 경로명에 대응하는 프로그램의 API를 순차적으로 호출하여 해당 프로그램을 실행하거나 혹은 리눅스 시스템에서 현재 실행 중인 적어도 하나의 프로세스에 대한 자원 모니터링을 수행하여 응용 프로그램에 대한 자원 모니터링을 수행하는 과정을 포함하고,
상기 자원 모니터링을 수행하는 과정은,
리소스(resource) 정보 항목별 특성에 따라 기설정된 주기별 적절성(suitability) 여부를 판단하여 적어도 둘 이상의 리소스 정보 항목으로 그룹핑을 수행하고, 리눅스 시스템에서 지원하는 모니터링을 위한 규칙에 따라 각 그룹별 리소스 정보 항목에 대한 모니터링을 수행하고,
프로그램의 실행에 대응하는 정책(policy) 정보에 따라 상기 정책 정보의 기설정된 실행 항목별 사용량을 이용률 측정을 위한 자료구조에 누적하고, 상기 리소스 정보 항목별 특성에 따라 그룹핑된 그룹별 기설정된 주기를 상기 실행 항목별 이용률 측정에 적용하여 산출하고,
상기 리소스(resource) 정보 항목별 특성에 따라 기설정된 주기는,
정적(static) 리소스(resource) 데이터로 설정된 항목에 대하여 프로그램 실행 중 1회 모니터링이 실시되는 제1 주기,
지피(jiffy) 단위로 발생하는 스레드의 코어 이주를 기반으로 CPU 정보에 대한 1 지피별 모니터링이 실시되는 제2 지피 주기,
상기 리소스 정보 항목별 모니터링의 오버헤드를 고려하여 해당 프로그램이 구동되는 단위인 태스크 스케줄링 데이터로 설정된 항목에 대하여 사용자로부터 정의된 주기로 모니터링이 실시되는 제3 주기를 포함함을 특징으로 하는 멀티코어 임베디드 리눅스 시스템을 위한 응용 프로그램 분석 방법.
In an application analysis method for a multicore embedded Linux system,
Receiving a path name or a process ID of a predetermined type for searching for a location based path of a program to be monitored from a user through an execution interface;
A process for executing a corresponding program by sequentially calling an API of a program corresponding to the path name according to whether a path name or a process ID is input through the execution interface or a resource monitoring for at least one process currently running in the Linux system And performing resource monitoring for the application program,
The resource monitoring may include:
According to the characteristics of each resource information item, it is judged whether or not suitability is determined according to a predetermined cycle, and the grouping is performed by at least two or more resource information items. In accordance with rules for monitoring supported by the Linux system, Perform monitoring on the item,
And accumulating the usage amount of each policy item in the data structure for measuring the utilization rate according to the policy information corresponding to the execution of the program and setting a predetermined period for each group grouped according to the property of each resource information item To calculate the usage rate for each execution item,
The predetermined period according to the property of each resource information item,
A first cycle in which monitoring is performed once during program execution for an item set as static resource data,
A second wavelet period in which monitoring is performed per CPU for CPU information based on core migration of a thread occurring in units of jiffy,
And a third period in which monitoring is performed at a period defined by a user for an item set as task scheduling data, which is a unit in which the corresponding program is driven, in consideration of an overhead of monitoring by each resource information item. An application analysis method for a system.
삭제delete 삭제delete 삭제delete 제1항에 있어서,
상기 제1 주기는, 시스템의 CPU 거버너(governor), 현재 사용 가능한 코어 개수 및 총 메모리 용량을 나타내는 리소스 정보 항목에 설정되고,
상기 제2 지피 주기는, 프로세스의 처리기 사용량, 해당 지피에서의 CPU 주파수, 문맥전환 횟수를 나타내는 리소스 정보 항목에 설정되고,
상기 제3 주기는, 메모리 사용량, I/O 정보, GPU 사용량 및 기타 CPU 정보를 나타내는 리소스 항목에 설정되어 해당 주기별 리소스 정보 항목별 모니터링이 수행됨을 특징으로 하는 멀티코어 임베디드 리눅스 시스템을 위한 응용 프로그램 분석 방법.
The method according to claim 1,
The first period is set in a resource information item indicating a CPU governor of the system, a number of cores currently available and a total memory capacity,
Wherein the second grip period is set in a resource information item indicating a processor use amount of a process, a CPU frequency in a corresponding grip, and a context switching count,
Wherein the third period is set in a resource item indicating memory usage, I / O information, GPU usage, and other CPU information, and monitoring is performed for each resource information item for each cycle, and the application program for the multicore embedded Linux system Analysis method.
제1항에 있어서, 상기 기설정된 실행 항목별 사용량은,
해당 프로그램의 코어별 이용율, GPU 이용율, 메모리 점유율 및 네트워크 송수신량을 포함하고,
상기 코어별 이용율은,
기설정된 주기별 프로세스의 스레드별 사용한 누적된 코어별 사용량을 해당 주기에 대한 총 CPU 타임으로 나눔으로써 산출되고,
상기 GPU 이용율은,
GPU의 전원 온/오프 상태를 gpu_power_state 변수에서 읽어 누적하고 기설정된 주기별로 백분율로 환산하여 산출되고,
상기 메모리 점유율 측정은,
proc 파일 시스템으로부터 메모리에 적재된 양에 대한 정보를 획득하여 메모리 측정을 위한 자료구조에 합산하여 바이트(byte) 단위로 누적한 후 다른 응용 프로그램과 공유하는 메모리에 대해서는 공유하는 프로세스의 수로 나누어 계산하고, 기설정된 간격별 메모리에 로드된 누적량의 평균을 전체 메모리 크기로 나눔으로써 산출됨을 특징으로 하는 멀티코어 임베디드 리눅스 시스템을 위한 응용 프로그램 분석 방법.
2. The method according to claim 1,
GPU usage rate, memory occupancy rate, and network transmission / reception rate of the corresponding program,
The utilization ratio for each core is,
Is calculated by dividing the cumulative usage amount of each core used per thread of the predetermined cycle by the total CPU time for the cycle,
The GPU utilization rate
The power on / off state of the GPU is read from the gpu_power_state variable and accumulated and converted into a percentage by a predetermined period,
Wherein the memory occupancy rate measurement comprises:
The proc file system obtains information about the amount of memory in the memory, adds it to the data structure for memory measurement, accumulates it in bytes, and then divides the memory shared by other applications by the number of shared processes. And dividing an average of the accumulated amount loaded into the memory at a predetermined interval by the total memory size, and analyzing the application program for the multicore embedded Linux system.
멀티코어 임베디스 리눅스 시스템을 위한 응용 프로그램 분석 장치에 있어서,
사용자로부터 모니터링하고자 하는 프로그램의 위치 기반 경로 탐색을 위한 기설정된 타입의 경로명 혹은 프로세스 ID를 입력받는 실행 인터페이스부와,
상기 실행 인터페이스부를 통해 경로명 및 프로세스 ID 중 어느 하나의 입력 여부에 따라 상기 경로명에 대응하는 프로그램의 API를 순차적으로 호출하여 해당 프로그램을 실행하거나 혹은 리눅스 시스템에서 현재 실행 중인 적어도 하나의 프로세스에 대한 자원 모니터링을 수행하여 응용 프로그램에 대한 자원 모니터링을 수행하도록 제어하는 제어부를 포함하고,
상기 제어부의 제어에 따라 리소스(resource) 정보 항목별 특성에 따라 기설정된 주기별 적절성(suitability) 여부를 판단하여 적어도 둘 이상의 리소스 정보 항목으로 그룹핑을 수행하고, 리눅스 시스템에서 지원하는 모니터링을 위한 규칙에 따라 각 그룹별 리소스 정보 항목에 대한 모니터링을 수행하는 모니터링부를 더 포함하고,
상기 제어부의 제어에 따라 프로그램의 실행에 대응하는 정책(policy) 정보에 따라 상기 정책 정보의 기설정된 실행 항목별 사용량을 이용률 측정을 위한 자료구조에 누적하고, 상기 리소스 정보 항목별 특성에 따라 그룹핑된 그룹별 기설정된 주기를 상기 실행 항목별 이용률 측정에 적용하여 산출하는 리소스 사용량 산출부를 더 포함하며,
상기 제어부의 제어 하에 정적(static) 리소스(resource) 데이터로 설정된 항목에 대하여 프로그램 실행 중 1회 모니터링이 실시되는 제1 주기,
지피(jiffy) 단위로 발생하는 스레드의 코어 이주를 기반으로 CPU 정보에 대한 1 지피별 모니터링이 실시되는 제2 지피 주기,
상기 리소스 정보 항목별 모니터링의 오버헤드를 고려하여 해당 프로그램이 구동되는 단위인 태스크 스케줄링 데이터로 설정된 항목에 대하여 사용자로부터 정의된 주기로 모니터링이 실시되는 제3 주기를 설정하는 주기 설정부를 더 포함함을 특징으로 하는 멀티코어 임베디드 리눅스 시스템을 위한 응용 프로그램 분석 장치.
1. An application analyzer for multi-core embedded Linux systems,
An execution interface unit that receives a path name or a process ID of a predetermined type for searching for a location-based path of a program to be monitored by a user,
The execution interface unit sequentially calls the API of the program corresponding to the path name according to whether the path name or the process ID is input, and executes the corresponding program, or performs resource monitoring for at least one process currently executing in the Linux system To perform resource monitoring for an application program,
According to the control of the control unit, it is determined whether or not suitability is determined according to the property of each resource information item by the predetermined period, and the grouping is performed by at least two or more resource information items. And a monitoring unit for monitoring the resource information item for each group,
Wherein the control unit accumulates the usage amount of each policy item in the data structure for measuring the utilization rate according to the policy information corresponding to the execution of the program according to the control of the control unit, Further comprising a resource usage calculation unit for calculating a predetermined period of time for each group by applying to the utilization rate of each execution item,
A first period in which monitoring is performed once during program execution for items set as static resource data under the control of the control unit,
A second wavelet period in which monitoring is performed per CPU for CPU information based on core migration of a thread occurring in units of jiffy,
And a period setting unit configured to set a third period in which monitoring is performed at a period defined by the user with respect to items set as task scheduling data that is a unit in which the program is driven in consideration of the overhead of monitoring by each resource information item Application analyzer for multicore embedded Linux systems.
삭제delete 삭제delete 삭제delete 제7항에 있어서,
상기 제1 주기는, 시스템의 CPU 거버너(governor), 현재 사용 가능한 코어 개수 및 총 메모리 용량을 나타내는 리소스 정보 항목에 설정되고,
상기 제2 지피 주기는, 프로세스의 처리기 사용량, 해당 지피에서의 CPU 주파수, 문맥전환 횟수를 나타내는 리소스 정보 항목에 설정되고,
상기 제3 주기는, 메모리 사용량, I/O 정보, GPU 사용량 및 기타 CPU 정보를 나타내는 리소스 항목에 설정되어 해당 주기별 리소스 정보 항목별 모니터링을 수행함을 특징으로 하는 멀티코어 임베디드 리눅스 시스템을 위한 응용 프로그램 분석 장치.
8. The method of claim 7,
The first period is set in a resource information item indicating a CPU governor of the system, a number of cores currently available and a total memory capacity,
Wherein the second grip period is set in a resource information item indicating a processor use amount of a process, a CPU frequency in a corresponding grip, and a context switching count,
Wherein the third cycle is set in a resource item indicating memory usage, I / O information, GPU usage, and other CPU information, and monitoring is performed for each resource information item for each cycle. The multi-core embedded Linux system according to claim 1, Analysis device.
제7항에 있어서, 상기 리소스 사용량 산출부는,
해당 프로그램의 코어별 이용율, GPU 이용율, 메모리 점유율 및 네트워크 송수신량을 산출하되,
상기 코어별 이용율은,
기설정된 주기별 프로세스의 스레드별 사용한 누적된 코어별 사용량을 해당 주기에 대한 총 CPU 타임으로 나눔으로써 산출되고,
상기 GPU 이용율은,
GPU의 전원 온/오프 상태를 gpu_power_state 변수에서 읽어 누적하고 기설정된 주기별로 백분율로 환산하여 산출되고,
상기 메모리 점유율 측정은,
proc 파일 시스템으로부터 메모리에 적재된 양에 대한 정보를 획득하여 메모리 측정을 위한 자료구조에 합산하여 바이트(byte) 단위로 누적한 후 다른 응용 프로그램과 공유하는 메모리에 대해서는 공유하는 프로세스의 수로 나누어 계산하고, 기설정된 간격별 메모리에 로드된 누적량의 평균을 전체 메모리 크기로 나눔으로써 산출됨을 특징으로 하는 멀티코어 임베디드 리눅스 시스템을 위한 응용 프로그램 분석 장치.
8. The resource allocation method according to claim 7,
GPU usage rate, memory occupancy rate, and network transmission / reception ratio of the corresponding program,
The utilization ratio for each core is,
Is calculated by dividing the cumulative usage amount of each core used per thread of the predetermined cycle by the total CPU time for the cycle,
The GPU utilization rate
The power on / off state of the GPU is read from the gpu_power_state variable and accumulated and converted into a percentage by a predetermined period,
Wherein the memory occupancy rate measurement comprises:
The proc file system obtains information about the amount of memory in the memory, adds it to the data structure for memory measurement, accumulates it in bytes, and then divides the memory shared by other applications by the number of shared processes. And dividing an average of the accumulated amount loaded into the predetermined interval memory by the total memory size.
KR1020130164175A 2013-12-26 2013-12-26 Method and apparatus for analyzing application in multicore embedded linux system KR101541617B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020130164175A KR101541617B1 (en) 2013-12-26 2013-12-26 Method and apparatus for analyzing application in multicore embedded linux system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020130164175A KR101541617B1 (en) 2013-12-26 2013-12-26 Method and apparatus for analyzing application in multicore embedded linux system

Publications (2)

Publication Number Publication Date
KR20150075830A KR20150075830A (en) 2015-07-06
KR101541617B1 true KR101541617B1 (en) 2015-08-03

Family

ID=53788883

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020130164175A KR101541617B1 (en) 2013-12-26 2013-12-26 Method and apparatus for analyzing application in multicore embedded linux system

Country Status (1)

Country Link
KR (1) KR101541617B1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102300347B1 (en) 2017-08-07 2021-09-10 한국전자통신연구원 Apparatus of continuous profiling for multicore embedded system and the method of the same

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
‘vtune을 사용해 보자’, 인터넷 티스토리 블로그 등록글(2013.06.25.)*
‘멀티코어 임베디드 시스템의 응용 수행 패턴 분석을 위한 자원 사용량 모니터링 도구’, 한국정보과학회 2012년 가을 학술발표논문집 Vol.39, No.2(A) (2012.11)*

Also Published As

Publication number Publication date
KR20150075830A (en) 2015-07-06

Similar Documents

Publication Publication Date Title
Chunduri et al. Characterization of MPI usage on a production supercomputer
US8875150B2 (en) Monitoring real-time computing resources for predicted resource deficiency
US8566795B2 (en) Selectively obtaining call stack information based on criteria
US8286139B2 (en) Call stack sampling for threads having latencies exceeding a threshold
US8799904B2 (en) Scalable system call stack sampling
Zhang et al. Panappticon: Event-based tracing to measure mobile application and platform performance
KR101438990B1 (en) System testing method
US9098350B2 (en) Adaptive auto-pipelining for stream processing applications
CN109408399B (en) Calculation power estimation method, device, equipment and storage medium
CN106293881B (en) Performance monitor based on non-uniform I/O access framework and monitoring method thereof
US9383980B2 (en) Determining a method to inline using an actual footprint calculation
CN109857633B (en) Task computing power estimation method and device and storage medium
KR101177059B1 (en) Method for dynamically assigned of parallel control module
KR101541617B1 (en) Method and apparatus for analyzing application in multicore embedded linux system
US9195524B1 (en) Hardware support for performance analysis
US8312433B2 (en) Operating system aided code coverage
Qi et al. Data mining based root-cause analysis of performance bottleneck for big data workload
Zheng et al. Vapro: Performance variance detection and diagnosis for production-run parallel applications
Hauck et al. Towards Performance Prediction for Cloud Computing Environments based on Goal-oriented Measurements.
KR102418892B1 (en) Method of saving energy based on confidence interval and apparatus using the same
US7971190B2 (en) Machine learning performance analysis tool
CN109656796B (en) Task selection method and device
Schmitt et al. Emulating the Power Consumption Behavior of Server Workloads using CPU Performance Counters
CN105426291B (en) A kind of performance monitoring method based on Power PC Processor
Casola et al. An automatic tool for benchmark testing of cloud applications

Legal Events

Date Code Title Description
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
FPAY Annual fee payment

Payment date: 20180625

Year of fee payment: 4

FPAY Annual fee payment

Payment date: 20190702

Year of fee payment: 5