Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
<modules>
<module>ctf</module>
<module>ftrace</module>
<module>uftrace</module>
<module>update-site</module>
</modules>

Expand Down
81 changes: 81 additions & 0 deletions uftrace/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (C) 2025 Ericsson and others

All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License 2.0
which accompanies this distribution, and is available at
https://www.eclipse.org/legal/epl-2.0/

SPDX-License-Identifier: EPL-2.0
-->

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.eclipse.tracecompass.testtraces</groupId>
<artifactId>tracecompass-test-traces-parent</artifactId>
<version>1.12.0-SNAPSHOT</version>
</parent>

<licenses>
<license>
<name>Eclipse Public License 2.0</name>
<comments>
All rights reserved. This program and the accompanying materials are
made available under the terms of the Eclipse Public License 2.0 which
accompanies this distribution, and is available at
https://www.eclipse.org/legal/epl-2.0/

SPDX-License-Identifier: EPL-2.0
</comments>
</license>
</licenses>

<artifactId>tracecompass-test-traces-ftrace</artifactId>

<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>RELEASE</version>
<scope>test</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<executions>
<execution>
<id>bundle-manifest</id>
<phase>process-classes</phase>
<goals>
<goal>manifest</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<configuration>
<excludeResources>true</excludeResources>
</configuration>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
/*******************************************************************************
* Copyright (c) 2025 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License 2.0 which
* accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*******************************************************************************/

package org.eclipse.tracecompass.testtraces.ftrace;

import java.net.URL;

/**
* Here is the list of the available test traces for the uftrace parser.
*
* @author Matthew Khouzam
*/
public enum UftraceTestTrace {
/**
* Example uftrace taken from foobar
*
* <pre>
* Trace Size: 240 K
* Tracer: uftrace v0.9.3 ( dwarf python tui perf sched dynamic )
* Event count: 16
* Kernel version: 6.5
* Trace length: 300 us
* </pre>
*
* The file is obtained by running uftrace on foobar
*/
TEST_FOOBAR("uftrace-foobar-demo/uftrace.data", 16, 1),


private final String fTraceName;
private final int fNbEvent;
private int fDuration;

private FtraceTestTrace(String traceName, int nbEvent, int time) {
fTraceName = traceName;
fNbEvent = nbEvent;
fDuration = time;
}

public URL getTraceURL() {
URL url = this.getClass().getResource(fTraceName);
if (url == null) {
/* Project configuration problem? */
throw new IllegalStateException("Test trace not found");
}
return url;
}

/**
* Get the number of events for a trace
*
* @return the number of events, -1 if irrelevant
*/
public int getNbEvents() {
return fNbEvent;
}

/**
* Get the duration in seconds of a trace
*
* @return the duration in seconds of a trace, -1 if irrelevant
*/
public int getDuration() {
return fDuration;
}
}
18 changes: 18 additions & 0 deletions uftrace/src/main/resources/uftrace-foobar-demo/foobar.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#include <pthread.h>

void *bar(void) {
return NULL;
}

void *foo(void *unused) {
return bar();
}

