Sung-hun Kim [Wed, 9 Nov 2022 03:04:12 +0000 (12:04 +0900)]
Change a GCC flag from -fpic to fPIC
Change-Id: Ibd656e33d3493c22b28d685f596623e6b9777464
Signed-off-by: Sung-hun Kim <sfoon.kim@samsung.com>
Sung-hun Kim [Fri, 3 Jun 2022 05:30:00 +0000 (14:30 +0900)]
Fix here document in the spec file
Add escape character for preserving missed argument expression.
Change-Id: I9d31dec2d3b2c800e5c45f2f31272eb883f9a3b6
Signed-off-by: Sung-hun Kim <sfoon.kim@samsung.com>
Sung-hun Kim [Tue, 31 May 2022 08:00:37 +0000 (17:00 +0900)]
Modify the spec file to deal with coverage measurement automation
- 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>
Seungha Son [Mon, 15 Nov 2021 07:50:40 +0000 (16:50 +0900)]
Improve code coverage
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>
Seungha Son [Wed, 27 Jan 2021 11:57:05 +0000 (20:57 +0900)]
Refactor cmake build structure
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>
Seungha Son [Wed, 6 Jan 2021 04:50:24 +0000 (13:50 +0900)]
Remove unnecessary return statement
Change-Id: I01aa139933210053b877fa0359e1eef295d10656
Signed-off-by: Seungha Son <seungha.son@samsung.com>
Seungha Son [Wed, 30 Dec 2020 04:35:03 +0000 (13:35 +0900)]
Remove static library
Change-Id: Ifb43d363f8d44f775f875e52063b4bf2041d08b9
Signed-off-by: Seungha Son <linuxias@gmail.com>
Seungha Son [Wed, 23 Dec 2020 09:18:39 +0000 (18:18 +0900)]
Change src, include reference command
Change-Id: I31e13550281bf52aaa9542a5045df09e443c7e0b
Signed-off-by: Seungha Son <linuxias@gmail.com>
Seungha Son [Mon, 9 Nov 2020 04:46:00 +0000 (04:46 +0000)]
Merge "Add Requires=local-fs.target and After=local-fs.target to ttrace-marker.service" into tizen
Seungha Son [Tue, 13 Oct 2020 08:01:29 +0000 (17:01 +0900)]
Adjust coverage measure
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>
INSUN PYO [Thu, 8 Oct 2020 09:33:04 +0000 (18:33 +0900)]
Add Requires=local-fs.target and After=local-fs.target to ttrace-marker.service
Those dependencies prevent ttrace-marker.service from running in emergency mode,
because local-fs.target always fails in emergency mode.
Change-Id: I770d2a9b477831bc9c571c925c0ceb89b16829e4
Seungha Son [Mon, 5 Oct 2020 09:30:34 +0000 (18:30 +0900)]
Adjust gtest skeleton
Change-Id: I6fdc2ce6ac49700395d0758ab2b93c76e11069c6
Signed-off-by: Seungha Son <seungha.son@samsung.com>
Seungha Son [Thu, 24 Sep 2020 05:13:35 +0000 (14:13 +0900)]
Release version 1.1.0
- 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>
Seungha Son [Tue, 22 Sep 2020 06:55:37 +0000 (15:55 +0900)]
Split atrace, atrace-helper CMakeLists.txt
Change-Id: Iaebd60a6feb8687f608cf1781974e9dacb2fe2e3
Signed-off-by: Seungha Son <seungha.son@samsung.com>
Seungha Son [Fri, 18 Sep 2020 10:56:54 +0000 (19:56 +0900)]
Arrange version management
Change-Id: I42931c88e1d7a7a33db9a59062e6278c73a871c8
Signed-off-by: Seungha Son <seungha.son@samsung.com>
INSUN PYO [Fri, 11 Sep 2020 07:34:21 +0000 (16:34 +0900)]
Add RemainAfterExit=yes to ttrace-marker.service
Once started, this service never runs twice.
Change-Id: Ic21b1f36467ce27cfd15ed0cede47b520735a522
Seungha Son [Wed, 9 Sep 2020 05:30:18 +0000 (14:30 +0900)]
Fix API reference header issues
- 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>
Seungha Son [Tue, 25 Aug 2020 01:06:44 +0000 (10:06 +0900)]
Remove unnecessary white space
Change-Id: I2fa33741c06a286968dc4c38d0e1a69202e93279
Signed-off-by: Seungha Son <seungha.son@samsung.com>
Seungha Son [Mon, 20 Jul 2020 09:53:42 +0000 (18:53 +0900)]
Change method to link library
Change-Id: Ib02e1fc6381dfe6f7a00561307d30119b78e4eca
Signed-off-by: Seungha Son <seungha.son@samsung.com>
sattdeepan.d [Wed, 17 Jun 2020 12:09:01 +0000 (17:39 +0530)]
svace security issue fix
Change-Id: I85b4c82a96e42d3a08acd1ec3f2f25742205aa4e
Signed-off-by: Seungha Son <seungha.son@samsung.com>
sattdeepan.d [Fri, 15 May 2020 05:58:03 +0000 (11:28 +0530)]
Fix SVACE issue
Fix an incorrect declaration to free the array unique_ptr.
Change-Id: I863708576482584156cd37f8e21aa824bdc7abb7
Seungha Son [Tue, 28 Apr 2020 04:29:50 +0000 (13:29 +0900)]
Fix svace issue
Change-Id: I84e8343338f07a8e2a9e817e1ccca221c98aeff6
Signed-off-by: Seungha Son <seungha.son@samsung.com>
Seungha Son [Wed, 22 Apr 2020 05:27:38 +0000 (14:27 +0900)]
Add LICENSE for atrace_helper
Change-Id: Ice751dae71952b2fa2452cb301a91eb4b28fa5e2
Signed-off-by: Seungha Son <seungha.son@samsung.com>
Seungha Son [Thu, 9 Apr 2020 23:54:15 +0000 (08:54 +0900)]
Fix build warning
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>
Seungha Son [Wed, 1 Apr 2020 01:35:13 +0000 (10:35 +0900)]
Add atrace-helper module
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>
Seungha Son [Tue, 7 Apr 2020 01:38:42 +0000 (10:38 +0900)]
Refactor resource managements
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>
Seungha Son [Fri, 3 Apr 2020 08:35:27 +0000 (17:35 +0900)]
Change error check order
Change-Id: I0bc2f11b1dff501b8dcfc84bbbad166a8a5d1b64
Signed-off-by: Seungha Son <seungha.son@samsung.com>
Seungha Son [Thu, 2 Apr 2020 11:40:22 +0000 (20:40 +0900)]
Improve logic for setting trace clock
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>
Seungha Son [Thu, 2 Apr 2020 06:17:28 +0000 (15:17 +0900)]
Change 0 or NULL to nullptr
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>
Seungha Son [Tue, 24 Mar 2020 07:08:08 +0000 (16:08 +0900)]
Add additional system events
Add events based on kernel version 4.19.81.
Change-Id: I4b96d790b518dff794c5b2b06d6556e882d8b0c6
Signed-off-by: Seungha Son <seungha.son@samsung.com>
Changjoon Baek [Mon, 1 Jul 2019 04:54:33 +0000 (04:54 +0000)]
Merge "make a gcov package for measuring coverage easier" into tizen
joon.c.baek [Fri, 28 Jun 2019 02:30:40 +0000 (11:30 +0900)]
make a gcov package for measuring coverage easier
Change-Id: I8bc65b1d0767ad5cc940d6ebdb31cd622fca4c6f
Signed-off-by: joon.c.baek <joon.c.baek@samsung.com>
joon.c.baek [Fri, 28 Jun 2019 02:30:40 +0000 (11:30 +0900)]
make a gcov package for measuring coverage easier
Change-Id: I8bc65b1d0767ad5cc940d6ebdb31cd622fca4c6f
Signed-off-by: joon.c.baek <joon.c.baek@samsung.com>
joon.c.baek [Tue, 10 Jul 2018 06:52:57 +0000 (15:52 +0900)]
Add condition and change options for tracefs
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>
joon.c.baek [Mon, 9 Jul 2018 12:23:11 +0000 (21:23 +0900)]
Revert "Remove sys-kernel-debug-tracing.mount"
'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
joon.c.baek [Mon, 9 Jul 2018 01:06:36 +0000 (10:06 +0900)]
Resolve the service failed of ttrace-marker.service
When ttrace-marker.service is executed twice,
Second execution makes service failed because of
already generated tag file what generated correctly.
So, In this case(founding existed tag file)
initEnabledTagFile() will return true.
Change-Id: Ie4dbee288b1b8daa1231513a8be62bc6884e438b
Signed-off-by: joon.c.baek <joon.c.baek@samsung.com>
joon.c.baek [Thu, 28 Jun 2018 10:14:55 +0000 (19:14 +0900)]
Remove sys-kernel-debug-tracing.mount
Change-Id: I8f549274fcc65c8a4fb8c5f1c289874c281ed964
Signed-off-by: joon.c.baek <joon.c.baek@samsung.com>
joon.c.baek [Mon, 27 Nov 2017 04:46:49 +0000 (13:46 +0900)]
Change permission of /tmp/ttrace_tag and service
- Change permisstion of /tmp/ttrace_tag
root -> system_fw
- Assign User/Group to ttrace-marker.service
root -> system_fw
Change-Id: Ic48b0cfd347f56da2a052511e9e37edac539d033
Signed-off-by: joon.c.baek <joon.c.baek@samsung.com>
joon.c.baek [Wed, 22 Nov 2017 09:56:57 +0000 (18:56 +0900)]
Add sys-kernel-debug-tracing.mount file
- Add sys-kernel-debug-tracing.mount to replace
sys-kernel.tracing.service.
- This file can mount tracefs without
/bin/touch executable.
Change-Id: I035fc08243c95b09c39a70c46acecc758d7c7d1b
Signed-off-by: joon.c.baek <joon.c.baek@samsung.com>
joon.c.baek [Fri, 29 Sep 2017 01:45:07 +0000 (10:45 +0900)]
Reomve capabilities in sys-kernel-tracing.service
Assigning capabilities to sys-kernel-tracing.service causes
fail in Odroid U3+, Raspberry Pi3 at Tizen:Unified(5.0).
To resolve this issue, remove capabilities on tizen branch.
Change-Id: I437d1f005703c0ab6bc6e01aeaf5315138b47cbb
Signed-off-by: joon.c.baek <joon.c.baek@samsung.com>
joon.c.baek [Tue, 19 Sep 2017 03:09:44 +0000 (12:09 +0900)]
Assign capabilities 'cap_dac_override' to service
'cap_dac_override' capabilities used inteaded of
root permission of sys-kernel-tracing.service.
Change-Id: I71870eab4c2a32ac3a904f9713f0cb73a2295126
Signed-off-by: joon.c.baek <joon.c.baek@samsung.com>
joon.c.baek [Thu, 14 Sep 2017 07:51:37 +0000 (16:51 +0900)]
Align indentation and remove build warning
Used invalid type in printf(), change to correct type.
Many code lines did keep a indentation,
aligned indent for all of source codes.
Change-Id: I7cc0438d061c734b5356accd9ff9ff0801f64ff6
joon.c.baek [Thu, 14 Sep 2017 07:45:41 +0000 (16:45 +0900)]
Resolve vulnerability about untrusted string
The sceanario of bootup-trace has vulnerability about
untrusted string loaded and execution.
This patch changes how to execution and remove system() calling.
And change open permission 0666 to 0600.
Change-Id: Ibfc19a9c8c7ef43af084e8d6b7496bf59c12dfe5
Signed-off-by: joon.c.baek <joon.c.baek@samsung.com>
joon.c.baek [Thu, 14 Sep 2017 02:22:36 +0000 (11:22 +0900)]
Set Smack label to ttrace-marker.service
Add SmackProcessLabel=System at ttrace-marker.service.
Without this label,
ttrace-marker.service will be worked as System::Privileged,
This service is enough with System label.
Change-Id: I8d588822713a7c7a376f4cbc24e870f3c33bfdbd
Signed-off-by: joon.c.baek <joon.c.baek@samsung.com>
Gihun Chang [Tue, 1 Aug 2017 02:46:09 +0000 (11:46 +0900)]
Remove build warnings with GCC 6.2
*For implicit declaration of function [-Wimplicit-function-declaration]
. Add #include <stdio.h> prior to use of the function vsnprintf.
*For Unused bariable [-Wunused-variable]
. Remove it. Really Unused.
. bufSize, buf, ret
*For Ignoring return value of func() [-Wunused-result]
. Remove the use of function by https://review.tizen.org/gerrit/#/c/124677/
Change-Id: I7e376cfc30078832141128d10b2e44cd598b9b56
Gihun Chang [Tue, 1 Aug 2017 02:34:51 +0000 (11:34 +0900)]
Revert "Remove build warnings with gcc 6.2"
This reverts commit
f4dc8f8166d34463ac1cbe4750fcadf5f364fc83.
Change-Id: Ic13032fd562ef5b124e223bada29bd57f89f6b8b
Gihun Chang [Mon, 31 Jul 2017 23:36:54 +0000 (23:36 +0000)]
Merge "Remove meaningless codes" into tizen
Gihun Chang [Mon, 5 Jun 2017 01:28:15 +0000 (01:28 +0000)]
Merge "Remove build warnings with gcc 6.2" into tizen
Changjoon Baek [Thu, 1 Jun 2017 12:37:23 +0000 (21:37 +0900)]
Add traceFS mount service and adjust service order
4.x kernel splited traceFS and debugFS.
/sys/kernel/debug/tracing and /tmp should be mounted before
ttrace-marker.service started.
- Add sys-kernel-tracing.service to mount tracefs to /sys/kernel/debug/tracing
- Adjust ttrace-marker.service order to be after the sys-kernel-tracing.service
Change-Id: I48f08bb8d4a31fa24b8508307812241a6fcb73b6
Signed-off-by: Changjoon Baek <joon.c.baek@samsung.com>
Gihun Chang [Tue, 30 May 2017 08:35:23 +0000 (17:35 +0900)]
Remove build warnings with gcc 6.2
* warning: implicit declaration of function 'vsnprintf'
[-Wimplicit-function-declaration]
* warning: ignoring return value of 'int system(const char*)',
declared with attribute warn_unused_result [-Wunused-result]
Change-Id: Ie400cc8fea6b99d08ab935198b60ec1767ac75c6
Changjoon Baek [Fri, 19 May 2017 03:39:36 +0000 (12:39 +0900)]
Apply %license macro
Remove manual copy for license file in spec
Change-Id: Ie3288252dcf5f667d1bc3524439685d29fc18bfb
Signed-off-by: Changjoon Baek <joon.c.baek@samsung.com>
Changjoon Baek [Wed, 12 Apr 2017 05:50:10 +0000 (14:50 +0900)]
Remove meaningless codes
tracing_init_dentry() auto-mount tracefs in kernel 4.10.x.
This initializing is triggered fs_initcall.
So, Removed code in this commit is meaningless.
Change-Id: I9ae499131d6f7a8d2dd6e6c2c2d09e33585e3bf6
Signed-off-by: Changjoon Baek <joon.c.baek@samsung.com>
Changjoon Baek [Tue, 7 Mar 2017 06:45:15 +0000 (15:45 +0900)]
Apply Tizen 3.0 Smack policy to ttrace pkg
Change smack labeling to using systemd tmpfiles
instead of set_smacklabel() initializing
Change-Id: I0e44ea62200929804c745175f73cd469b9b4623e
Signed-off-by: Changjoon Baek <joon.c.baek@samsung.com>
Gihun Chang [Thu, 2 Feb 2017 23:00:06 +0000 (15:00 -0800)]
Merge "Prepare for Tizen 4.0 Build" into tizen
Rafal Krypa [Fri, 30 Sep 2016 10:27:33 +0000 (12:27 +0200)]
Replace usage of deprecated libsmack function
The libsmack function smack_setlabel is deprecated and will be removed.
Using the alternative instead.
Change-Id: Ia02383700175ba1e4eb91c85e4aa17c4033290f6
Signed-off-by: Rafal Krypa <r.krypa@samsung.com>
MyungJoo Ham [Fri, 13 Jan 2017 05:30:35 +0000 (14:30 +0900)]
Prepare for Tizen 4.0 Build
I've assumed that Tizen 4.0 code is going to be more similar with 3.0
than 2.0.
Please do not rely on string == compare for version check.
Change-Id: I7465a0b1cd26de939f60190cf8e2227aa1e9e763
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Gihun Chang [Thu, 12 Jan 2017 10:04:01 +0000 (19:04 +0900)]
Update support version of werable profile (3.0 -> 2.3.2)
Change-Id: Icac243d8093e0460d74267d2a59e0e82c897163a
Gihun Chang [Fri, 23 Dec 2016 02:37:31 +0000 (11:37 +0900)]
Merge branch 'tizen_3.0' into 'tizen'
Gihun Chang [Thu, 22 Dec 2016 02:05:43 +0000 (11:05 +0900)]
Update T-Trace version to 1.0.3
Change-Id: Ibdc1cef11acc258bfed7e61303b648ace77bfd1f
Gihun Chang [Thu, 22 Dec 2016 02:04:20 +0000 (11:04 +0900)]
Formatting help message
Change-Id: I4a0f580006ae18cc55901f912fc11ad999f5f3be
Changjoon Baek [Mon, 19 Dec 2016 09:56:38 +0000 (18:56 +0900)]
Remove dependancy with libstdc++
The dependancy with libstdc++ existed meaningless.
Remove depandancy using "-fno-exceptions" option.
Change-Id: I405922988bccebf5760be58586f98f5a392b319e
Signed-off-by: Changjoon Baek <joon.c.baek@samsung.com>
Gihun Chang [Fri, 16 Dec 2016 08:18:26 +0000 (17:18 +0900)]
Fix side effect on previous commit
Change-Id: Ice3dd142bb38b15fa331157d2b6b0ef9dd106b8e
Gihun Chang [Thu, 15 Dec 2016 04:56:51 +0000 (13:56 +0900)]
Fix message overflow
Change-Id: Iaa3a46b5d6550e02d3d5ea66d0213e44a2048779
Changjoon Baek [Mon, 5 Dec 2016 04:14:10 +0000 (13:14 +0900)]
Use absolute path for execlp()
Attacker can exploit by modified 'PATH' environment.
Excuting system command have to use absolute path.
Change-Id: Ided661e83c072684524c5ab8b73fc89db9842e13
Signed-off-by: Changjoon Baek <joon.c.baek@samsung.com>
Changjoon Baek [Mon, 5 Dec 2016 04:14:10 +0000 (13:14 +0900)]
Use absolute path for execlp()
Attacker can exploit by modified 'PATH' environment.
Excuting system command have to use absolute path.
Change-Id: Ided661e83c072684524c5ab8b73fc89db9842e13
Signed-off-by: Changjoon Baek <joon.c.baek@samsung.com>
Gihun Chang [Wed, 23 Nov 2016 09:41:18 +0000 (18:41 +0900)]
Merge branch 'tizen' into tizen_3.0
Gihun Chang [Tue, 22 Nov 2016 05:57:36 +0000 (14:57 +0900)]
Sync the package version with csapi.
Change-Id: I179c4e25b033533004765661986b37078bd91c6f
Signed-off-by: Gihun Chang <gihun.chang@samsung.com>
Gihun Chang [Tue, 22 Nov 2016 05:50:20 +0000 (14:50 +0900)]
Skip the initialization of kernel event when atrace run with --append option.
Change-Id: I49fcc426b831cb28b951d0133d2bd61f6c478a8f
Signed-off-by: Gihun Chang <gihun.chang@samsung.com>
Changjoon Baek [Wed, 16 Nov 2016 08:03:32 +0000 (17:03 +0900)]
Add destructor to libttrace
T-trace doesn't considering the case of dlclose().
If some package that use traceBegin, traceEnd call
dlopen(), dlclose() repeatly,
happen fd leakage at ttrace_tmp, trace_marker.
So, Add destructor function libttrace_fini()
that close all of opened file descriptor.
Change-Id: I6431b404827d160adb8176eefd7bd7f4fce620ef
Signed-off-by: Changjoon Baek <joon.c.baek@samsung.com>
Changjoon Baek [Tue, 23 Aug 2016 09:37:05 +0000 (18:37 +0900)]
Remove codes related with Android
T-trace forked from Android project.
Codes that related with the Android platform
remained at atrace.cpp.
Remove unused code at the Tizen platform
to enhance readability, maintainance.
Change-Id: Ifc926115dd5a64e1be47f7d23d457f35dd849f62
Signed-off-by: Changjoon Baek <joon.c.baek@samsung.com>
Gihun Chang [Wed, 2 Nov 2016 23:52:28 +0000 (08:52 +0900)]
Merge branch 'tizen' into tizen_3.0
Changjoon Baek [Fri, 21 Oct 2016 01:43:20 +0000 (10:43 +0900)]
Remove usages of extension functions
Remove usages of extension functions
to prevent accessing to uninitialized fd(trace_marker).
T-trace check whether initialing by isTagEnabled(),
However, g_extension_state can permit accessing to
uninitialized fd at all of write().
And, extension feature was not used anymore.
Additionally,
Use TTRACE_LOG() instead of fprintf(),
remove useless spaces for clean codes.
Change-Id: Iacf9f899378b4d9fb29f639f475e6624cee08d66
Signed-off-by: Changjoon Baek <joon.c.baek@samsung.com>
Gihun Chang [Thu, 13 Oct 2016 08:54:19 +0000 (01:54 -0700)]
Merge "Add defence codes to prevent unexpected behavior" into tizen
Changjoon Baek [Tue, 11 Oct 2016 12:59:57 +0000 (21:59 +0900)]
Add defence codes to prevent unexpected behavior
Check parameters of write system call
(buf, len, fd)
If find out currupted parameters,
return immediately.
Change-Id: I035223f3f2d2a07c877872e7a24db158d77a35b3
Signed-off-by: Changjoon Baek <joon.c.baek@samsung.com>
Changjoon Baek [Thu, 25 Aug 2016 06:18:48 +0000 (15:18 +0900)]
Applied APACHE2.0 boilerplate notice to .c files
Applied APACHE2.0 boilerplate notice to trace.c, ttrace.c,
These files had owned older SLP boilerplate.
It should be replaced.
Change-Id: Ib064f2552c510d6a3352a631efe3bff395c4d05d
Signed-off-by: Changjoon Baek <joon.c.baek@samsung.com>
Gihun Chang [Wed, 31 Aug 2016 01:42:25 +0000 (18:42 -0700)]
Merge "Add comment in spec file to avoid misunderstandings" into tizen
Jonghwa Lee [Mon, 29 Aug 2016 08:20:03 +0000 (01:20 -0700)]
Merge "Rename 'TTRACE_TAG_DEBUG' to 'TTRACE_TAG_PERFTEST'" into tizen
MyungJoo Ham [Mon, 29 Aug 2016 08:09:25 +0000 (17:09 +0900)]
Add comment in spec file to avoid misunderstandings
The build macro "tizen_profile_name" is not used in Tizen.org OBS
(build.tizen.org), but it can be used by vendors to enable
optional features.
This patch clarifies that such a macro is not for Tizen.org OBS.
Change-Id: I43bc94b0d29c429d6021efff27a667a4b3c5644f
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Jonghwa Lee [Thu, 25 Aug 2016 05:26:45 +0000 (14:26 +0900)]
Rename 'TTRACE_TAG_DEBUG' to 'TTRACE_TAG_PERFTEST'
Change-Id: Ic0053ad161feed30fe29c99884489192f8b3b7ab
Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
Changjoon Baek [Tue, 23 Aug 2016 09:15:19 +0000 (18:15 +0900)]
Add '-e' option to exclude specific tags.
Add '-e' option to exclude specific tags,
for example, If you don't want to see 'wm' tag,
$ atrace -e wm
Also, 'am', 'gfx' tags
$ atrace -e wm -e am -e gfx
Change-Id: I94f0af6a52876a870a65301ae0a70a95ad751c10
Signed-off-by: Changjoon Baek <joon.c.baek@samsung.com>
Jonghwa Lee [Thu, 18 Aug 2016 08:04:37 +0000 (17:04 +0900)]
Add extra tag TTRACE_TAG_DEBUG for TV profile.
For some specific demands, it adds extra tag 'DEBUG' for TV profile.
The tag will be used for logging miscellaneous stuff.
This tag is only avaliable on TV profile.
Change-Id: I81575e9bd0ebaaeb073bc1c6b48774f656a4a27a
Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
joon.c.baek [Mon, 8 Aug 2016 05:45:48 +0000 (14:45 +0900)]
Revert "Assign UID/GID"
This reverts commit
711777b1a5237d47e7fb94d9884ff93d71815872.
joon.c.baek [Mon, 8 Aug 2016 05:36:49 +0000 (14:36 +0900)]
Assign UID/GID
Change-Id: I785b755390f625e302117deab71c97bfa4f493a5
Signed-off-by: joon.c.baek <joon.c.baek@samsung.com>
jin-gyu.kim [Thu, 21 Jul 2016 01:43:48 +0000 (10:43 +0900)]
Set SmackProcessLabel as System.
Change-Id: I0bd03aaadafd505808b4c21247c277cc283cdd63
Eunji, Lee [Tue, 5 Jul 2016 12:16:06 +0000 (21:16 +0900)]
change the logic of start/stop to prevent T-trace from writing to the locked buffer
print out error msg only if ttrace is running on debug mode
Change-Id: Ic1ee96dbb3a619cdf92187f2f5490b50b3781464
Eunji, Lee [Mon, 4 Jul 2016 10:06:12 +0000 (19:06 +0900)]
- add protection codes for preventing atrace from double initailization
- add protection codes for avoding tracing msg size overflow
Change-Id: I5415c94b5ed77c1fa805ff73d6d12fc10194085c
Signed-off-by: Eunji, Lee <eunjieji.lee@samsung.com>
Eunji, Lee [Tue, 28 Jun 2016 12:37:00 +0000 (21:37 +0900)]
add PATH environment to atrace-bootup.sh
Change-Id: I4ebcc3f05948405ce2078d77bbf2ca481e0f6a43
Signed-off-by: Eunji, Lee <eunjieji.lee@samsung.com>
Eunji, Lee [Mon, 13 Jun 2016 00:09:44 +0000 (09:09 +0900)]
remove redudant smack definitions
Change-Id: Ie566b7e95614c025d9bb7b572631af645f610940
Eunji, Lee [Tue, 7 Jun 2016 09:35:38 +0000 (18:35 +0900)]
organize build scripts
Change-Id: I369324d51d9684cdef17e662e85f09a349ff0785
Signed-off-by: Eunji, Lee <eunjieji.lee@samsung.com>
Eunji, Lee [Thu, 26 May 2016 07:01:51 +0000 (16:01 +0900)]
add ttrace_exension_write() call to trace APIs
Change-Id: Ia76b586c2ec8aae7482221a844c418971f6933e9
Signed-off-by: Eunji, Lee <eunjieji.lee@samsung.com>
Eunji, Lee [Tue, 24 May 2016 09:11:41 +0000 (18:11 +0900)]
Merge branch 'master' into tizen
Eunji, Lee [Tue, 24 May 2016 07:33:57 +0000 (16:33 +0900)]
Adds command to auto-mount tracingfs for enabling ttrace on linux kernel >= 4.1
Change-Id: I4ddecf29c4918a641c6940f2910ae2e93b8a3754
Signed-off-by: Eunji, Lee <eunjieji.lee@samsung.com>
Eunji, Lee [Tue, 10 May 2016 11:14:03 +0000 (20:14 +0900)]
Merge branch 'master' into tizen
Eunji, Lee [Tue, 10 May 2016 10:43:43 +0000 (19:43 +0900)]
increase default buf size to 1024 and add protection code for changes of _SC_GETGR_R_SIZE_MAX
Change-Id: I6abbe0da54442eb1172b0d611700b51d83c62e00
Eunji, Lee [Tue, 3 May 2016 07:51:53 +0000 (16:51 +0900)]
Merge branch 'master' into tizen
Eunji, Lee [Tue, 3 May 2016 07:33:51 +0000 (16:33 +0900)]
fix svace issue - PROC_USE.VULNERABLE
Change-Id: Iac00cf6c8efd6aebbcb3c8f5a3e3d09c2361fb9c
Eunji, Lee [Fri, 15 Apr 2016 09:07:38 +0000 (18:07 +0900)]
Merge branch 'master' into tizen
Eunji, Lee [Fri, 15 Apr 2016 05:34:32 +0000 (14:34 +0900)]
change group name to support latest tizen 3.0
Change-Id: I28ac6943b4eca24924cff0f5d8f2c57302a5df99
Eunji, Lee [Thu, 24 Mar 2016 01:58:18 +0000 (10:58 +0900)]
Merge branch 'master', remote-tracking branch 'origin/tizen' into tizen
Eunji, Lee [Wed, 23 Mar 2016 05:02:20 +0000 (14:02 +0900)]
modify public api version info for wearable profile
Change-Id: I0b1a65e24779aee8f01455bfe9275154c873b62f