platform/core/system/resourced.git
7 years agoswap : make module to build without error 56/120356/10
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>
7 years agoRemove ecore dependency 53/125253/11
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>
7 years agoproc-stat : move something used by other modules to common header 78/125178/8
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>
7 years agoAllow building without memory module 44/124244/7
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>
7 years agoproc-stat : no more freeze app soon after it goes to the background state 88/126388/2 accepted/tizen/unified/20170425.044936 submit/tizen/20170424.051821
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>
7 years agoUse %license macro 32/126132/1 accepted/tizen/unified/20170421.042209 submit/tizen/20170421.010936
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>
7 years agoCheck valid range 88/125788/2 accepted/tizen/unified/20170419.165410 submit/tizen/20170419.094909
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>
7 years agomemory : remove "const" from memory_modules_ops 50/125450/1 accepted/tizen/unified/20170418.072908 submit/tizen/20170417.083520
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>
7 years agomemory : use size_t instead of int 02/123302/1 accepted/tizen/unified/20170406.055123 submit/tizen/20170405.073013
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>
7 years agoIncrease release number 82/123182/1 submit/tizen/20170405.012656
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>
7 years agoMerge "Revert "No more unmount cgroup directory before power off"" into tizen
Kwon [Wed, 5 Apr 2017 01:33:14 +0000 (18:33 -0700)]
Merge "Revert "No more unmount cgroup directory before power off"" into tizen

7 years agoRevert "No more unmount cgroup directory before power off" 53/122753/3
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

