Age | Commit message (Collapse) | Author | Files | Lines |
|
option directory
Change-Id: I7d595d68137cb2e703f550bee881baafda915093
Signed-off-by: Sung-hun Kim <sfoon.kim@samsung.com>
|
|
Change-Id: I47a53d3fa229e5b0224222c2201fcbe741f6c91b
Signed-off-by: Sung-hun Kim <sfoon.kim@samsung.com>
|
|
The new operator in C++ does not return nullptr when it is failed.
Instead, it throws a bad_alloc exception to notify the failure.
With an optional `std::nothrow` keyword, the new operator returns
nullptr instead of exception throwing when it is failed.
This patch fixes a svace issue 209972.
Change-Id: I6a6f900f06bf7911fc9aa53366d5da6375680915
Signed-off-by: Sung-hun Kim <sfoon.kim@samsung.com>
|
|
Remove conditional statements in trace.h header file and
use the Mobile version for since_tizen.
Change-Id: I679e75bb3be8c45abe3298f9126a45ada1f18091
Signed-off-by: Sung-hun Kim <sfoon.kim@samsung.com>
|
|
user shell
Change-Id: I2af979fa8980c6f2cbfa3c0cea4737c22ef8ad7d
Signed-off-by: Sung-hun Kim <sfoon.kim@samsung.com>
|
|
Change-Id: Ida203348cafa4ab0cbecb28dd25595e7fa19746d
Signed-off-by: JinWang An <jinwang.an@samsung.com>
|
|
Due to the return value of read syscall, tot_read can be overflowed or
it can make an underflow case on the argument of read syscall.
Also, if an argument length contains zero, it can make an underflow on
`length - 1`.
This patch handles such cases by checking values properly.
Change-Id: I81bb2678d0a8cc38a000c16cc183589e0fcefb15
Signed-off-by: Sung-hun Kim <sfoon.kim@samsung.com>
|
|
Change-Id: I5d2a712428e97a9550cf88b166dd9b71a1ed510a
Signed-off-by: JinWang An <jinwang.an@samsung.com>
|
|
Change-Id: Ia1227ae78e42a33b6c035bee3e12785f6f13cb4e
Signed-off-by: Sung-hun Kim <sfoon.kim@samsung.com>
|
|
If the length of a PID number crosses 5, printed PID spoils the format
of the trace. In this case, systrace viewer cannot parse this trace.
To prevent this situation, this patch increases the buffer size of
PID from 5 to 8. It will be safe as long as PID is less or equal than
99,999,999.
Change-Id: Ia374a8b9846402f2578dd5bbefc1eabd75cd319b
Signed-off-by: Sung-hun Kim <sfoon.kim@samsung.com>
|
|
Due to the formatting error, ttrace package cannot be built
if TTRACE_DEBUG is defined. This patch fixes this errors by
applying proper formats.
Change-Id: If949de75f3c3cf436a76749770f381651b40a9a9
Signed-off-by: Sung-hun Kim <sfoon.kim@samsung.com>
|
|
After Linux kernel version 4.13, an option should be set to print
TGID of tasks. This patch enables this option.
Change-Id: I22aaa91f0c3d8c43e83dee039733318b744f9a81
Signed-off-by: Sung-hun Kim <sfoon.kim@samsung.com>
|
|
Because of the recent update of the Linux kernel, sendfile call on
the trace file is no longer supported. Ref a below link:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=36e2c7421f02a22f71c9283e55fdb672a9eb58e7
Moreover, sendfile call shows poor performance for some cases
which is reported by the patch on android atrace:
https://android.googlesource.com/platform/frameworks/native/+/d3d36e71f274a1f6df1eb77db5a6abfb12035c75
So, we changed sendfile call to commonly used read/write calls.
Change-Id: If027ddc81781a6ec66bb85cbf826eb638a66cdc0
Signed-off-by: Sung-hun Kim <sfoon.kim@samsung.com>
|
|
The function strerror() is a vulnerable function because it is thread-unsafe.
Instead of this function, ttrace will use strerror_r() which guarantees thread-safety.
Change-Id: I904887011c404468a5660792efcf08c4a632366f
Signed-off-by: Sung-hun Kim <sfoon.kim@samsung.com>
|
|
For some build environment (especially for the 64-bit emulator),
building ttrace is failed due to the linking failure like below.
[ 67s] /usr/lib64/gcc/x86_64-tizen-linux-gnu/9.2.0/../../../../x86_64-tizen-linux-gnu/bin/ld: /tmp/libttrace.so.1.1.0.VwGElR.ltrans0.ltrans.o: relocation R_X86_64_PC32 against symbol `cur_enabled_tag' can not be used when making a shared object; recompile with -fPIC
[ 67s] /usr/lib64/gcc/x86_64-tizen-linux-gnu/9.2.0/../../../../x86_64-tizen-linux-gnu/bin/ld: final link failed: bad value
[ 67s] collect2: error: ld returned 1 exit status
Adding -fPIC can resolve this issue.
Change-Id: I01197fc6704e5e1accdb70648ea147274ced4d58
Signed-off-by: Sung-hun Kim <sfoon.kim@samsung.com>
|
|
Change-Id: Ibd656e33d3493c22b28d685f596623e6b9777464
Signed-off-by: Sung-hun Kim <sfoon.kim@samsung.com>
|
|
Add escape character for preserving missed argument expression.
Change-Id: I9d31dec2d3b2c800e5c45f2f31272eb883f9a3b6
Signed-off-by: Sung-hun Kim <sfoon.kim@samsung.com>
|
|
- Create run-unittest.sh to automate coverage measurement.
- Keep directory hierarchy of .gcno files.
Change-Id: I417887688e792a816b4ee8f8eff6ace141d2f816
Signed-off-by: Sung-hun Kim <sfoon.kim@samsung.com>
|
|
In the QEMU environment, it was difficult to measure coverage
for file-related functions during gtest operation, so bypass
was performed. File-related functions were wrapped and processed
as if they were normally processed in a QEMU environment to improve
coverage.
Note: description about comment for LCOV in below
C++ code, an individual line can be excluded by adding LCOV_EXCL_LINE
somewhere on that line, or a block can be excluded by surrounding it
with lines containing LCOV_EXCL_START and LCOV_EXCL_STOP.
Change-Id: Iea4413fd5cc128ed1f417efcc26ad1e797321981
Signed-off-by: Seungha Son <seungha.son@samsung.com>
|
|
This patch is for refactor cmake build structure.
To facilitate analysis and modification by separating it
'src','atrace','atrace-helper', and 'test', respectively.
Change-Id: I2f2349fd0e055e4f7a719da733c185896aaf7464
Signed-off-by: Seungha Son <seungha.son@samsung.com>
|
|
Change-Id: I01aa139933210053b877fa0359e1eef295d10656
Signed-off-by: Seungha Son <seungha.son@samsung.com>
|
|
Change-Id: Ifb43d363f8d44f775f875e52063b4bf2041d08b9
Signed-off-by: Seungha Son <linuxias@gmail.com>
|
|
Change-Id: I31e13550281bf52aaa9542a5045df09e443c7e0b
Signed-off-by: Seungha Son <linuxias@gmail.com>
|
|
ttrace-marker.service" into tizen
|
|
When building with the "gcov on" option,
It can check the coverage result in the build log.
Change-Id: Id9a05454342a720aedb58052b7035264d957e778
Signed-off-by: Seungha Son <seungha.son@samsung.com>
|
|
Those dependencies prevent ttrace-marker.service from running in emergency mode,
because local-fs.target always fails in emergency mode.
Change-Id: I770d2a9b477831bc9c571c925c0ceb89b16829e4
|
|
Change-Id: I6fdc2ce6ac49700395d0758ab2b93c76e11069c6
Signed-off-by: Seungha Son <seungha.son@samsung.com>
|
|
- Add RemainAfterExit=yes to ttrace-marker.service
- Fix API reference header issues
- Add atrace-helper module
- Refactor resource managements
Change-Id: Ic847f35c3200fbece2feb8fefa64acb726a5abf3
Signed-off-by: Seungha Son <seungha.son@samsung.com>
|
|
Change-Id: Iaebd60a6feb8687f608cf1781974e9dacb2fe2e3
Signed-off-by: Seungha Son <seungha.son@samsung.com>
|
|
Change-Id: I42931c88e1d7a7a33db9a59062e6278c73a871c8
Signed-off-by: Seungha Son <seungha.son@samsung.com>
|
|
Once started, this service never runs twice.
Change-Id: Ic21b1f36467ce27cfd15ed0cede47b520735a522
|
|
- Create a link in documentation
- Add '.' at the end of @brief
- Add 'void' keyword inside parentheses
Change-Id: Ib92a3a3305a792d6c40ab127815766d838579b46
Signed-off-by: Seungha Son <seungha.son@samsung.com>
|
|
Change-Id: I2fa33741c06a286968dc4c38d0e1a69202e93279
Signed-off-by: Seungha Son <seungha.son@samsung.com>
|
|
Change-Id: Ib02e1fc6381dfe6f7a00561307d30119b78e4eca
Signed-off-by: Seungha Son <seungha.son@samsung.com>
|
|
Change-Id: I85b4c82a96e42d3a08acd1ec3f2f25742205aa4e
Signed-off-by: Seungha Son <seungha.son@samsung.com>
|
|
Fix an incorrect declaration to free the array unique_ptr.
Change-Id: I863708576482584156cd37f8e21aa824bdc7abb7
|
|
Change-Id: I84e8343338f07a8e2a9e817e1ccca221c98aeff6
Signed-off-by: Seungha Son <seungha.son@samsung.com>
|
|
Change-Id: Ice751dae71952b2fa2452cb301a91eb4b28fa5e2
Signed-off-by: Seungha Son <seungha.son@samsung.com>
|
|
warning:
format '%llx' expects argument of type 'long long unsigned int*',
but argument has type 'uint64_t*' {aka 'long unsigned int*'}
Change-Id: I7e54040d62d10ebcf2084410bfbbd84310664e07
Signed-off-by: Seungha Son <seungha.son@samsung.com>
|
|
atrace_helper is an optional binary which can be pushed
onto the device running systrace in order to enrich
the traces with further details (memory, I/O, etc).
- Memory snapshots of runnig processes(PSS/RSS)
- Periodic snapshotting of processes and thread names.
- File paths for filesystem events (only inode numbers).
Base repo :
https://chromium.googlesource.com/catapult/+/refs/heads/master/systrace/atrace_helper/
Changed contents :
Remove specific logic related android
Change-Id: I84b6dff914d4d5f151003e002dd0ff08ab0ae81c
Signed-off-by: Seungha Son <seungha.son@samsung.com>
|
|
Buffers, managed by malloc() and free(), are replaced with
std::unique_ptr type, so it will automatically deleted when going
out of scope.
Change-Id: I117bea7d0a980c94c0481f3e470da2a626ca4595
Signed-off-by: Seungha Son <seungha.son@samsung.com>
|
|
Change-Id: I0bc2f11b1dff501b8dcfc84bbbad166a8a5d1b64
Signed-off-by: Seungha Son <seungha.son@samsung.com>
|
|
Set the clock to the best available option while tracing. Use 'boot' if it's
available; otherwise, use 'mono'. If neither are available use 'global'.
Any write to the trace_clock sysfs file will reset the buffer, so only
update it if the requested value is not the current value.
Reference : https://www.kernel.org/doc/Documentation/trace/ftrace.txt
trace_clock:
Whenever an event is recorded into the ring buffer, a
"timestamp" is added. This stamp comes from a specified
clock. By default, ftrace uses the "local" clock. This
clock is very fast and strictly per cpu, but on some
systems it may not be monotonic with respect to other
CPUs. In other words, the local clocks may not be in sync
with local clocks on other CPUs.
Usual clocks for tracing:
# cat trace_clock
[local] global counter x86-tsc
The clock with the square brackets around it is the one
in effect.
local: Default clock, but may not be in sync across CPUs
global: This clock is in sync with all CPUs but may
be a bit slower than the local clock.
mono: This uses the fast monotonic clock (CLOCK_MONOTONIC)
which is monotonic and is subject to NTP rate adjustments.
boot: This is the boot clock (CLOCK_BOOTTIME) and is based on the
fast monotonic clock, but also accounts for time spent in
suspend. Since the clock access is designed for use in
tracing in the suspend path, some side effects are possible
if clock is accessed after the suspend time is accounted before
the fast mono clock is updated. In this case, the clock update
appears to happen slightly sooner than it normally would have.
Also on 32-bit systems, it's possible that the 64-bit boot offset
sees a partial update. These effects are rare and post
processing should be able to handle them. See comments in the
ktime_get_boot_fast_ns() function for more information.
Change-Id: Iba2d4fcd4f6272fd8faa2e7d462c5b275547c73f
Signed-off-by: Seungha Son <seungha.son@samsung.com>
|
|
nullptr is a keyword that can be used at all places
where NULL is expected. Like NULL, nullptr is implicitly
convertible and comparable to any pointer type.
Unlike NULL, it is not implicitly convertible or
comparable to integral types.
Change-Id: Ie1ea211adaff6f818d1f86b0e0a8d9736320b0bf
Signed-off-by: Seungha Son <seungha.son@samsung.com>
|
|
Add events based on kernel version 4.19.81.
Change-Id: I4b96d790b518dff794c5b2b06d6556e882d8b0c6
Signed-off-by: Seungha Son <seungha.son@samsung.com>
|
|
|
|
Change-Id: I8bc65b1d0767ad5cc940d6ebdb31cd622fca4c6f
Signed-off-by: joon.c.baek <joon.c.baek@samsung.com>
|
|
Change-Id: I8bc65b1d0767ad5cc940d6ebdb31cd622fca4c6f
Signed-off-by: joon.c.baek <joon.c.baek@samsung.com>
|
|
To mount tracefs needs to check existed path,
And add mount options in details.
Change-Id: I9393c5629b8bf423d48ecec51fd4d99418d421cc
Signed-off-by: joon.c.baek <joon.c.baek@samsung.com>
|
|
'sys-kernel-debug-tracing.mount' was removed for
resolving 'systemctl --state failed' issue.
However, Add 'Options=remount,rw' to this file,
it can be solution also.
This reverts commit 0a2883bf7940b3ee138551434117d3ea63cbfb2a.
Change-Id: I5d7f4f5236f7212f06f41bd7ddf815c3f548c85a
|