KR20220067324A - Method for changing software code for power improvement and device thereof - Google Patents
Method for changing software code for power improvement and device thereof Download PDFInfo
- Publication number
- KR20220067324A KR20220067324A KR1020200153896A KR20200153896A KR20220067324A KR 20220067324 A KR20220067324 A KR 20220067324A KR 1020200153896 A KR1020200153896 A KR 1020200153896A KR 20200153896 A KR20200153896 A KR 20200153896A KR 20220067324 A KR20220067324 A KR 20220067324A
- Authority
- KR
- South Korea
- Prior art keywords
- power
- performance
- improvement
- performance improvement
- factor
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/40—Transformation of program code
- G06F8/41—Compilation
- G06F8/44—Encoding
- G06F8/443—Optimisation
- G06F8/4432—Reducing the energy consumption
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/40—Transformation of program code
- G06F8/41—Compilation
- G06F8/44—Encoding
- G06F8/447—Target code generation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/40—Transformation of program code
- G06F8/51—Source to source
-
- H—ELECTRICITY
- H02—GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
- H02J—CIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
- H02J2203/00—Indexing scheme relating to details of circuit arrangements for AC mains or AC distribution networks
- H02J2203/20—Simulating, e g planning, reliability check, modelling or computer assisted design [CAD]
Abstract
Description
본 발명은 전력 개선을 위한 소프트웨어 코드 변경 방법 및 그 장치에 관한 것이다.The present invention relates to a method and apparatus for changing a software code for power improvement.
제 4 차 산업 혁명에서 환경 모니터링, 교통 정보 분석, 유틸리티 모니터링, 대중 교통 및 사건보고. 스마트 시티 개발이 필요하게 되었다. 특히 스마트 시티를개발하느데, 스마트 테크놀러지나 스마트 인프라 스트럭쳐가 필요하다. Environmental monitoring, traffic information analysis, utility monitoring, public transport and incident reporting in the fourth industrial revolution. Smart city development became necessary. In particular, smart technology or smart infrastructure is needed to develop a smart city.
사이버 물리 시스템 (CPS:Cyber-Physical system) 기술은 스마트 시티 기술을 모니터링하고 통합하는 데 사용된다. 또한, CPS는 물리적 세계의 일반적인 대상을 복잡한 시스템의 다양한 컴퓨터와 연결하는데 이용되며, 현존하는 확장된 인베디드 시스템을 포함할 수 있다. Cyber-Physical system (CPS) technology is used to monitor and integrate smart city technologies. In addition, CPS is used to connect common objects in the physical world with various computers in complex systems, and may include existing extended embedded systems.
오늘날 임베디드 시스템은 단순한 구조에서 수많은 컴퓨터 장치들로 구성되는 복잡한 구조로 발전 되어왔다. 이러한 시스템에는 정확한 성능과 다양한 기능이 필요하며, 특히 거대하고 복잡한 소스 코드가 필요하지만 CPS 기반 소프트웨어 성능 또는 품질은 보장하는 것이 어려웠다.Today's embedded systems have developed from a simple structure to a complex structure composed of numerous computer devices. These systems require precise performance and versatility, especially large and complex source code, but it has been difficult to guarantee CPS-based software performance or quality.
특히 복잡해진 시스템에 있어서 저전력 설계 요구는 많이 제안되어 왔다. 하지만 이러한 저전력 성능을 위한 하드웨어적 해결책은 많은 비용이 소모될 뿐 아니라 시간적으로도 많은 시간이 필요하다는 문제점이 있어왔다.In particular, a low-power design requirement in a complex system has been widely proposed. However, a hardware solution for such low power performance has a problem that not only consumes a lot of money but also requires a lot of time.
본 발명은, 상술한 문제를 해결하기 위하여 안출된 것으로서, 소프트웨어의 소스코드를 개선하여 저전력 성능 개선을 도모하기 위한 전력 개선을 위한 소프트웨어 코드 변경 방법 및 그 장치를 제공하는 것을 목적으로 한다. The present invention has been devised to solve the above-described problem, and an object of the present invention is to provide a method and apparatus for changing a software code for power improvement in order to improve low-power performance by improving a software source code.
상술한 과제를 해결하기 위하여 안출된 본 발명의 일실시예인 전력 개선을 위한 소프트웨어 코드 변경 방법은, 소프트웨어의 소스 코드를 입력받는 소스 코드 입력 단계; 상기 소스 코드를 분석하여 상기 소스코드를 분석하여 전력 성능 개선 요소를 확인하는 전력 확인 단계; 상기 전력 성능 개선 요소에 대한 제 1 수정을 진행하여 제 1 성능 개선을 진행하는 1차 개선 단계; 상기 1차 개선 단계 후, 상기 소스 코드를 분석하여 실행 성능 개선 요소를 확인하는 성능 확인 단계; 및 상기 실행 성능 개선 요소에 대한 제 2 수정을 진행하여 제 2 성능 개선을 진행하는 2차 개선 단계; 를 포함할 수 있다. A method for changing a software code for power improvement according to an embodiment of the present invention, which has been devised to solve the above problems, includes a source code input step of receiving a source code of software; a power checking step of analyzing the source code and analyzing the source code to check a power performance improvement factor; a first improvement step of performing a first performance improvement by performing a first modification on the power performance improvement factor; After the first improvement step, a performance check step of analyzing the source code to check an execution performance improvement factor; and a second improvement step of performing a second performance improvement by performing a second modification on the execution performance improvement factor. may include
여기서, 상기 전력 확인 단계는, 전력 가시화 모듈을 통해 상기 전력 성능 개선 요소를 가시화하여 시각적으로 표시하는 단계를 포함할 수 있다.Here, the power checking step may include visualizing and visually displaying the power performance improvement factor through a power visualization module.
여기서, 상기 전력 확인 단계는, 상기 소프트웨어를 실행하여 1차 전력 측정을 제 1 전력 정보를 생성하는 하는 단계; 전력 측정 프로젝트를 생성하여 전력 측정 환경을 준비하는 전력 측정 준비 단계: 상기 소스코드를 입력한 상태에서 상기 전력 측정 프로젝트를 실행하는 프로젝트 실행 단계; 상기 프로젝트 실행 단계후 2차 전력 측정을 하여 제 2 전력 정보를 생성하는 단계; 및 상기 제 1 전력 정보와 제 2 전력 정보를 비교하여 상기 전력 성능 개선 요소를 생성하는 단계를 포함할 수 있다. Here, the power checking step may include: executing the software to generate first power information by performing a primary power measurement; A power measurement preparation step of preparing a power measurement environment by creating a power measurement project: a project execution step of executing the power measurement project in a state in which the source code is input; generating second power information by measuring secondary power after the project execution step; and generating the power performance improvement factor by comparing the first power information and the second power information.
여기서, 상기 1차 개선 단계는, 상기 전력 성능 개선 요소에 대한 변경 준비가 이루어지는 전력 변경 준비 단계; 및 상기 변경 준비 이후에 상기 전력 성능 개선 요소에 대한 수정 작업이 진행되는 전력 소스 수정 단계를 포함할 수 있다.Here, the first improvement step may include: a power change preparation step in which a change preparation for the power performance improvement element is made; and a power source modification step in which a modification operation is performed on the power performance improvement factor after the modification preparation.
여기서, 상기 전력 변경 준비 단계는, 전력 개선 요소 데이터 베이스를 준비하는 단계; 상기 전력 개선 요소 데이터 베이스 중 상기 전력 성능 개선 요소에 대응되는 전력 개선 요소 소스를 확인하는 단계; 및 상기 확인된 전력 개선 요소 소스를 상기 전력 성능 개선 요소와 함께 표시하는 단계를 포함할 수 있다.Here, the power change preparation step may include: preparing a power improvement factor database; identifying a power improvement factor source corresponding to the power performance improvement factor in the power improvement factor database; and displaying the identified power improvement factor source together with the power performance improvement factor.
여기서, 상기 전력 소스 수정 단계는, 상기 전력 개선 요소 데이터 베이스에서 추천된 전력 개선 요소 소스로 상기 수정 작업을 진행하는 단계를 포함할 수 있다.Here, the step of modifying the power source may include performing the modification operation with the source of the power improvement factor recommended in the power improvement factor database.
여기서, 상기 성능 확인 단계는, 성능 가시화 모듈을 통해 상기 실행 성능 개선 요소를 가시화하여 시각적으로 표시하는 단계를 포함할 수 있다.Here, the performance confirmation step may include visualizing and visually displaying the execution performance improvement factor through a performance visualization module.
여기서, 상기 성능 확인 단계는, 소스 네비게이터 모듈을 통해 소스 코드 분석을 진행하는 분석 단계; 상기 분석 단계 후 상기 분석 결과에 따라 성능 데이터 프레임을 생성하는 단계; 상기 소스 네비게이터 모듈에서의 결과물을 상기 성능 데이터 프레임에 삽입하여 성능 데이터 베이스를 완성하는 단계; 및 성능 가시화 모듈을 통해 상기 성능 데이터 베이스에 기초하여 상기 실행 성능 개선 요소를 선정하고 이를 가시화하는 단계를 포함할 수 있다.Here, the performance check step may include: an analysis step of analyzing the source code through a source navigator module; generating a performance data frame according to the analysis result after the analysis step; inserting a result of the source navigator module into the performance data frame to complete a performance database; and selecting the execution performance improvement factor based on the performance database through a performance visualization module and visualizing it.
여기서, 상기 2차 개선 단계는, 상기 실행 성능 개선 요소에 대한 변경 준비가 이루어지는 성능 변경 준비 단계; 및 상기 변경 준비 이후에 상기 실행 성능 개선 요소에 대한 수정 작업이 진행되는 성능 개선 소스 수정 단계를 포함할 수 있다.Here, the second improvement step may include: a performance change preparation step in which preparation for change to the execution performance improvement element is made; and a performance improvement source modification step in which a modification operation on the execution performance improvement element is performed after the change preparation.
여기서, 상기 성능 변경 준비 단계는, 성능 개선 요소 데이터 베이스를 준비하는 단계; 상기 성능 개선 요소 데이터 베이스 중 상기 실행 성능 개선 요소에 대응되는 성능 개선 요소 소스를 확인하는 단계; 및 상기 확인된 성능 개선 요소 소스를 상기 실행 성능 개선 요소와 함께 표시하는 단계를 포함할 수 있다.Here, the performance change preparation step includes: preparing a performance improvement factor database; identifying a performance improvement factor source corresponding to the execution performance improvement factor in the performance improvement factor database; and displaying the identified performance improvement factor source together with the execution performance improvement factor.
여기서, 상기 성능 개선 소스 수정 단계는, 상기 성능 개선 요소 데이터 베이스에서 추천된 개선 요소 소스로 상기 수정작업을 진행하는 단계를 포함할 수 있다. Here, the step of modifying the performance improvement source may include performing the modification operation with the improvement factor source recommended in the performance improvement factor database.
본 발명의 다른 실시예인 전력 개선을 위한 소프트웨어 소스 코드 변경 장치는, 소프트웨어의 소스 코드를 입력받기 위한 입력부; 및 상기 소스 코드를 분석하여 전력 성능 개선 요소를 확인하고, 상기 전력 성능 개선 요소에 대한 제 1 수정을 진행하여 제 1 성능 개선을 진행하고, 제 1 성능 개선 후 상기 소스코드를 분석하여 실행 성능 개선 요소를 확인한 후, 상기 실행 성능 개선 요소에 대한 제 2 수정을 진행하여 제 2 성능 개선을 진행하는 제어부를 포함할 수 있다.Another embodiment of the present invention provides an apparatus for changing a software source code for power improvement, comprising: an input unit for receiving a source code of software; and analyzing the source code to identify a power performance improvement factor, performing a first modification on the power performance improvement factor to perform a first performance improvement, and analyzing the source code after the first performance improvement to improve execution performance The control unit may include a control unit that performs a second performance improvement by performing a second correction on the execution performance improvement factor after checking the factor.
여기서, 상기 전력 개선을 위한 소스 코드 변경 장치는, 디스플레이부를 더 포함하고, 상기 제어부는, 상기 전력 성능 개선 요소를 가시화하여 시각적으로 상기 디스플레이부에 표시하는 전력 가시화 모듈을 포함할 수 있다.Here, the apparatus for changing the source code for power improvement may further include a display unit, and the control unit may include a power visualization module that visualizes the power performance improvement element and visually displays it on the display unit.
상술한 구성을 가진 본 발명의 일실시예에 따르면, 인베디드 시스템에 사용되는 소프트웨어의 소스 코드 중 성능 개선이 필요한 소스 코드에 대하여 적절한변경을 가능하게 함으로써, 저전력 설계가 용이하게 된다.According to an embodiment of the present invention having the above-described configuration, by enabling appropriate changes to the source code requiring performance improvement among the source codes of software used in the embedded system, low-power design is facilitated.
도 1은 본 발명의 일실시예인 전력 개선을 위한 소프트웨어 코드 변경 방법을 설명하기 위한 플로우차트
도 2는 본 발명의 다른 실시예인 전력 개선을 위한 소프트웨어 소스 코드 변경 장치를 설명하기 위한 블록 구성도.
도 3 내지 도 6은 본 발명의 일실시예인 전력 개선을 위한 소프트웨어 코드 변경 방법 중 전력 개선 단계에 대한 설명을 위한 이미지도면.
도 7 내지 도 11은 본 발명의 일실시예인 전력 개선을 위한 소프트웨어 코드 변경 방법 중 성능 개선 단계에 대한 설명을 위한 이미지 도면.
1 is a flowchart illustrating a method of changing a software code for power improvement according to an embodiment of the present invention;
2 is a block diagram illustrating an apparatus for changing a software source code for power improvement, which is another embodiment of the present invention.
3 to 6 are image diagrams for explaining a power improvement step in a method of changing a software code for power improvement according to an embodiment of the present invention.
7 to 11 are image diagrams for explaining a performance improvement step in a method of changing a software code for power improvement according to an embodiment of the present invention.
이하, 본 발명의 바람직한 실시 예들을 첨부된 도면을 참고하여 더욱 상세히 설명한다. 본 발명의 실시 예들은 여러 가지 형태로 변형될 수 있으며, 본 발명의 범위가 아래에서 설명하는 실시 예들에 한정되는 것으로 해석되어서는 안 된다. 본 실시예들은 당해 발명이 속하는 기술 분야에서 통상의 지식을 가진 자에게 본 발명을 더욱 상세하게 설명하기 위해서 제공되는 것이다.Hereinafter, preferred embodiments of the present invention will be described in more detail with reference to the accompanying drawings. Embodiments of the present invention may be modified in various forms, and the scope of the present invention should not be construed as being limited to the embodiments described below. These examples are provided to explain the present invention in more detail to those of ordinary skill in the art to which the present invention pertains.
도 1은 본 발명의 일실시예인 전력 개선을 위한 소프트웨어 소스 코드 변경 방법을 설명하기 위한 플로우차트이고, 도 2는 본 발명의 다른 실시예인 전력 개선을 위한 소프트웨어 소스 코드 변경 장치를 설명하기 위한 블록 구성도이며, 도 3 내지 도 7은 본 발명의 일실시예인 전력 개선을 위한 소프트웨어 코드 변경 방법 중 전력 개선 단계에 대한 설명을 위한 이미지도면이고, 도 8 내지 도 11은 본 발명의 일실시예인 전력 개선을 위한 소프트웨어 코드 변경 방법 중 성능 개선 단계에 대한 설명을 위한 이미지 도면이다.1 is a flowchart for explaining a method for changing a software source code for power improvement, which is an embodiment of the present invention, and FIG. 2 is a block configuration for explaining an apparatus for changing a software source code for power improvement, which is another embodiment of the present invention. 3 to 7 are image diagrams for explaining the power improvement step among the software code change method for power improvement, which is an embodiment of the present invention, and FIGS. 8 to 11 are power improvement according to an embodiment of the present invention. It is an image diagram for explaining the performance improvement step of the software code change method for
우선, 도 1을 참조하여 다음과 같은 과정을 통해 본 발명에 따른 일실시예인 전력 개선을 위한 소프트웨어 소스 코드 변경 방법을 간단하게 설명하고, 그 다음 도 2를 참조하여 본 발명의 다른 실시예인 전력 개선을 위한 소프트웨어 소스 코드 변경 장치를 간단하게 설명한 후, 그 구체적인 동작을 도 3 내지 도 11을 참조하여 설명하도록 한다. First, a method of changing a software source code for power improvement according to an embodiment according to the present invention will be briefly described with reference to FIG. 1 through the following process, and then with reference to FIG. 2 , power improvement which is another embodiment of the present invention After a brief description of the apparatus for changing the software source code for
도 1에 도시된 바와 같이, 우선, 소스 입력부를 통해 소프트웨어의 소스코드를 입력 받는다(S1). 그 다음 상기 소스 코드를 분석하여 전력 성능 개선 요소를 확인한다(S2). 그리고 나서 전력 성능 개선 요소에 대하여 제 1 수정을 진행하여 제 1 성능 개선을 진행한다. 이 때 제 1 성능 개선은 전력 소모를 줄이기 위한 개선이 해당될 수 있다. 제 1 성능 개선 후 상기 소스코드를 다시 분석하여 실행 성능 개선 요소를 확인한다(S4). 그 다음 실행 성능 개선 요소에 대한 제 2 수정을 진행하여 제 2 성능 개선을 진행한다(S5).As shown in Fig. 1, first, the source code of the software is input through the source input unit (S1). Then, the source code is analyzed to check the power performance improvement factor (S2). Then, the first correction is performed on the power performance improvement factor to perform the first performance improvement. In this case, the first performance improvement may correspond to an improvement for reducing power consumption. After the first performance improvement, the source code is analyzed again to check the execution performance improvement factor (S4). Then, the second performance improvement is performed by performing a second correction on the execution performance improvement factor (S5).
이와 같은 동작이 이루어지는 소프트웨어 소스 코드 변경 장치의 구조는 도 2를 통해 알 수 있다. 도 2를 참조하면, 본 발명에 따른 전력 개선을 위한 소프트웨어 소스 코드 변경 장치는 크게 소스 입력부(10), 디스플레이부(20), 메모리(30), 수정 입력부(40) 및 제어부(100)를 포함하여 구성될 수 있다.The structure of the apparatus for changing the software source code in which such an operation is performed can be seen from FIG. 2 . Referring to FIG. 2 , the apparatus for changing a software source code for power improvement according to the present invention largely includes a
소스 입력부(10)는 S1단계에서의 소프트웨어의 소스코드를 입력받기 위한 구성요소로서 유무선 통신 모듈, 또는 USB 단자와 같은 데이터 입력 단자가 이에 해당할 수 있다.The
디스플레이부(20)는, 후술하는 성능가시화 모듈 및 전력 가시화 모듈에 의하여 가시화된 성능 개선 요소를 시각적으로 표시하기 위한 구성요소이다.The
메모리(30)는 성능개선 요소 DB(31) 및 전력 개선 요소 DB(33) 등의 데이터 베이스를 저장하고, 본 발명에 따른 전력 개선을 위한 소프트웨어 소스 코드 변경 방법에 따른프로그램을 저장하기 위한 구성요소이다. The
수정 입력부(40)는, 사용자에 의한 수정작업을 위한 구성요소로서 키보드나 마우스와 같은 사용자 입력 유닛이 이용될 수 있다.The
제어부(100)는, 상기 소스 코드를 분석하여 전력 성능 개선 요소를 확인하고, 상기 전력 성능 개선 요소에 대한 제 1 수정을 진행하여 제 1 성능 개선을 진행하고, 제 1 성능 개선 후 상기 소스코드를 분석하여 실행 성능 개선 요소를 확인하는 전력 확인한 후, 상기 실행 성능 개선 요소에 대한 제 2 수정을 진행하여 제 2 성능 개선을 진행하는 구성요소이다. 제어부는 소스 네비게이터 모듈(111), 성능 데이터 프레임 생성 모듈(112), 성능 데이터 생성 모듈(113), 성능 가시화 모듈(114), 전력 측정 모듈(121), 전력 소스 네비게이터 모듈(122), 그리고 전력 가시화 모듈(123)을 포함하여 구성될 수 있다. The
이하에서는 상술한 구성을 가진 전력 개선을 위한 소프트웨어 소스 코드 변경 장치에서의 동작에 대하여 도 1 및 도 3 내지 도 11을 참조하여 설명하도록 한다. Hereinafter, an operation in the apparatus for changing the software source code for power improvement having the above configuration will be described with reference to FIGS. 1 and 3 to 11 .
우선 전력 성능 개선 작업(1차 개선 작업)이 진행된다. 상기 소스 코드를 분석하여 전력 성능 개선 요소를 확인한다. 이 때 전력 측정 환경을 준비한 다음 상기 소프트웨어를 실행하여 1차 전력 측정을 제 1 전력 정보를 생성하는 하는 단계; 전력 측정 프로젝트를 생성하여 전력 측정 환경을 준비하는 전력 측정 준비 단계: 상기 소스코드를 입력한 상태에서 상기 전력 측정 프로젝트를 실행하는 프로젝트 실행 단계; 상기 프로젝트 실행 단계후 2차 전력 측정을 하여 제 2 전력 정보를 생성하는 단계; 상기 제 1 전력 정보와 제 2 전력 정보를 비교하여 상기 전력 성능 개선 요소를 생성하는 단계를 포함하여 이루어질 수 있다. 이것은 도 3에서와 같이 Keil uVision IDE에서 상기 프로젝트가 생성될 수 있다.First, the power performance improvement work (the first improvement work) is carried out. Analyze the source code to identify power performance improvement factors. At this time, preparing a power measurement environment and then executing the software to generate first power information for primary power measurement; A power measurement preparation step of preparing a power measurement environment by creating a power measurement project: a project execution step of executing the power measurement project in a state in which the source code is input; generating second power information by measuring secondary power after the project execution step; and generating the power performance improvement factor by comparing the first power information and the second power information. As shown in FIG. 3, the project can be created in Keil uVision IDE.
이와 같이 전력 성능 개선 요소를 확인하게 되면, 제 1 성능 개선 작업이 이루어지게 되는데, 상기 전력 성능 개선 요소에 대한 변경 준비가 이루어지는 전력 변경 준비 단계; 및 상기 변경 준비 이후에 상기 전력 성능 개선 요소에 대한 수정 작업이 진행되는 전력 소스 수정 단계를 포함하게 된다. When the power performance improvement factor is identified as described above, a first performance improvement operation is performed. A power change preparation step in which preparation for changing the power performance improvement factor is performed; and a power source modification step in which a modification operation for the power performance improvement factor is performed after the modification preparation.
여기서 상기 전력 변경 준비 단계는, 전력 개선 요소 데이터 베이스를 준비하는 단계; 상기 전력 개선 요소 데이터 베이스 중 상기 전력 성능 개선 요소에 대응되는 전력 개선 요소 소스를 확인하는 단계; 상기 확인된 전력 개선 요소 소스를 상기 전력 성능 개선 요소와 함께 표시하는 단계; 상기 전력 소스 수정 단계는, 상기 전력 개선 요소 데이터 베이스에서 추천된 전력 개선 요소 소스로 상기 수정 작업을 진행하는 단계를 포함하게 된다. Here, the power change preparation step includes: preparing a power improvement factor database; identifying a power improvement factor source corresponding to the power performance improvement factor in the power improvement factor database; displaying the identified power improvement factor source together with the power performance improvement factor; The step of modifying the power source may include performing the modification operation with the source of the power improvement factor recommended in the power improvement factor database.
위 전력 성능 개선 요소의 개선인 제 1 수정은 실질적으로 후술하는 제 2 수정과 매우 유사하게 진행된다. 예를 들어 전력 성능 개선을 위해 소스코드를 입력하고, 전력 측정 프로젝트를 실행한 예가 도 4에 도시되어 있다. 또한, 전력 측정 단계의 예가 도 5에 도시되어 있다. 도 5에서는 도 4의 디버그 모드에서 전력 측정을 진행한 경우로서, 프로그램의 시작점과 종료지점이 나타나며, 현재 전류, 시작점과 종료점의 델타 전류값, 평균 전류값, 누적 전류값등이 차례로 측정된다. 이 때 누적 전류값을 이용하여 전력 개선 요소 소스를 확인할 수 있게 된다. The first modification, which is an improvement of the above power performance improvement factor, is substantially similar to the second modification described later. For example, an example of inputting a source code to improve power performance and executing a power measurement project is shown in FIG. 4 . Also, an example of the power measurement step is shown in FIG. 5 . In FIG. 5, when power measurement is performed in the debug mode of FIG. 4, the start and end points of the program are shown, and the current current, the delta current value of the start and end points, the average current value, the accumulated current value, etc. are sequentially measured. In this case, the source of the power improvement factor can be identified using the accumulated current value.
도 6은 전력 성능 개선 요소에 대한 제 1 수정을 진행하여 제 1 성능 개선을 진행된 후, 수정 전과 수정전을 비교하여 얼마나 전력 성능이 개선되었는지를 나타내는 이미지도이다. 도시된 바와 같이, 개선전의 전류량 및 전력량에 비하여 개선 후 상당폭의 저전력 성능 개선이 이루어졌음을 확인할 수 있다.FIG. 6 is an image diagram illustrating how much power performance is improved by comparing the power performance improvement factors before and after the first performance improvement by performing the first correction. As shown, it can be confirmed that a significant improvement in low-power performance is achieved after the improvement compared to the amount of current and power before the improvement.
그 다음 실행 성능 개선 작업(2차 개선 작업)이 진행된다. 제 1 차 성능 개선 작업후 상기 소스 코드를 분석하여 다음과 같은 동작을 진행한다.Then, execution performance improvement work (secondary improvement work) proceeds. After the first performance improvement work, the source code is analyzed and the following operation is performed.
전술한 바와 동일하게 소스 코드 입력 단계는 소스 입력부(30)를 통해 이루어진다. 예컨대 소스 코드를 소스 네비게이터 모듈(111)에 입력한다. 소스 네비게이터 모듈(111)는 오픈 소스 코드 분석 도구이다. 예를 들면, C:/Project/SN/SN-NG4.4/bin/filelist.dat에 타겟 소스의 주소를 입력한다. 이렇게 입력된 소스 코드는 소스 네비게이터 모듈(111)의 파서(parser)에 의해 소스 코드 분석이 진행된다. 소스 네비게이터 모듈(11)의 파서에 의해 실행 결과물의 예시가 도 7이며, 여기서는 C:\Project\SN\SN-NG4.4\bin\SNDB4 에서 SNDB 파일들을 확인할 수 있으며, 이 파일들은 바이너리 파일이여서 정제과정이 필요하다. 정제과정에서 사용하는 프로그램은 dbdump.exe 파일이다. dbdump.exe는 바이너리(binary)파일 형태의 대상 데이터를 텍스트로 변환하여 저장하는 파일이다. As described above, the source code input step is performed through the
그 다음 상기 분석 결과에 따라 성능 데이터 프레임을 생성한다. 실행명령어 $ java-jar Extranctinfo.jar "./SN/SN-NG4.4/bin/SNDB4" "/SN/SN-NG4.4/bin/dbdump.exe"에 의해 ExtractInfo.jar의 DB.java 파일의 init() 메서드에서 성능데이터 프레임을 생성한다(도 8 참조).Then, a performance data frame is generated according to the analysis result. DB.java file of ExtractInfo.jar by execution command $ java-jar Extranctinfo.jar "./SN/SN-NG4.4/bin/SNDB4" "/SN/SN-NG4.4/bin/dbdump.exe" Create a performance data frame in the init() method of (see FIG. 8).
그 다음, 소스 네비게이터 모듈(111)에서의 결과물을 성능 데이터 프레임에 SQLITE를 활용하여 성능 개선 요소 데이터 베이스(31)를 완성한다. 즉, 실행명령어 $ java-jar Extranctinfo.jar "./SN/SN-NG4.4/bin/SNDB4" "./SN/SN-NG4.4/bin/dbdump.exe"에 의해 생성된 데이터 베이스에 소스 네비게이터 모듈(111)의 결과물들을 jdbdump.exe 파일로 insert한다. 생성된 테이블 스키마는 도 9와 같다. Next, the result of the
그 다음 성능 가시화 모듈을 통해성능 개선 요소를 산정하고 이를 가시화한다. Generate Dot를 활용하여 실행명령어 $ java-jar GenrateDotContents(SN)_.jar "./graphviz/dot.exe” “ranksep=2.0;” “11111” “C” GenarateDotContents(SN)_.jar의 GenarateDot.java 파일의 DrawRect()메서드에서 성능지표를 추출할 수 있는 쿼리문을 작성한다. 결과물을 Graphviz에 입력하고 실행하면 성능가시화 그래프가 나온다. 그 예가 도 10이며, 사용자는 도 10을 통해 실행속도를 저하하는 요소들(적색으로 표시됨), 즉 실행 성능 개선 요소들을 시각적으로 확인할 수 있게 된다. Then, the performance improvement factor is calculated and visualized through the performance visualization module. Run command using Generate Dot $ java-jar GenrateDotContents(SN)_.jar "./graphviz/dot.exe" “ranksep=2.0;” Write a query statement that can extract the performance index from the DrawRect() method of the GenarateDot.java file of “11111” “C” GenarateDotContents(SN)_.jar Enter the result into Graphviz and run it to get a performance visualization graph An example is Fig. 10, and through Fig. 10, the user can visually check factors that reduce execution speed (indicated in red), that is, factors that improve execution performance.
그 다음, 성능 개선 요소에 대하여 제 2 수정을 진행하여 성능 개선 작업을 한다. 즉, 실행 성능 개선 요소에 대한 변경 준비가 이루어지는 성능 변경 준비 단계와 상기 변경 준비 이후에 상기기 실행 성능 개선 요소에 대한 사용자의 수정 작업이 진행되는 성능 개선 소스 수정 단계를 통해 이루어지며, 성능 개선 요소 데이터 베이스를 준비하는 단계; 상기 성능 개선 요소 데이터 베이스 중 상기 실행 성능 개선 요소에 대응되는 성능 개선 요소 소스를 확인하는 단계; 상기 확인된 성능 개선 요소 소스를 상기 실행 성능 개선 요소와 함께 표시하는 단계를 포함하고, 상기 성능 개선 소스 수정 단계는, 상기 성능 개선 요소 데이터 베이스에서 추천된 개선 요소 소스로 상기 수정작업을 진행하는 단계를 포함할 수 있다. Then, the performance improvement work is performed by performing a second correction on the performance improvement factor. That is, it is performed through a performance change preparation step in which preparation for changes to the execution performance improvement factor is made and a performance improvement source modification step in which a user's modification of the execution performance improvement factor is performed after the change preparation, and the performance improvement factor preparing a database; identifying a performance improvement factor source corresponding to the execution performance improvement factor in the performance improvement factor database; and displaying the identified performance improvement factor source together with the execution performance improvement factor, wherein the modifying the performance improvement source includes performing the modification work with the improvement factor source recommended in the performance improvement factor database may include
즉, 성능 개선 요소들에 대한 수정 작업은 성능 가시화 모듈에 의해 수정이 필요한 "실행 성능 개선 요소"가 타 요소와 다르게 표시된 상태에서, 사용자는 실행 성능 개선요소에 대한 수정작업을 진행하게 된다. 이 때, 성능 개선 요소 데이터 베이스가 메모리에 저장되어 있고, 저장된 성능 개선 요소 데이터 베이스에서 제어부가 상기 실행 성능 개선 요소에 대응되는 성능 개선 요소 소스를 확인하고, 이를 실행 성능 개선 요소와 함께 표시한 후 사용자의 선택에 의해 실행 성능 개선 요소가 자동으로 수정될 수 있다. 또는 수작업으로 진행될 수도 있다. That is, in the case of modifying the performance improvement factors, the user proceeds to modify the execution performance improvement factors while the “execution performance improvement factor” that needs to be corrected is displayed differently from other factors by the performance visualization module. At this time, the performance improvement factor database is stored in the memory, and the control unit checks the performance improvement factor source corresponding to the execution performance improvement factor from the stored performance improvement factor database, and displays it together with the execution performance improvement factor. Execution performance improvement factors may be automatically modified by the user's selection. Or it can be done manually.
그 예를 들면 다음과 같다.For example:
우선 정의된 성능저하 요소의 패턴은 3가지로 예시한다.First, the defined pattern of performance degradation factors is exemplified in three ways.
Pattern Name
Code Pattern
Regular Expression Rule
(인수가 증가하는 반복문)Loop unrolling & Loop Down Count
(a loop with increasing arguments)
for(int i=0; i<1000;i++){
sum += array[i];
}
int sum = 0;
for(int i=0; i<1000;i++){
sum += array[i];
}
[a-zA-Z_]([a-zA-Z_0-9])* [&<] ([a-zA-Z_0-9])+ ; [a-zA-Z_]([a-zA-Z_0-9])* \+\+
(반복문 내 불필요한 조건문)
Unnecessary control statements of the inner loops
(Unnecessary conditional in the loop)
if(i & 0x01) {
do_odd(i);
}else{
do_even(i);
}
}
for(i=0; i<1000;i++){
if(i & 0x01) {
do_odd(i);
}else{
do_even(i);
}
}
[a-zA-Z_]([a-zA-Z_0-9])* [&<] ([a-zA-Z_0-9])+ ; [a-zA-Z_]([a-zA-Z_0-9])* \+\+ \) \{ [\s\S]* if \(
(다수의 if then else문)
Multiple if then else
(Multiple if then else statements)
}else if(a==2){
}else if(a==3){
}else if(a==4){
}
if(a==1){
}else if(a==2){
}else if(a==3){
}else if(a==4){
}
if \( [a-zA-Z_0-9\b\s\+\/\*\%%\[\]]* [&<!=&>&|]* [a-zA-Z_0-9\ b\s\+\/\*\%%\[\]]+ \)
c/c++ 언어로 작성된 프로그램을 정적 분석하는 오픈 소스 도구인 cppcheck와 정규 표현식을 통해 소스코드를 검촐하고 실행 명령어 중 잘못된 패턴을 검출하고, 이것을 개선하는 과정을 거치게 된다. 예컨대, PropertiesWnd.cpp파일에서 Loop unrolling & Loop Down Count를 리팩토링하는 방식, Unnecessary control statements of the inner loops를 리팩토링하는 방식, Multiple if then else를 리팩토링 하는 방식으로 이루어진다. 이와 같은 2차 성능 개선 작업이 이루어진 다음 성능 가시화모듈을 통해 평가를 해보면, 도 11과 같이 성능 저하 요소의 갯수(적색으로 표시된 부분)가 감소하였음을 알 수 있다.Cppcheck, an open source tool that statically analyzes programs written in c/c++ language, inspects source code through regular expressions and detects incorrect patterns among execution commands, and improves them. For example, in the PropertiesWnd.cpp file, Loop unrolling & Loop Down Count is refactored, Unnecessary control statements of the inner loops are refactored, Multiple if then else is refactored. When the performance visualization module is evaluated after the secondary performance improvement work is performed, it can be seen that the number of performance degradation factors (parts marked in red) is reduced as shown in FIG. 11 .
Claims (13)
상기 소스 코드를 분석하여 상기 소스코드를 분석하여 전력 성능 개선 요소를 확인하는 전력 확인 단계;
상기 전력 성능 개선 요소에 대한 제 1 수정을 진행하여 제 1 성능 개선을 진행하는 1차 개선 단계;
상기 1차 개선 단계 후, 상기 소스 코드를 분석하여 실행 성능 개선 요소를 확인하는 성능 확인 단계; 및
상기 실행 성능 개선 요소에 대한 제 2 수정을 진행하여 제 2 성능 개선을 진행하는 2차 개선 단계; 를 포함하는, 전력 개선을 위한 소프트웨어 코드 변경 방법.
A source code input step of receiving the source code of the software;
a power checking step of analyzing the source code and analyzing the source code to check a power performance improvement factor;
a first improvement step of performing a first performance improvement by performing a first modification on the power performance improvement factor;
After the first improvement step, a performance check step of analyzing the source code to check an execution performance improvement factor; and
a second improvement step of performing a second performance improvement by performing a second modification on the execution performance improvement factor; A software code change method for power improvement, comprising:
상기 전력 확인 단계는,
전력 가시화 모듈을 통해 상기 전력 성능 개선 요소를 가시화하여 시각적으로 표시하는 단계를 포함하는, 전력 개선을 위한 소프트웨어 코드 변경 방법.
The method of claim 1,
The power check step is,
A method for changing a software code for power improvement, comprising the step of visually displaying the power performance improvement factor through a power visualization module.
상기 전력 확인 단계는,
상기 소프트웨어를 실행하여 1차 전력 측정을 제 1 전력 정보를 생성하는 하는 단계;
전력 측정 프로젝트를 생성하여 전력 측정 환경을 준비하는 전력 측정 준비 단계:
상기 소스코드를 입력한 상태에서 상기 전력 측정 프로젝트를 실행하는 프로젝트 실행 단계;
상기 프로젝트 실행 단계후 2차 전력 측정을 하여 제 2 전력 정보를 생성하는 단계; 및
상기 제 1 전력 정보와 제 2 전력 정보를 비교하여 상기 전력 성능 개선 요소를 생성하는 단계를 포함하는, 전력 개선을 위한 소프트웨어 코드 변경 방법.
3. The method of claim 2,
The power check step is,
executing the software to perform a primary power measurement to generate first power information;
Power measurement preparation steps to prepare a power measurement environment by creating a power measurement project:
a project execution step of executing the power measurement project in a state in which the source code is input;
generating second power information by measuring secondary power after the project execution step; and
and generating the power performance improvement factor by comparing the first power information and the second power information.
상기 1차 개선 단계는,
상기 전력 성능 개선 요소에 대한 변경 준비가 이루어지는 전력 변경 준비 단계; 및
상기 변경 준비 이후에 상기 전력 성능 개선 요소에 대한 수정 작업이 진행되는 전력 소스 수정 단계를 포함하는, 전력 개선을 위한 소프트웨어 코드 변경 방법.
4. The method of claim 3,
The first improvement step is,
a power change preparation step in which a change preparation for the power performance improvement element is made; and
and a power source modification step in which a modification operation for the power performance improvement factor is performed after the modification preparation.
상기 전력 변경 준비 단계는,
전력 개선 요소 데이터 베이스를 준비하는 단계;
상기 전력 개선 요소 데이터 베이스 중 상기 전력 성능 개선 요소에 대응되는 전력 개선 요소 소스를 확인하는 단계; 및
상기 확인된 전력 개선 요소 소스를 상기 전력 성능 개선 요소와 함께 표시하는 단계를 포함하는, 전력 개선을 위한 소프트웨어 코드 변경 방법.
5. The method of claim 4,
The power change preparation step is,
preparing a power improvement factor database;
identifying a power improvement factor source corresponding to the power performance improvement factor in the power improvement factor database; and
and displaying the identified power improvement factor source together with the power performance improvement factor.
상기 전력 소스 수정 단계는,
상기 전력 개선 요소 데이터 베이스에서 추천된 전력 개선 요소 소스로 상기 수정 작업을 진행하는 단계를 포함하는, 전력 개선을 위한 소프트웨어 코드 변경 방법.
6. The method of claim 5,
The power source modification step is,
and performing the modification operation from the power improvement factor database to a recommended power improvement factor source.
상기 성능 확인 단계는,
성능 가시화 모듈을 통해 상기 실행 성능 개선 요소를 가시화하여 시각적으로 표시하는 단계를 포함하는, 전력 개선을 위한 소프트웨어 코드 변경 방법.
The method of claim 1,
The performance check step is,
A method of changing a software code for power improvement, comprising the step of visually displaying the execution performance improvement factor through a performance visualization module.
상기 성능 확인 단계는,
소스 네비게이터 모듈을 통해 소스 코드 분석을 진행하는 분석 단계;
상기 분석 단계 후 상기 분석 결과에 따라 성능 데이터 프레임을 생성하는 단계;
상기 소스 네비게이터 모듈에서의 결과물을 상기 성능 데이터 프레임에 삽입하여 성능 데이터 베이스를 완성하는 단계; 및
성능 가시화 모듈을 통해 상기 성능 데이터 베이스에 기초하여 상기 실행 성능 개선 요소를 선정하고 이를 가시화하는 단계를 포함하는, 전력 개선을 위한 소프트웨어 코드 변경 방법.
The method of claim 1,
The performance check step is,
An analysis step of analyzing the source code through the source navigator module;
generating a performance data frame according to the analysis result after the analysis step;
inserting a result of the source navigator module into the performance data frame to complete a performance database; and
A method of changing a software code for power improvement, comprising: selecting the execution performance improvement factor based on the performance database through a performance visualization module and visualizing it.
상기 2차 개선 단계는,
상기 실행 성능 개선 요소에 대한 변경 준비가 이루어지는 성능 변경 준비 단계; 및
상기 변경 준비 이후에 상기 실행 성능 개선 요소에 대한 수정 작업이 진행되는 성능 개선 소스 수정 단계를 포함하는, 전력 개선을 위한 소프트웨어 코드 변경 방법.
9. The method of claim 8,
The second improvement step is
a performance change preparation step in which preparation for change to the execution performance improvement element is made; and
and a performance improvement source modification step in which a modification operation is performed on the execution performance improvement factor after the preparation for the change.
상기 성능 변경 준비 단계는,
성능 개선 요소 데이터 베이스를 준비하는 단계;
상기 성능 개선 요소 데이터 베이스 중 상기 실행 성능 개선 요소에 대응되는 성능 개선 요소 소스를 확인하는 단계; 및
상기 확인된 성능 개선 요소 소스를 상기 실행 성능 개선 요소와 함께 표시하는 단계를 포함하는, 전력 개선을 위한 소프트웨어 코드 변경 방법.
10. The method of claim 9,
The performance change preparation step is,
preparing a performance improvement factor database;
identifying a performance improvement factor source corresponding to the execution performance improvement factor in the performance improvement factor database; and
and displaying the identified performance enhancing factor source together with the executing performance enhancing factor.
상기 성능 개선 소스 수정 단계는,
상기 성능 개선 요소 데이터 베이스에서 추천된 개선 요소 소스로 상기 수정작업을 진행하는 단계를 포함하는, 전력 개선을 위한 소프트웨어 코드 변경 방법.
11. The method of claim 10,
The performance improvement source modification step is,
The method of changing a software code for power improvement, comprising the step of performing the modification work with the improvement factor source recommended in the performance improvement factor database.
상기 소스 코드를 분석하여 전력 성능 개선 요소를 확인하고, 상기 전력 성능 개선 요소에 대한 제 1 수정을 진행하여 제 1 성능 개선을 진행하고, 제 1 성능 개선 후 상기 소스코드를 분석하여 실행 성능 개선 요소를 확인한 후, 상기 실행 성능 개선 요소에 대한 제 2 수정을 진행하여 제 2 성능 개선을 진행하는 제어부를 포함하는, 전력 개선을 위한 소프트웨어 소스 코드 변경 장치.
an input unit for receiving the source code of the software; and
A power performance improvement factor is identified by analyzing the source code, a first performance improvement is performed by performing a first correction on the power performance improvement factor, and an execution performance improvement factor by analyzing the source code after the first performance improvement After confirming, a control unit for performing a second performance improvement by performing a second modification on the execution performance improvement factor, the software source code changing apparatus for power improvement.
디스플레이부를 더 포함하고,
상기 제어부는,
상기 전력 성능 개선 요소를 가시화하여 시각적으로 상기 디스플레이부에 표시하는 전력 가시화 모듈을 포함하는, 전력 개선을 위한 소프트웨어 소스 코드 변경 장치.13. The method of claim 12,
Further comprising a display unit,
The control unit is
and a power visualization module for visualizing the power performance improvement element and visually displaying it on the display unit.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020200153896A KR102523329B1 (en) | 2020-11-17 | 2020-11-17 | Method for visualizing performance improvement element and changing software code for power improvement |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020200153896A KR102523329B1 (en) | 2020-11-17 | 2020-11-17 | Method for visualizing performance improvement element and changing software code for power improvement |
Publications (2)
Publication Number | Publication Date |
---|---|
KR20220067324A true KR20220067324A (en) | 2022-05-24 |
KR102523329B1 KR102523329B1 (en) | 2023-04-19 |
Family
ID=81807573
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
KR1020200153896A KR102523329B1 (en) | 2020-11-17 | 2020-11-17 | Method for visualizing performance improvement element and changing software code for power improvement |
Country Status (1)
Country | Link |
---|---|
KR (1) | KR102523329B1 (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR100503776B1 (en) * | 2005-03-12 | 2005-07-26 | (주)위즈베이스 | Method for analyzing and tuning web application performance |
KR20060067720A (en) * | 2004-12-15 | 2006-06-20 | 한국전자통신연구원 | Apparatus and method for optimizing and analyzing embedded software in cross development environment |
KR101225577B1 (en) * | 2010-12-07 | 2013-01-24 | 한국과학기술연구원 | Apparatus and method for analyzing assembly language code |
KR102006507B1 (en) * | 2011-09-02 | 2019-10-01 | 마이크로소프트 테크놀로지 라이센싱, 엘엘씨 | Fast presentation of markup content having script code |
-
2020
- 2020-11-17 KR KR1020200153896A patent/KR102523329B1/en active IP Right Grant
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20060067720A (en) * | 2004-12-15 | 2006-06-20 | 한국전자통신연구원 | Apparatus and method for optimizing and analyzing embedded software in cross development environment |
KR100503776B1 (en) * | 2005-03-12 | 2005-07-26 | (주)위즈베이스 | Method for analyzing and tuning web application performance |
KR101225577B1 (en) * | 2010-12-07 | 2013-01-24 | 한국과학기술연구원 | Apparatus and method for analyzing assembly language code |
KR102006507B1 (en) * | 2011-09-02 | 2019-10-01 | 마이크로소프트 테크놀로지 라이센싱, 엘엘씨 | Fast presentation of markup content having script code |
Also Published As
Publication number | Publication date |
---|---|
KR102523329B1 (en) | 2023-04-19 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN101710378B (en) | Software security flaw detection method based on sequential pattern mining | |
CN112015628B (en) | Intelligent contract function level dynamic monitoring analysis system and implementation method | |
US9047399B2 (en) | Generating visualization from running executable code | |
CN107239392B (en) | Test method, test device, test terminal and storage medium | |
US20140380269A1 (en) | Verification of computer-executable code generated from a model | |
US20140331203A1 (en) | Analysis of source code changes | |
US20080127113A1 (en) | Method and system for implementing watchpoints | |
US8898635B2 (en) | System and method for automatic impact variable analysis and field expansion in mainframe systems | |
CN104407973A (en) | Automatic unit test realizing method and device | |
US8276130B2 (en) | Method and compiler of compiling a program | |
Samuel et al. | Slicing-based test case generation from UML activity diagrams | |
Islam et al. | Coherent clusters in source code | |
CN112347120B (en) | Automatic optimization method and device based on complex SQL | |
CN105468525A (en) | Component interface unit testing method based on C code model | |
KR102413994B1 (en) | Method for visualizing software source code after modifying it for improving performance and device thereof | |
KR102523329B1 (en) | Method for visualizing performance improvement element and changing software code for power improvement | |
CN114816971A (en) | Data processing method, related equipment and storage medium | |
CN115033434B (en) | Method and device for calculating kernel performance theoretical value and storage medium | |
CN115794054A (en) | Code generation method and device, storage medium and computer equipment | |
CN115480940A (en) | Page calling method, device and medium for financial ratio indexes | |
CN115438026A (en) | Database scanning method, device, equipment, storage medium and product | |
Kumar et al. | Code-Viz: data structure specific visualization and animation tool for user-provided code | |
CN112148581A (en) | Code specification checking method, device, system and storage medium | |
CN111125073A (en) | Method, device and system for verifying data quality of big data platform | |
CN116501378B (en) | Implementation method and device for reverse engineering reduction source code and electronic equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
E902 | Notification of reason for refusal | ||
E701 | Decision to grant or registration of patent right |