7 years agomemory : LMK refactoring. 38/99838/16
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>
7 years agoFix memory issues 43/122443/3 accepted/tizen_common accepted/tizen_ivi accepted/tizen_mobile accepted/tizen_tv accepted/tizen_wearable accepted/tizen/common/20170331.152911 accepted/tizen/ivi/20170331.130515 accepted/tizen/mobile/20170331.130425 accepted/tizen/tv/20170331.130442 accepted/tizen/unified/20170331.130530 accepted/tizen/wearable/20170331.130456 submit/tizen/20170331.103559
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>
7 years agocpu : no more restrict CPU usage of media service app 48/120348/2
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>
7 years agoheart : remove unused static const variable 58/118158/1 accepted/tizen/common/20170309.175527 accepted/tizen/ivi/20170309.072616 accepted/tizen/mobile/20170309.072528 accepted/tizen/tv/20170309.072545 accepted/tizen/unified/20170310.080531 accepted/tizen/wearable/20170309.072558 submit/tizen/20170309.064503 submit/tizen_unified/20170310.011402
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>
7 years agoheart : insert table after making 76/117676/1
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>
7 years agoNo more unmount cgroup directory before power off 03/115203/2 accepted/tizen/common/20170220.144436 accepted/tizen/ivi/20170220.223350 accepted/tizen/mobile/20170220.223238 accepted/tizen/tv/20170220.223303 accepted/tizen/unified/20170309.033651 accepted/tizen/wearable/20170220.223328 submit/tizen/20170220.103254 submit/tizen_unified/20170308.100409
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>
7 years agoMerge branch 'tizen_3.0' into tizen 68/115568/1
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>
7 years agoheart : update DB to modify appid after grouping 25/112125/5 accepted/tizen/3.0/common/20170215.121119 accepted/tizen/3.0/ivi/20170215.034458 accepted/tizen/3.0/mobile/20170215.034330 accepted/tizen/3.0/tv/20170215.034406 accepted/tizen/3.0/wearable/20170215.034434 submit/tizen_3.0/20170214.071028
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>
7 years agoMake resourced-light package 61/94961/14 accepted/tizen/common/20170209.122316 accepted/tizen/ivi/20170210.004102 accepted/tizen/mobile/20170210.003820 accepted/tizen/tv/20170210.004003 accepted/tizen/wearable/20170210.004045 submit/tizen/20170209.013748
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>
7 years agoheart : set to static function using static variable 61/111161/1 accepted/tizen/common/20170120.124945 accepted/tizen/ivi/20170120.081254 accepted/tizen/mobile/20170120.081206 accepted/tizen/tv/20170120.081223 accepted/tizen/wearable/20170120.081239 submit/tizen/20170120.023023
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>
7 years agoFix for gnu11 compiler 51/110751/4 accepted/tizen/common/20170118.173908 accepted/tizen/ivi/20170118.041629 accepted/tizen/mobile/20170118.041527 accepted/tizen/tv/20170118.041541 accepted/tizen/wearable/20170118.041549 submit/tizen/20170118.022504
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>
7 years agoFix Tizen coding rule 61/107861/6
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>
7 years agoproc-stat : remove clearly after grouping 98/107798/7
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>
7 years agoReplace strerror_r() to '%m'. 43/107643/7
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>
7 years agoMerge branch 'tizen_3.0' into tizen 99/110099/1 accepted/tizen/common/20170116.181512 accepted/tizen/ivi/20170117.053409 accepted/tizen/mobile/20170117.053313 accepted/tizen/tv/20170117.053332 accepted/tizen/wearable/20170117.053353 submit/tizen/20170116.043922
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>
7 years agoheart : fix argument 79/108579/2
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>
7 years agoheart : sync thread no more reply D-Bus message 29/108329/5
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>
7 years agoMerge branch 'tizen_3.0' into tizen 39/107639/1
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>
7 years agoheart : pull out DB size checking statement 32/107132/2 accepted/tizen_3.0.m2_mobile accepted/tizen_3.0.m2_tv accepted/tizen_3.0.m2_wearable tizen_3.0.m2 tizen_3.0_tv accepted/tizen/3.0.m2/mobile/20170104.141256 accepted/tizen/3.0.m2/tv/20170104.141955 accepted/tizen/3.0.m2/wearable/20170104.142251 accepted/tizen/3.0/common/20161227.181429 accepted/tizen/3.0/ivi/20161227.141815 accepted/tizen/3.0/mobile/20161227.141635 accepted/tizen/3.0/tv/20161227.141700 accepted/tizen/3.0/wearable/20161227.141811 submit/tizen_3.0.m2/20170104.093751 submit/tizen_3.0/20161227.044558
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>
7 years agoFix timing issues 80/106480/3 accepted/tizen/3.0/common/20161227.101538 accepted/tizen/3.0/ivi/20161226.025903 accepted/tizen/3.0/mobile/20161226.025808 accepted/tizen/3.0/tv/20161226.025826 accepted/tizen/3.0/wearable/20161226.025844 submit/tizen_3.0/20161223.022504
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>
7 years agoheart : add dbus method about HEART-CPU sync 84/106284/2 accepted/tizen/3.0/common/20161223.110548 accepted/tizen/3.0/ivi/20161223.081345 accepted/tizen/3.0/mobile/20161223.081300 accepted/tizen/3.0/tv/20161223.081316 accepted/tizen/3.0/wearable/20161223.081322 submit/tizen_3.0/20161222.085113
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>
7 years agoCheck memory allocation failure 34/106034/2
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>
7 years agoproc-stat : create app info only if both appid and pkgid are existed 26/105226/2 accepted/tizen/3.0/common/20161221.180606 accepted/tizen/3.0/ivi/20161221.005245 accepted/tizen/3.0/mobile/20161221.005313 accepted/tizen/3.0/tv/20161221.005116 accepted/tizen/3.0/wearable/20161221.005149 submit/tizen_3.0/20161219.053948
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>
7 years agoImprove stability 05/104705/9
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>
7 years agoAllow ProcExclude signal without privilege 04/104904/1 accepted/tizen/3.0/common/20161215.164139 accepted/tizen/3.0/ivi/20161215.002659 accepted/tizen/3.0/mobile/20161215.002622 accepted/tizen/3.0/tv/20161215.002631 accepted/tizen/3.0/wearable/20161215.002655 submit/tizen_3.0/20161214.143724
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

7 years agoMerge "Revert "Allow ProcExclude signal without privilege"" into tizen_3.0
Kunhoon Baik [Wed, 14 Dec 2016 13:59:44 +0000 (05:59 -0800)]
Merge "Revert "Allow ProcExclude signal without privilege"" into tizen_3.0

7 years agoRevert "Allow ProcExclude signal without privilege" 01/104901/1
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

