Kichan Kwon [Mon, 27 Mar 2017 07:41:02 +0000 (16:41 +0900)]
proc-stat : record app's starttime and use it for getting cpu usage
- In previous approach, starttime is gotten from /proc/{pid}/stat
- But, this value can't guarantee time delta with current uptime
- In case of multicore environment
- Therefore, we will use the uptime when app is launched
- To use uptime to starttime, we will store this time
Change-Id: I86dab9bc261012686a1e92ed7c2b2bd3fdf5be47
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
Kichan Kwon [Fri, 19 May 2017 00:54:56 +0000 (09:54 +0900)]
Version up
Change-Id: Ibbb86b13a10adb2102b085d22016eacbed9fe061
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
Kichan Kwon [Tue, 2 May 2017 09:22:31 +0000 (18:22 +0900)]
Replace libdbus to gdbus
- For unification with other system modules using gdbus
- NOTICE : to use freezer, you must use latest libsystem-freezer
Change-Id: I28853c2065cddbb4a00674302d17670c6fc566ff
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
Kichan Kwon [Wed, 22 Mar 2017 11:04:21 +0000 (20:04 +0900)]
swap : make module to build without error
- Until now, swap module is not concerned (just disabled)
- However, it can be used vaulable in low memory
- In addition, it checks whether kernel supports force reclaim or not
- Regardless of force reclaim, you can use swap module
Change-Id: I3c6c41e3f40b5a1293bad91cfd3d628c148c9e36
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
Kichan Kwon [Tue, 11 Apr 2017 01:35:15 +0000 (10:35 +0900)]
Remove ecore dependency
- For resourced to be lighten
- Instead, we will use glib and libdbus
- ecore_fd_handler -> fd-handler (based on GIO)
- ecore_timer -> GSource (g_timeout)
- ecore_main_loop -> g_main_loop
- edbus -> libdbus (it is lighter than gdbus)
Change-Id: I85f0cdd0ca83438226d335a7860acea9e6ad4fb7
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
Kichan Kwon [Fri, 14 Apr 2017 05:07:07 +0000 (14:07 +0900)]
proc-stat : move something used by other modules to common header
Change-Id: Icd6c565e2306396af726a77f56515619c1c2bf9d
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
Kichan Kwon [Tue, 11 Apr 2017 02:12:07 +0000 (11:12 +0900)]
Allow building without memory module
- proc-stat uses the function of memory module, so build is failed
when memory module is disabled
- memory.conf will be included only if memory module is enabled
Change-Id: I58b7e250f9fed3774d606dd7ba8fd12b57ef6b9b
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
Kichan Kwon [Fri, 21 Apr 2017 07:09:39 +0000 (16:09 +0900)]
proc-stat : no more freeze app soon after it goes to the background state
- We want to give a time for apps to prepare for being frozen
- The app going to the background a moment ago will skip this process
Change-Id: Ib9f453beb6a96865e424651055318dec695887bc
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
Kichan Kwon [Thu, 20 Apr 2017 07:48:08 +0000 (16:48 +0900)]
Use %license macro
Change-Id: Id55a24875a0e34fcd9cfe00abad819b330093e04
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
Kichan Kwon [Wed, 19 Apr 2017 01:15:31 +0000 (10:15 +0900)]
Check valid range
- Use snprintf instead of sprintf
- Check positive pid and pgid
Change-Id: I147fb011bbfe3350c1aa57070d61d3de3771d99f
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
Kichan Kwon [Mon, 17 Apr 2017 08:23:47 +0000 (17:23 +0900)]
memory : remove "const" from memory_modules_ops
- Every module_ops.initalized is modified after their init is called
Change-Id: Iee0b55655c1e335c1c1aba5b953fbe266e0f799e
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
Kichan Kwon [Wed, 5 Apr 2017 07:13:47 +0000 (16:13 +0900)]
memory : use size_t instead of int
- To pass argument with resourced_notify, you should cast to (void *)
- However, in 64bit architecture, build is failed because
the size of (int) and (void *) is different
Change-Id: Ic7750e292b711777a31b9e80058baaff2b57dee4
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
Kichan Kwon [Wed, 5 Apr 2017 01:35:06 +0000 (10:35 +0900)]
Increase release number
Change-Id: I7eaeab83e74d769081b46fa84de453498d3da6cf
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
Kwon [Wed, 5 Apr 2017 01:33:14 +0000 (18:33 -0700)]
Merge "Revert "No more unmount cgroup directory before power off"" into tizen
Kunhoon Baik [Mon, 3 Apr 2017 09:03:45 +0000 (02:03 -0700)]
Revert "No more unmount cgroup directory before power off"
This reverts commit
e76a114e90e33a78408f5c04ad2eb35aca5b90d1.
This commit should be reconsidered
because systemd unit file cannot distinguish
between power-off SIGTERM and normal SIGTERM.
For example, deviced sends SIGTERM
when a process do not close fd using a file in SD-CARD
during the SD-card is removed / unmounted.
Deviced also sends SIGTERM during a power-off for unmounting /opt/usr.
Thus, a process cannot distiguish the situation with systemd unit.
As a result,
another solution for stopping service-restart during power-off
should be considered. (like modifying systemd or faultd)
Until the time, resourced's original solution should be kept.
cf) Solving the power-off animation problem,
deviced should wait to start "power-off animation service".
Change-Id: I5f271a427109cdf26847411f8dc1cea91742d2f9
Kichan Kwon [Mon, 21 Nov 2016 09:19:23 +0000 (18:19 +0900)]
memory : LMK refactoring.
- Find victims not in the memory cgroup but proc_app_list
- Make LMK worker in thread and resourced requests reclaim with enqueue
- Unify (eng/user) conf files
- Restore memcg when resourced is restarted
- Apply new cgroup hierarchy
"/" : root cgroup
"/Apps" : all apps and services managed by Tizen
"/MemLimit" : apps with set memory limit
"/Swap" : swapped and reclaimed (if swap module is enabled)
"/system.slice" : services managed by systemd
Change-Id: I7ef459ad98ad9c765897fd2e4d8593e006c43a32
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
Kichan Kwon [Thu, 16 Feb 2017 05:09:39 +0000 (14:09 +0900)]
Fix memory issues
Change-Id: I2186547b4207c8313e0a269617840a86c5d15789
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
Kichan Kwon [Wed, 22 Mar 2017 10:19:57 +0000 (19:19 +0900)]
cpu : no more restrict CPU usage of media service app
- Media service apps can make a sound in background
- If these apps use limited CPU usage, sound distortion can be occurred
- Apps having media bg category will not be restricted
Change-Id: I9a6c1efc1e2169a1ccb0da6f61891837521feeef
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
Kichan Kwon [Thu, 9 Mar 2017 05:00:21 +0000 (14:00 +0900)]
heart : remove unused static const variable
- Before gcc6, not used static const variable isn't be warned
- But, gcc6x compiler introduces -Wunused-const-variable with returning error
Change-Id: I85fc2615cf6e6b4b8421e00d3da7fdd8e90b2a05
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
Kichan Kwon [Tue, 7 Mar 2017 05:41:29 +0000 (14:41 +0900)]
heart : insert table after making
- This routine is for multi-user scenario (new user is added)
Change-Id: I33078113aef6d14382c910259930abb28d0dcd47
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
Kichan Kwon [Fri, 17 Feb 2017 00:59:17 +0000 (09:59 +0900)]
No more unmount cgroup directory before power off
- Sometimes power off animation is not shown because
systemd can't control after cgroup unmount
- Notice : if some apps are infinitely restarted,
their service file should be modified
Change-Id: Ic4d3700c90ffbfb4b1743fb6c73116d5cce0d200
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
Kichan Kwon [Mon, 20 Feb 2017 10:29:45 +0000 (19:29 +0900)]
Merge branch 'tizen_3.0' into tizen
Change-Id: I5af804e7f0c19044071d805096102f72b2462d15
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
Kichan Kwon [Thu, 26 Jan 2017 05:19:57 +0000 (14:19 +0900)]
heart : update DB to modify appid after grouping
- After grouping, child will be considered to parent
- Therefore, appid in DB should also be changed
Change-Id: Ia205631af711f1573b0d5c7fa6363745cfee3b71
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
MyungJoo Ham [Wed, 2 Nov 2016 05:07:48 +0000 (14:07 +0900)]
Make resourced-light package
- In current, resourced-light just excludes HEART module
Change-Id: Ib239bdd85e33b0efc6cf72145f87129e77e8b433
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
[Bug fix, simplify package]
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
Kichan Kwon [Fri, 20 Jan 2017 01:06:51 +0000 (10:06 +0900)]
heart : set to static function using static variable
Change-Id: I9e6434c33a324b75d562daa5970178ffcdc71eb8
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
Kichan Kwon [Wed, 18 Jan 2017 01:00:54 +0000 (10:00 +0900)]
Fix for gnu11 compiler
- Set to static function using static variable
- Replace deprecated readdir_r to readdir
Change-Id: I13473f8e984376d56a71b97dc06c04a95311e930
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
Kichan Kwon [Fri, 30 Dec 2016 08:01:18 +0000 (17:01 +0900)]
Fix Tizen coding rule
Change-Id: Ia22c4efed664898d786cde7e619d5fa53b915af2
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
Kichan Kwon [Thu, 29 Dec 2016 05:05:37 +0000 (14:05 +0900)]
proc-stat : remove clearly after grouping
- When application is grouped, grouped app info is removed
- But, each ppi has a list pointing pai
- Therefore, ppi also should be processed when pai is removed
- proc_remove_app_info will do appropriately
Change-Id: Ib1a1dde61302be37f272ca1407e3c9ab4a446b85
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
Kichan Kwon [Thu, 29 Dec 2016 02:44:59 +0000 (11:44 +0900)]
Replace strerror_r() to '%m'.
- strerror_r() always need additional buffer
- We don't have to declare buffer by using '%m'
Change-Id: I326a306d15b1d74360b4264ff99024b5b7a6fb43
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
Kichan Kwon [Fri, 13 Jan 2017 02:05:52 +0000 (11:05 +0900)]
Merge branch 'tizen_3.0' into tizen
Change-Id: I6fcfd62968c45276ba202605f73f000c685af1a3
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
Kichan Kwon [Thu, 5 Jan 2017 06:27:45 +0000 (15:27 +0900)]
heart : fix argument
Change-Id: Ib8a342468847a5a9ff412cfcd98fcd94a18a8a04
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
Kichan Kwon [Wed, 4 Jan 2017 05:27:51 +0000 (14:27 +0900)]
heart : sync thread no more reply D-Bus message
- D-Bus methods using same path are not thread-safe
- Sync thread will invoke main thread to finish its work by using pipe
Change-Id: I81f917a7abc905aa483b19e465564012744f4e5d
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
Kichan Kwon [Thu, 29 Dec 2016 04:25:14 +0000 (13:25 +0900)]
Merge branch 'tizen_3.0' into tizen
Change-Id: I9c66ded00e187a68b52c13334dc6c1732d1b0933
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
Kichan Kwon [Tue, 27 Dec 2016 01:05:57 +0000 (10:05 +0900)]
heart : pull out DB size checking statement
Change-Id: I0e420c64c14bbcb8864d6509bf6172ab3c04b4f5
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
Kichan Kwon [Wed, 21 Dec 2016 08:25:20 +0000 (17:25 +0900)]
Fix timing issues
- No more use constructor for userinfo-list
- When resourced starts, gumd may not be ready
- No more create user DB after initialization
- There is no scenario about new user
- Unify update and data threads
- These threads can access DB simultaneously
Change-Id: I119c33b138cfb62c30f03b9ecc5b9e7538842a83
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
Kichan Kwon [Wed, 21 Dec 2016 08:10:31 +0000 (17:10 +0900)]
heart : add dbus method about HEART-CPU sync
- org.tizen.resourced.logging.SyncCpuData
- It will update cache and write into the DB
- Return value : 0(success), -1(fail), TID(running)
Change-Id: Ic7fc4b8f3dc86a4b6ccd38ee1db7e2789b8e9589
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
Kichan Kwon [Tue, 20 Dec 2016 06:35:17 +0000 (15:35 +0900)]
Check memory allocation failure
- In addition, repeated error code is removed
Change-Id: I34a21445a5cffe07c1a44c83b457c47b614f9de0
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
Kichan Kwon [Fri, 16 Dec 2016 04:45:09 +0000 (13:45 +0900)]
proc-stat : create app info only if both appid and pkgid are existed
- Each app should have appid and pkgid
Change-Id: Ibc3ba0b9a30ae184d373ee5c7bdba6783e28d68d
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
Kichan Kwon [Wed, 14 Dec 2016 06:25:03 +0000 (15:25 +0900)]
Improve stability
- No more update user list when it is needed
- In current, there is no scenario about adding new users
- Wait data thread for writing before storing to HEART DB
- Remove program list of subordinated app
- Check array size before remove it
Change-Id: If08ad5b55faf1103f20c2f2d379b5d7dc53d9f98
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
Kunhoon Baik [Wed, 14 Dec 2016 14:26:33 +0000 (23:26 +0900)]
Allow ProcExclude signal without privilege
- To allow the request of Minicontroller
Rollback to original Mr.Kwon's patch : https://review.tizen.org/gerrit/#/c/103884/1
Change-Id: I1d6043c8388c14bdf636157288922dc6df2a3a24
Kunhoon Baik [Wed, 14 Dec 2016 13:59:44 +0000 (05:59 -0800)]
Merge "Revert "Allow ProcExclude signal without privilege"" into tizen_3.0
Kunhoon Baik [Wed, 14 Dec 2016 13:57:00 +0000 (05:57 -0800)]
Revert "Allow ProcExclude signal without privilege"
This reverts commit
73b906e4714db967fa6438260c3fa020e67d71a7.
Change-Id: I92b71689d87c4541aa4933aaecb19ed2f14d1255
Kichan Kwon [Wed, 7 Dec 2016 11:20:05 +0000 (20:20 +0900)]
Fix memory leak and invalid access
Change-Id: I8561972e584233fd417d84a8850293e6c666f306
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
Kichan Kwon [Tue, 13 Dec 2016 02:13:56 +0000 (11:13 +0900)]
proc-stat : fix invalid unlock
- If proc_app_list is closed without open, lock issue will occurred
- To prevent this situation, checking code is included
Change-Id: I63950ec05350ad74e03acdf398c5901e4fe9c8bc
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
Kichan Kwon [Thu, 8 Dec 2016 06:47:04 +0000 (15:47 +0900)]
common : userinfo-list refactoring
- At a time, only one user_list is existed
- Each module using this no more have to worry about memory leak
- Replace from hash table to array because few user is existed in current
Change-Id: I152915072025afd9ecb898a8077bd99f5f281cfc
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
Kichan Kwon [Sat, 10 Dec 2016 06:10:02 +0000 (15:10 +0900)]
Replace strerror to strerror_r
- strerror is not thread-safe
- Size of buffer is decided to usually used
Change-Id: Icef5a5605e4347d65a634a0088445e07721b23d8
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
Kichan Kwon [Thu, 24 Nov 2016 08:00:31 +0000 (17:00 +0900)]
common : clean up DBusError
- Define cleanup function
- Remove unused variable
Change-Id: I11ff0af7ffd55d47f3b0eccdbde652ec243493fe
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
Kichan Kwon [Thu, 24 Nov 2016 07:30:04 +0000 (16:30 +0900)]
proc-stat : improve stability about controlling proc_app_list.
- Add handle for prelaunch app
- Rename child pid handling api properly
- Do not overwrite flags and categories of app_info
Change-Id: I43ccf642d5f5e07e50c04edbfee08f45045c4599
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
Kichan Kwon [Wed, 23 Nov 2016 10:59:00 +0000 (19:59 +0900)]
Simplify CMakefile
- Remove unnecessary resourced-cpucgroup.service
- Use GLOB instead of declaring all files
- Exclude swap source file when swap module is disabled
Change-Id: I8388b866f1337af462a32ccfc54d64c210526e46
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
Kichan Kwon [Mon, 21 Nov 2016 05:41:19 +0000 (14:41 +0900)]
common : separate cgroup integer function with uint and int
- Some numbers like pid should be written to unsigned int
Change-Id: Id34e1395974afd7526e1d92bb2dcfef4a2fd4f84
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
Kichan Kwon [Sat, 10 Dec 2016 04:58:48 +0000 (13:58 +0900)]
Allow ProcExclude signal without privilege
- To allow the request of Minicontroller
Change-Id: Iebaf678f2069b65216aeed3f311efbbfd5781b96
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
Kichan Kwon [Wed, 7 Dec 2016 00:44:47 +0000 (09:44 +0900)]
heart : remove heart-appopt
- No longer used
- In addition, from now, all HEART sub-modules will be listed in the HEART conf file
Change-Id: Ibc8c252c8d2359084261cc7abe6e89a8e0faa266
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
Kichan Kwon [Tue, 6 Dec 2016 07:43:19 +0000 (16:43 +0900)]
heart : fix wrong battery indexing
- When current index is 0, then temp index should be INDEX_WINDOW_SIZE - 1
- However, temp is set to 0, so we have to fix it
- Meanwhile, some comments and logs are modified
Change-Id: Iefe85b2f3b4987cb4dec9d034b16a626d70f0a58
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
Kichan Kwon [Mon, 5 Dec 2016 11:00:53 +0000 (20:00 +0900)]
heart : detach async DB updating
- LevelDB is not thread-safe
Change-Id: I845246c7041a120c8e710ce52c9c554732c0e012
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
Kichan Kwon [Fri, 25 Nov 2016 05:50:35 +0000 (14:50 +0900)]
heart : upgrade HEART-battery
1) Stability
- Use enum for charger status instead of integer
- Fix memory leak
- Asynchronous (level)DB updating
2) New function
- Discharge rate : HIGH(1.2x~), LOW(~0.8x), compare with predicted rate
- New logic for battery remaining time estimation
- Calculate SOE(State Of Energy) decreasing rate
- SOE is considered to the integral of OCP(Open-Circuit Potential)
- To use new logic, vendor have to support battery capacity and OCV coefficients
Change-Id: Ic80073028d8fde16980a53d8cb550023b56cb8b8
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
Kichan Kwon [Mon, 5 Dec 2016 04:57:00 +0000 (13:57 +0900)]
heart : fix minor issues
- Fix memory leak
- Remove unreachable code
- Fix cache searching condition
Change-Id: Ia91f07461afa7a759899533276717ec2c175dfc0
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
Kichan Kwon [Mon, 28 Nov 2016 00:57:20 +0000 (09:57 +0900)]
Fix minor issues
- Check memory allocation
- Initialize variables
Change-Id: I733751b3efd7042de73c6f8656421a1a4d0c4971
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
Sunmin Lee [Fri, 2 Dec 2016 08:53:54 +0000 (17:53 +0900)]
Upgrade: set RW update script number
Change-Id: I77e66fb8cfd9cf19111af2e2dad91e5868fc313e
[Rebase]
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
Sunmin Lee [Wed, 30 Nov 2016 06:08:10 +0000 (15:08 +0900)]
Upgrade: omit RO update commands in upgrade script
The change of RO partition is dealt with in different way.
There is no need to make change of RO in RW update script.
Change-Id: Icefcec01219c59e65cf954438290bffe529e8304
Signed-off-by: taeyoung <ty317.kim@samsung.com>
[Remove exclude list file from upgrade path]
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
lokilee73 [Mon, 21 Nov 2016 14:02:49 +0000 (23:02 +0900)]
proc-stat : fix about ANR popup signal
- Fix signal name and dbus format
Change-Id: I297eef44a45823631041be17e6e27f18e17e2af0
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
[Modify comment]
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
Kunhoon Baik [Mon, 14 Nov 2016 13:08:29 +0000 (22:08 +0900)]
Bug Fix & Minor code changes
- Bug Fix from Mr.Kim of MCD
- Close object at the appropriate time
Change-Id: Ie9331dbedf0ffa69507c99fda00bd8314c3cefb9
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
Kichan Kwon [Mon, 21 Nov 2016 05:36:34 +0000 (14:36 +0900)]
Merge branch 'tizen' into tizen_3.0
Change-Id: I24c32bc9ccf3e0ac85f5b84c26b57d2ded02c909
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
Kichan Kwon [Tue, 8 Nov 2016 10:48:19 +0000 (19:48 +0900)]
Fix memory issues
Change-Id: If6b6aec2f11454c796b2f54615d99921926ff4f0
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
Kichan Kwon [Fri, 11 Nov 2016 09:07:25 +0000 (18:07 +0900)]
Make rules about controlling cgroup
- All definitions will not have "/"
- Exception : root path ("/"sys/~), intermediate path (/sys"/"fs/~)
- Instead, "/" will be included in the function like snprintf
Change-Id: I3be94a7f357a9aa4d2db3ce0019c40d6269e96b0
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
Kichan Kwon [Fri, 11 Nov 2016 08:15:42 +0000 (17:15 +0900)]
proc-stat : use glib for monitoring exclude list
- For removing ecore-file dependency
Change-Id: I2fb208e60c7bdd23d151eb6a3ab3ec93a629964f
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
Kichan Kwon [Tue, 8 Nov 2016 10:48:19 +0000 (19:48 +0900)]
Fix memory issues
Change-Id: If6b6aec2f11454c796b2f54615d99921926ff4f0
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
Kichan Kwon [Mon, 7 Nov 2016 07:05:36 +0000 (16:05 +0900)]
Remove deprecated resourced.socket
Change-Id: Id264986beb0d20a97303b666a9fa3bdc6c385908
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
MyungJoo Ham [Wed, 2 Nov 2016 02:44:29 +0000 (11:44 +0900)]
Code Clean: spec file has dead code.
CAUTION: %pre section had not been active and will be
active from now on.
The whole %pre section was dead (and now alive),
so you should be careful on the behavior of that
"systemctl stop"
Change-Id: I6875b3a1e6a9f45bec6fe5c8efc07bec0685ea4b
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Kichan Kwon [Sat, 5 Nov 2016 08:55:57 +0000 (17:55 +0900)]
proc-stat : create critical section for proc_app_list
- System-freezer will link proc_app_list functions to use it
Change-Id: I57acaba1bee806e98e7f42bdf4529a892cdb7dae
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
Kichan Kwon [Sat, 5 Nov 2016 07:44:05 +0000 (16:44 +0900)]
Fix minor issues
Change-Id: I129b4fd3dc0284223c419d930bb3c16356234c5e
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
Kichan Kwon [Sat, 5 Nov 2016 07:35:24 +0000 (16:35 +0900)]
common : remove not used systemd-util
Change-Id: I90368bebe65f9390feff539c20655c943b811506
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
Kichan Kwon [Sat, 5 Nov 2016 06:01:39 +0000 (15:01 +0900)]
common : add cgroup control functions
- Getting pid
- Getting information about memory.stat
- In addition, all cgroup functions will unify prefix
Change-Id: I305ba00c5baa8e7962340d03c133cdc75faa3949
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
Kichan Kwon [Fri, 4 Nov 2016 06:15:21 +0000 (15:15 +0900)]
proc-stat : remove duplicated macro
- Size converting macro is supported by resourced util
Change-Id: I56365f759de498894c914e0b1f2943a83a9532a6
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
Kichan Kwon [Fri, 4 Nov 2016 05:09:23 +0000 (14:09 +0900)]
common : combine lowmem-common with memory-common
Change-Id: I848de5426f563997be73e551d248796fed0335dc
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
Kichan Kwon [Thu, 3 Nov 2016 10:59:26 +0000 (19:59 +0900)]
common : improve per-app memory usage calculation
1) New functions provide per-process memory usage
- pss, uss : use totmaps(if supported) or smaps(else)
- zram usage
- memory usage : pss + vmswap
2) proc_get_mem_usage is modified
- VmSize, VmRSS -> VmSwap, VmRSS
3) Other modules use these functions above
- vmpressure no more uses HEART-memory to get uss
- Signal handlers providing memory usage reply not rss but (pss + vmswap)
Change-Id: If8e2ff575b8d666ae82317228ff821c157c5cfc2
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
Kichan Kwon [Thu, 3 Nov 2016 08:46:10 +0000 (17:46 +0900)]
proc-stat : improve per-app CPU usage calculation
- Existed calculation is too strange
- Usage percentage = used time / elapsed time
- To get elapsed time, starttime and uptime are needed
Change-Id: I1834a550ae32603c66af780de72d57c0bcedcbb2
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
Kichan Kwon [Tue, 1 Nov 2016 07:11:14 +0000 (16:11 +0900)]
proc-stat : write appinfo into the file and exploit for restoring
- Current app information will be stored to /run/resourced/appinfo
- In there, each app has their own directory and store current state
- When resourced is restarted, proc module will read it and restore app information
Change-Id: I71b5a814615b928fd97194ebdae00cb15e902e65
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
Kichan Kwon [Tue, 1 Nov 2016 05:30:29 +0000 (14:30 +0900)]
common : each module can restore when resourced is restarted
- After restarting, all information are erased though other apps aren't exited
- Therefore, if each module needs, they can run restore function
- In addition, when restarted, BOOTING_DONE notifier will be broadcasted
Change-Id: I205993417565bc0505c4762b7da0c09e4b85a3a2
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
Kichan Kwon [Tue, 1 Nov 2016 04:47:37 +0000 (13:47 +0900)]
common : improve module structure
- Check whether sub-module is successfully loaded or not
- Re-establish module priority : LATE(default), NORMAL, EARLY, HIGH
Change-Id: Ife26e883af2578f449f65fa253b5026ea5e4ba81
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
Kichan Kwon [Mon, 31 Oct 2016 02:23:04 +0000 (11:23 +0900)]
cpu : move cgroup along with children.
Change-Id: Id177abb4510935da9396a72355c779ca81a91c4d
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
Kichan Kwon [Mon, 31 Oct 2016 08:12:51 +0000 (17:12 +0900)]
proc-stat : no more wrap structure around child pid
- We don't have to allocate and free for one-variable structure
Change-Id: Ic17e5a1c5dbb59adb4b38351ce5f72df19c3519c
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
Kichan Kwon [Thu, 3 Nov 2016 02:26:07 +0000 (11:26 +0900)]
common : directly read user information
Change-Id: I94a9d393236d73b44262ebc5631619eadd711284
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
Kichan Kwon [Tue, 25 Oct 2016 01:24:25 +0000 (10:24 +0900)]
Remove meaningless format specifier
Change-Id: Ib06118f5f7f49e7d01dc55b04d1d172ee20ec9b8
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
Kichan Kwon [Thu, 6 Oct 2016 08:45:51 +0000 (17:45 +0900)]
Version up
Change-Id: I0b9d4b361d0f69bea4e2bbfac0dfb49b65419660
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
Kichan Kwon [Thu, 6 Oct 2016 05:35:20 +0000 (22:35 -0700)]
Merge "Add path variable in the script file" into tizen
Chang Hyeon Chae [Tue, 4 Oct 2016 03:59:05 +0000 (12:59 +0900)]
Make static global variable used in only one file
Change-Id: Ida84dd5b4ef5334ea6c264c7697052962ed222c0
Signed-off-by: Chang Hyeon Chae <ckid.chae@samsung.com>
Kichan Kwon [Tue, 4 Oct 2016 01:45:13 +0000 (10:45 +0900)]
Add path variable in the script file
- For security issue
Change-Id: Ia71a2197a1aeaff02b4b3ba651745c9d504a413d
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
Kichan Kwon [Thu, 29 Sep 2016 01:10:17 +0000 (10:10 +0900)]
Fix security issues
- Prevent making not intended file
- Use %q instead of %s for preventing SQL injection
Change-Id: I778a2d3ff8af26112bca346b62b19322e094a01d
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
Kichan Kwon [Tue, 27 Sep 2016 05:15:18 +0000 (14:15 +0900)]
No more include not used file in the package
Change-Id: Iab23c338f23930dc4e8081be8e5f144e87fcae9f
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
Kichan Kwon [Mon, 19 Sep 2016 07:21:29 +0000 (16:21 +0900)]
cpu : don't assert with variable not used in the function
Change-Id: Ie38023814ae4d4ff7977db882fc1acae713954e3
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
Kichan Kwon [Mon, 19 Sep 2016 01:37:54 +0000 (10:37 +0900)]
common : remove hard coding path about internal root directory
- Instead, we will use Tizen platform configuration
Change-Id: I04d9963d0e4adb94c7ff8d2e647e1af7dbd1d784
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
Kichan Kwon [Mon, 12 Sep 2016 10:12:08 +0000 (19:12 +0900)]
Fix ENOENT issues
- No more access gumd user file directly
- Make HEART-battery dat file when it doesn't exist
Change-Id: I17ca884340c482a1ccb6efcb3a59091a88e6f97e
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
Kichan Kwon [Tue, 6 Sep 2016 10:22:24 +0000 (19:22 +0900)]
Modify upgrade script
- Use Tizen 3.0 RO exclude list and move RW exclude list
(For readbility, modify macros about exclude list)
- Remove output of sluggish module
- Use macro provided by tizen-platform-config
Change-Id: I00915cd79a86ec95e3f4587227b535fb5f3e5371
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
Kichan Kwon [Thu, 8 Sep 2016 01:26:38 +0000 (10:26 +0900)]
heart : fix memory leak.
Change-Id: Idaf09623ef8d50a3bc041eadc3a4a58f1dcdc78a
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
Kichan Kwon [Tue, 30 Aug 2016 02:14:08 +0000 (11:14 +0900)]
common : remove related to config_parse_new
- It can be replaced with config_parse and util functions
Change-Id: I1a77c006dfedd2dbd0d25ca6b42f1ed79b410cff
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
Kichan Kwon [Fri, 26 Aug 2016 07:19:51 +0000 (16:19 +0900)]
proc-stat : thaw process before setting state
- Until now, all processes are thawed after setting state to foreground
- However, System-freezer doesn't thaw foreground service bound with UI app
Change-Id: I502e80e7a197875c0b82882fb4478158f75773ef
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
Kichan Kwon [Fri, 26 Aug 2016 06:40:10 +0000 (15:40 +0900)]
proc-stat : do whole background process though app is directly come from initial state
- Until now, to apply whole background processes, app should be come from foreground
- However, from Tizen 3.0, app can be launched at the background without going to foreground
Change-Id: I0096779f75e200b97aaaddf0d5ff4ad26e62aa8b
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
Kichan Kwon [Mon, 22 Aug 2016 04:42:46 +0000 (13:42 +0900)]
Remove dependency on wm_ready
- Resourced doesn't need this dependency any more
Change-Id: I51408234053080ee2635b3d4d53816b5891773d4
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
Kichan Kwon [Fri, 12 Aug 2016 04:13:02 +0000 (13:13 +0900)]
common : use strncmp to compare string
- strstr can return false positive if first string is the prefix of second string
Change-Id: I3e2c733e5319c95ecac9235fad7478d212d87b5c
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
Kichan Kwon [Thu, 11 Aug 2016 09:27:51 +0000 (18:27 +0900)]
Remove needless things
- Unused definitions
- Documents about libresourced
- Headers about libproc-stat
Change-Id: Ica5a8654bab3795b3d9cbb97475c86a791505ec4
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>