-
Notifications
You must be signed in to change notification settings - Fork 0
Measurements from the Command Line
Lynsyn can also be used from the command line. This is useful, e.g. when doing scripted experiments where a large number of measurement sessions must be performed.
Lynsyn must be connected in the same way as in the General Power Measurements and Power Profiling an ARM Application guides, but the host software is different. Instead of using the lynsyn_viewer application, you will instead use the lynsyn_sampler command.
The lynsyn_sampler command lets you run the same kind of measurments as you can in lynsyn_viewer, but it is all done on the command line. There are command line options for controlling the type of measurements performed.
Connect Lynsyn Lite the same way as in the General Power Measurements guide. Then open a terminal (see Installation if you do not know how to bring up the terminal). Enter the following command:
lynsyn_sampler -d 1
This performes the same kind of measurements as you did in the General Power Measurements guide. -d 1
means that sampling will run for 1s.
Connect Lynsyn Lite the same way as in the Power Profiling an ARM Application guide. Then open a terminal and enter a command similar to the following:
lynsyn_sampler -c 0xf -s 0x10324 -e 0x12800
Option explanation:
-
-c 0xf
: This options takes a bitmask of the CPU cores to sample. 0xf means that the first four cores will be sampled. -
-s 0x10324
: This options takes the address to use as the start address. Measurements will start when one of the sampled CPU cores reaches this address. It will do no symbol lookup, so you will have to figure out the address of the function to measure yourself. -
-e 0x12800
: This option takes the address to use as the end address. Measurements will end when one of the sampled CPU cores reaches this address.
Data from lynsyn_sampler is stored in a CSV file. The default is "output.csv", but a different name can be chosen with the -o
option. This file can then be viewed with a text editor, a spreadsheet application, or it can be imported into the lynsyn_viewer program.
Open the lynsyn_viewer application. The following window should appear:
Open the File menu and choose "Import CSV". The following dialog should appear:
Enter the name of the CSV file (or use the ... button to choose the file with a file dialog). If this CSV file also has program counter samples, you should also enter the elf file of the application in order to get function information. Press "OK" to import the data into the lynsyn_viewer application.
Lynsyn Wiki