7 years agoFix memory leak and invalid access 66/103166/16 accepted/tizen/3.0/common/20161214.074615 accepted/tizen/3.0/ivi/20161214.070738 accepted/tizen/3.0/mobile/20161214.070655 accepted/tizen/3.0/tv/20161214.070711 accepted/tizen/3.0/wearable/20161214.070721 submit/tizen_3.0/20161213.133010 submit/tizen_3.0/20161214.043807
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>
7 years agoproc-stat : fix invalid unlock 54/104254/4
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>
7 years agocommon : userinfo-list refactoring 36/103436/8
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>
7 years agoReplace strerror to strerror_r 91/103891/5
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>
7 years agocommon : clean up DBusError 36/99836/10
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>
7 years agoproc-stat : improve stability about controlling proc_app_list. 25/99825/10
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>
7 years agoSimplify CMakefile 14/99614/9
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>
7 years agocommon : separate cgroup integer function with uint and int 78/98878/9
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>
7 years agoAllow ProcExclude signal without privilege 84/103884/5 submit/tizen_3.0/20161212.010021
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>
7 years agoheart : remove heart-appopt 37/102937/1
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>
7 years agoheart : fix wrong battery indexing 09/102609/2 accepted/tizen/3.0/common/20161207.194604 accepted/tizen/3.0/ivi/20161207.012417 accepted/tizen/3.0/mobile/20161207.012325 accepted/tizen/3.0/tv/20161207.012342 accepted/tizen/3.0/wearable/20161207.012400 submit/tizen_3.0/20161206.084145
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>
7 years agoheart : detach async DB updating 44/102444/2
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>
7 years agoheart : upgrade HEART-battery 92/100092/10 accepted/tizen/3.0/ivi/20161205.235125 accepted/tizen/3.0/mobile/20161205.235030 accepted/tizen/3.0/tv/20161205.235048 accepted/tizen/3.0/wearable/20161205.235106 submit/tizen_3.0/20161205.073831
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>
7 years agoheart : fix minor issues 37/102137/3
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>
7 years agoFix minor issues 36/100336/9
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>
7 years agoUpgrade: set RW update script number 64/101864/3
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>
7 years agoUpgrade: omit RO update commands in upgrade script 28/101028/5
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>
7 years agoproc-stat : fix about ANR popup signal 33/99033/2
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>
7 years agoBug Fix & Minor code changes 70/97570/4
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>
7 years agoMerge branch 'tizen' into tizen_3.0 77/98877/1
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>
7 years agoFix memory issues 69/97569/1
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>
7 years agoMake rules about controlling cgroup 59/97159/1
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>
7 years agoproc-stat : use glib for monitoring exclude list 30/97130/1
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>
7 years agoFix memory issues 89/96289/1
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>
7 years agoRemove deprecated resourced.socket 56/95956/1
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>
7 years agoCode Clean: spec file has dead code. 00/94900/2
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>
7 years agoproc-stat : create critical section for proc_app_list 03/95803/4
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>
7 years agoFix minor issues 00/95800/2
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>
7 years agocommon : remove not used systemd-util 99/95799/2
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>
7 years agocommon : add cgroup control functions 98/95798/3
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>
7 years agoproc-stat : remove duplicated macro 52/95652/4
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>
7 years agocommon : combine lowmem-common with memory-common 25/95625/4
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>
7 years agocommon : improve per-app memory usage calculation 04/95504/5
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>
7 years agoproc-stat : improve per-app CPU usage calculation 49/95449/4
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>
7 years agoproc-stat : write appinfo into the file and exploit for restoring 87/94787/8
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>
7 years agocommon : each module can restore when resourced is restarted 73/94773/9
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>
7 years agocommon : improve module structure 45/94745/9
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>
7 years agocpu : move cgroup along with children. 47/94447/10
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>
7 years agoproc-stat : no more wrap structure around child pid 05/94505/5
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>
7 years agocommon : directly read user information 47/95347/1 accepted/tizen/common/20161114.170718 accepted/tizen/ivi/20161114.003721 accepted/tizen/mobile/20161114.003554 accepted/tizen/tv/20161114.003620 accepted/tizen/wearable/20161114.003645 submit/tizen/20161111.004248
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>
7 years agoRemove meaningless format specifier 39/93539/1
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>
7 years agoVersion up 08/91208/1 accepted/tizen/3.0/common/20161114.110038 accepted/tizen/3.0/ivi/20161028.133851 accepted/tizen/3.0/ivi/20161206.001935 accepted/tizen/3.0/mobile/20161015.034052 accepted/tizen/3.0/mobile/20161028.132947 accepted/tizen/3.0/mobile/20161206.001844 accepted/tizen/3.0/tv/20161016.005600 accepted/tizen/3.0/tv/20161028.133309 accepted/tizen/3.0/tv/20161206.001901 accepted/tizen/3.0/wearable/20161015.083932 accepted/tizen/3.0/wearable/20161028.133612 accepted/tizen/3.0/wearable/20161206.001919 accepted/tizen/common/20161006.153829 accepted/tizen/ivi/20161007.103815 accepted/tizen/mobile/20161007.103758 accepted/tizen/tv/20161007.103810 accepted/tizen/wearable/20161007.103805 submit/tizen/20161006.084312 submit/tizen_3.0/20161028.062323 submit/tizen_3.0/20161028.082423 submit/tizen_3.0/20161206.001603 submit/tizen_3.0_common/20161104.104000 submit/tizen_3.0_mobile/20161015.000006 submit/tizen_3.0_tv/20161015.000005 submit/tizen_3.0_wearable/20161015.000005
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>
7 years agoMerge "Add path variable in the script file" into tizen
Kichan Kwon [Thu, 6 Oct 2016 05:35:20 +0000 (22:35 -0700)]
Merge "Add path variable in the script file" into tizen