int main(int argc, char *argv[]) {
pthread_t th;

foo(argv);
pthread_create(&th, NULL, foo, NULL);
pthread_join(th, NULL);
return 0;
}
Binary file not shown.
Binary file not shown.
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# symbols: 17
# path name: /home/matthew/work/src/uftrace/foobar
# build-id: 516f6190db510f47e9608d9cfd554300d2d61b6e
000000000000038c 00000020 d __abi_tag
0000000000001090 00000010 P __stack_chk_fail
00000000000010a0 00000010 P __monstartup
00000000000010b0 00000010 P pthread_create
00000000000010c0 00000010 P __cxa_atexit
00000000000010d0 00000010 P pthread_join
00000000000010e0 00000026 T _start
0000000000001110 00000041 T __gmon_start__
0000000000001160 00000005 T _dl_relocate_static_pie
0000000000001229 00000015 T bar
000000000000123e 0000001d T foo
000000000000125b 0000007d T main
00000000000012e0 00000012 t atexit
0000000000001300 0000000f T __stack_chk_fail_local
0000000000002000 00000004 D _IO_stdin_used
0000000000004010 00000004 d called.0
0000000000004014 00000001 d completed.0
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# symbols: 32
# path name: /usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2
# build-id: 78ffe99ed77a37ae9416f1530f9110188897cf80
00000000000011e0 0000005a T _dl_signal_exception
0000000000001240 00000067 T _dl_signal_error
0000000000001460 00000179 T _dl_catch_exception
0000000000002690 00000005 T _dl_debug_state
0000000000003a30 000000cd T _dl_exception_create
0000000000003b00 00000465 T _dl_exception_create_format
0000000000003f70 00000023 T _dl_exception_free
0000000000004110 0000003b T __nptl_change_stack_perm
0000000000009a20 000002c3 T _dl_rtld_di_serinfo
000000000000c7a0 000000c3 T _dl_find_dso_for_object
000000000000e570 000000a6 T _dl_fatal_printf
000000000000edd0 00000215 T _dl_mcount
0000000000013da0 00000019 T _dl_get_tls_static_info
0000000000013e90 00000291 T _dl_allocate_tls_init
0000000000014130 000002b8 T _dl_allocate_tls
00000000000143f0 00000083 T _dl_deallocate_tls
00000000000159d0 0000006c T __tunable_get_val
0000000000017550 00000041 T __tls_get_addr
0000000000019f20 0000000c T _dl_x86_get_cpu_features
000000000001acc0 0000009d T _dl_audit_preinit
000000000001ad60 00000328 T _dl_audit_symbind_alt
000000000002a450 00000005 T __rtld_version_placeholder
0000000000031140 00000004 D __rseq_flags
00000000000357e8 00000008 D __rseq_offset
00000000000357f0 00000004 D __rseq_size
0000000000036a80 00000008 D __libc_stack_end
0000000000036a88 00000004 D __libc_enable_secure
0000000000036ab8 00000008 D _dl_argv
0000000000036ae0 00000388 D _rtld_global_ro
0000000000037000 000010e8 D _rtld_global
0000000000038108 00000028 D _r_debug
00000000000381d0 00000001 D __nptl_initial_report_events
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# symbols: 53
# path name: /usr/lib/x86_64-linux-gnu/libbz2.so.1.0.4
# build-id: e56b62c27bcc7ace8f9be36b255bd7b31bfde405
0000000000002160 00000010 P free
0000000000002170 00000010 P ferror
0000000000002180 00000010 P fread
0000000000002190 00000010 P fclose
00000000000021a0 00000010 P __stack_chk_fail
00000000000021b0 00000010 P memset
00000000000021c0 00000010 P fgetc
00000000000021d0 00000010 P fputc
00000000000021e0 00000010 P fopen64
00000000000021f0 00000010 P malloc
0000000000002200 00000010 P fflush
0000000000002210 00000010 P ungetc
0000000000002220 00000010 P fdopen
0000000000002230 00000010 P memmove
0000000000002240 00000010 P exit
0000000000002250 00000010 P fwrite
0000000000002260 00000010 P __fprintf_chk
0000000000002270 00000010 P __ctype_b_loc
0000000000002b60 00000053 T BZ2_hbAssignCodes
0000000000002bc0 00000149 T BZ2_hbCreateDecodeTables
0000000000002d10 00000010 T BZ2_bsInitWrite
0000000000002d20 00000246 T BZ2_bzCompressInit
0000000000002f70 0000007d T BZ2_bzCompressEnd
0000000000002ff0 00000104 T BZ2_bzDecompressInit
0000000000003100 00000031 T BZ2_indexIntoF
0000000000003140 0000008d T BZ2_bzDecompressEnd
00000000000031d0 000001a9 T BZ2_bzWriteOpen
0000000000003380 0000022b T BZ2_bzReadOpen
0000000000003820 0000008e T BZ2_bzReadClose
00000000000038b0 0000008e T BZ2_bzReadGetUnused
0000000000003940 0000000c T BZ2_bzlibVersion
0000000000003950 0000006c T BZ2_bz__AssertH__fail
0000000000005380 000001e6 T BZ2_blockSort
0000000000005570 00000496 T BZ2_hbMakeCodeLengths
0000000000005a10 00003ed8 T BZ2_compressBlock
0000000000009dc0 00000190 T BZ2_bzCompress
0000000000009f50 000001d3 T BZ2_bzWrite
000000000000a130 00000284 T BZ2_bzWriteClose64
000000000000a3c0 0000001a T BZ2_bzWriteClose
000000000000a3e0 00000163 T BZ2_bzBuffToBuffCompress
000000000000a550 00002af3 T BZ2_decompress
000000000000d050 00000f2c T BZ2_bzDecompress
000000000000df80 000002a8 T BZ2_bzRead
000000000000e230 00000148 T BZ2_bzBuffToBuffDecompress
000000000000e380 00000013 T BZ2_bzopen
000000000000e3a0 00000015 T BZ2_bzdopen
000000000000e3c0 00000060 T BZ2_bzread
000000000000e420 00000060 T BZ2_bzwrite
000000000000e480 00000007 T BZ2_bzflush
000000000000e490 000000aa T BZ2_bzclose
000000000000e540 00000023 T BZ2_bzerror
0000000000012020 00000400 D BZ2_crc32Table
0000000000012420 00000800 D BZ2_rNums
Loading
Loading