7 years agoMake static global variable used in only one file 05/90705/1
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>
7 years agoAdd path variable in the script file 94/90694/1
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>
7 years agoFix security issues 91/90191/8 accepted/tizen/3.0/ivi/20161011.062315 accepted/tizen/common/20160929.163548 accepted/tizen/ivi/20160929.233932 accepted/tizen/mobile/20160929.233921 accepted/tizen/tv/20160929.233928 accepted/tizen/wearable/20160929.233917 submit/tizen/20160929.083711 submit/tizen_3.0_ivi/20161010.000006
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>
7 years agoNo more include not used file in the package 89/89789/1 accepted/tizen/common/20160929.163012 accepted/tizen/ivi/20160929.081435 accepted/tizen/mobile/20160929.081443 accepted/tizen/tv/20160929.081425 accepted/tizen/wearable/20160929.081418 submit/tizen/20160928.071137
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>
7 years agocpu : don't assert with variable not used in the function 53/88453/4 accepted/tizen/common/20160920.132137 accepted/tizen/ivi/20160921.081009 accepted/tizen/mobile/20160921.080947 accepted/tizen/tv/20160921.081004 accepted/tizen/wearable/20160921.080956 submit/tizen/20160920.065041
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>
7 years agocommon : remove hard coding path about internal root directory 17/88417/4
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>
7 years agoFix ENOENT issues 63/87963/4
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>
7 years agoModify upgrade script 15/87915/4
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>
7 years agoheart : fix memory leak. 04/87404/3
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>
7 years agocommon : remove related to config_parse_new 89/85989/1 accepted/tizen/common/20160905.171542 accepted/tizen/ivi/20160906.000201 accepted/tizen/mobile/20160906.000104 accepted/tizen/tv/20160906.000117 accepted/tizen/wearable/20160906.000143 submit/tizen/20160905.074328
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>
7 years agoproc-stat : thaw process before setting state 25/85625/5
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>
7 years agoproc-stat : do whole background process though app is directly come from initial... 22/85622/4
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>
7 years agoRemove dependency on wm_ready 84/84684/5
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>
7 years agocommon : use strncmp to compare string 10/83610/7
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>
7 years agoRemove needless things 12/83512/6
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>
7 years agoheart : multi-user logging : use old user list when updating user list is failed 88/85788/4 accepted/tizen/common/20160901.143352 accepted/tizen/ivi/20160901.072751 accepted/tizen/mobile/20160901.072702 accepted/tizen/tv/20160901.072719 accepted/tizen/wearable/20160901.072733 submit/tizen/20160901.005311
Kichan Kwon [Mon, 29 Aug 2016 05:58:22 +0000 (14:58 +0900)]
heart : multi-user logging : use old user list when updating user list is failed

- gumd can return fail if other package locks user list
- If resourced doesn't have existing user list, return fail

Change-Id: I0cf7529e531da716bfd2eee9cf8786d74797f430
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
7 years agoheart : multi-user logging : implement per-user dat file of HEART-CPU 65/84065/10
Kichan Kwon [Tue, 16 Aug 2016 07:55:35 +0000 (16:55 +0900)]
heart : multi-user logging : implement per-user dat file of HEART-CPU

- Similar to DB, dat cache is composed of hash table (key=uid, value=cache)
- To distinguish destination, some HEART-CPU dbus methods ask uid

Change-Id: I9f703cf054436cf4272d5c2bac5fb95f0803e9fd
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
7 years agoheart : multi-user logging : attach free function 14/83514/7
Kichan Kwon [Thu, 11 Aug 2016 09:57:06 +0000 (18:57 +0900)]
heart : multi-user logging : attach free function

Change-Id: I60b61b9087798ae067ae9cd3cc5141b2719bbf96
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>