platform/core/system/resourced.git
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>
7 years agoheart : multi-user logging : modify sub-modules and key of db_list 11/83511/4
Kichan Kwon [Thu, 11 Aug 2016 02:42:35 +0000 (11:42 +0900)]
heart : multi-user logging : modify sub-modules and key of db_list

Appopt  : disable (not used in now, this sub-module will be modified to unify with other modules)
Memory  : use user default DB (memory usage can be changed by user's app usage)
Storage : set WAL journal mode (for backward compatibility)

Key : SYSTEM_X DB uses key (0; uid of root)

Change-Id: Ic02e04a04b4b2c2b6f8cf34c337d3c0fbcb6bf55
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
7 years agoCreate script for upgrade (Tizen 2.4 -> 3.0) 04/83304/5
Kichan Kwon [Tue, 9 Aug 2016 13:33:05 +0000 (22:33 +0900)]
Create script for upgrade (Tizen 2.4 -> 3.0)

- Move HEART DB and dat files

Change-Id: I59eb63c0772178633ca00bbf46b2354c0ddcc556
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
7 years agoheart : multi-user logging : implement per-user DB 25/82725/7
Kichan Kwon [Fri, 5 Aug 2016 07:44:51 +0000 (16:44 +0900)]
heart : multi-user logging : implement per-user DB

- USER_DEFAULT and USER_OWN are similar as SYSTEM_X
- Difference is that only DB owner's logs are written in the user DB

- To manage all user's DB, each sub-module has DB hash table (key=uid, value=DB)

Change-Id: I6737f02f0c48c1fe2718144262e464a7c666967f
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
7 years agoheart : multi-user logging : add uid in the logging table 08/82708/11
Kichan Kwon [Wed, 3 Aug 2016 07:47:13 +0000 (16:47 +0900)]
heart : multi-user logging : add uid in the logging table

- To write log in the cache,
1) Each sub-module send pid
2) Before writing to cache, pid is converted to uid
3) uid will be used to find destination (don't stored in the DB)

Change-Id: I71f52cc1908b43f24c45d7f774f58bf0210b5e02
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
7 years agoheart : multi-user logging : classify sub-modules with DB type. 25/81125/9
Kichan Kwon [Fri, 22 Jul 2016 07:12:49 +0000 (16:12 +0900)]
heart : multi-user logging : classify sub-modules with DB type.

- SYSTEM_DEFAULT : use default SQLite3 DB
- SYSTEM_OWN : use their own DB
- USER_DEFAULT and USER_OWN will be implemented

Change-Id: I172b677bf01ebb9a8bf88c3c673f1b2638e03d95
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
7 years agoproc-stat : use freezer function only if freezer module is loaded 09/83109/1 accepted/tizen/common/20160811.150021 accepted/tizen/ivi/20160811.085403 accepted/tizen/mobile/20160811.085315 accepted/tizen/tv/20160811.085328 accepted/tizen/wearable/20160811.085344 submit/tizen/20160811.024345
Kichan Kwon [Tue, 9 Aug 2016 07:51:45 +0000 (16:51 +0900)]
proc-stat : use freezer function only if freezer module is loaded

Change-Id: I6fc420d8ba6e8c1518d59851ef1ff4eb5c3137b3
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
7 years agoproc-stat : remove libproc-stat 86/83086/1
Kichan Kwon [Tue, 9 Aug 2016 06:30:59 +0000 (15:30 +0900)]
proc-stat : remove libproc-stat

- libproc-stat.so(socket communication) is alternated with dbus communication
- In addition, libresourced rpm package is removed because of absence of library in this package

Change-Id: I729a5edc0c4e2d188e0b62608f21997bd7930916
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
7 years agofreezer : remove library and configuration files 12/82812/2
Kichan Kwon [Mon, 8 Aug 2016 01:15:58 +0000 (10:15 +0900)]
freezer : remove library and configuration files

- To use freezer module, you should install system-freezer plugin

Change-Id: I716e81a324a6d64083126ce67c031c229854ba99
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
7 years agoproc-stat : apply LRU state at the favorite apps. 59/82559/1
Kichan Kwon [Mon, 13 Jun 2016 11:23:29 +0000 (20:23 +0900)]
proc-stat : apply LRU state at the favorite apps.

- Favorite apps have their own LRU state

Change-Id: I398d9ec0d100a6788eff5edd94fe8c8ab75f0608
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
7 years agoSet existent user and group name 91/81691/3
Kichan Kwon [Thu, 28 Jul 2016 01:55:00 +0000 (10:55 +0900)]
Set existent user and group name

- User and group name "app" no longer exist

Change-Id: I44d31dd115544f1f4bf2fe77d36454ce239d41c3
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
7 years agocommon : remove proc_status.appid. 62/81262/7
Kichan Kwon [Mon, 25 Jul 2016 06:51:07 +0000 (15:51 +0900)]
common : remove proc_status.appid.

- This variable is overlapped with proc_status.pai->appid

Change-Id: Icd36586ab27891eb3692807b1e943b251d7e0e6d
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
7 years agoRemove unused code 48/80948/1
Kichan Kwon [Thu, 21 Jul 2016 04:52:22 +0000 (13:52 +0900)]
Remove unused code

Change-Id: Ie8da88ab74a52c6b47cd7aecb56f0756083829dc
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
7 years agoSet SmackProcessLabel to System::Privileged 51/80851/1 accepted/tizen/common/20160721.175531 accepted/tizen/ivi/20160721.090707 accepted/tizen/mobile/20160721.090333 accepted/tizen/tv/20160721.091225 accepted/tizen/wearable/20160721.090846 submit/tizen/20160721.003054
Yunjin Lee [Wed, 20 Jul 2016 11:26:55 +0000 (20:26 +0900)]
Set SmackProcessLabel to System::Privileged

Change-Id: I802fe9becb1aad996f742efc86d2e6e2e84f2696
Signed-off-by: Yunjin Lee <yunjin-.lee@samsung.com>
7 years agomemory : remove memps_log 60/80760/1 accepted/tizen/common/20160720.173312 accepted/tizen/ivi/20160720.055903 accepted/tizen/mobile/20160720.055749 accepted/tizen/tv/20160720.055810 accepted/tizen/wearable/20160720.055840 submit/tizen/20160720.051200
Kichan Kwon [Wed, 20 Jul 2016 04:55:49 +0000 (13:55 +0900)]
memory : remove memps_log

- It isn't utilized in the platform image

Change-Id: I2f67d624e5f53a6f7c5d987b7ff5b3a8680ca234
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
8 years agoApply Tizen coding rule 50/79850/1 accepted/tizen/common/20160714.152847 accepted/tizen/ivi/20160714.054105 accepted/tizen/mobile/20160714.054059 accepted/tizen/tv/20160714.054052 accepted/tizen/wearable/20160714.054102 submit/tizen/20160714.021423
Kichan Kwon [Wed, 13 Jul 2016 08:06:57 +0000 (17:06 +0900)]
Apply Tizen coding rule

Change-Id: I5988977501cce67899c0e0044886865d1bd8bfe9
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
8 years agosluggish : remove sluggish module 93/79793/1
Kichan Kwon [Wed, 13 Jul 2016 04:10:54 +0000 (13:10 +0900)]
sluggish : remove sluggish module

- In current, nobody call sluggish method
- Its role is overlapped with crash-worker

Change-Id: I432739fae74c981287e4880f3ca047199a45f0ea
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
8 years agocommon : close directory stream after using 07/79107/1
Kichan Kwon [Fri, 8 Jul 2016 07:49:11 +0000 (16:49 +0900)]
common : close directory stream after using

Change-Id: I653c883a244ba2256e5e876a2477a97d8eb969ef
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
8 years agomemory : use HEART-MEMORY data only if HEART-MEMORY module is enabled 79/79079/1
Kichan Kwon [Fri, 8 Jul 2016 06:17:30 +0000 (15:17 +0900)]
memory : use HEART-MEMORY data only if HEART-MEMORY module is enabled

Change-Id: Ifde1a811b4b133a88e31a22974c84aa22bd93dd7
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
8 years agoChange some pathes 78/79078/1
Kichan Kwon [Fri, 8 Jul 2016 06:13:13 +0000 (15:13 +0900)]
Change some pathes

- HEART log files can be regarded to user data
- Therefore, these files may be located at user data area

Change-Id: I90c5896f5be53d67db719052d84681291715e16a
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
8 years agofreezer : start vital mode only if suspend mode is enabled 47/78547/1 accepted/tizen/common/20160706.142155 accepted/tizen/ivi/20160706.082505 accepted/tizen/mobile/20160706.082324 accepted/tizen/tv/20160706.082334 accepted/tizen/wearable/20160706.082346 submit/tizen/20160706.021530
Kichan Kwon [Wed, 6 Jul 2016 05:07:24 +0000 (14:07 +0900)]
freezer : start vital mode only if suspend mode is enabled

Change-Id: I34a3c2a8e993cbb446b126a0c0056a0389dd3acd
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
8 years agotimer-slack : set declaration with definition 27/78527/1
Kichan Kwon [Wed, 6 Jul 2016 03:11:03 +0000 (12:11 +0900)]
timer-slack : set declaration with definition

Change-Id: I2997cb478734f8910f408a40b5e7c695eff4059b
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
8 years agoRemove traces about network module 26/78526/1
Kichan Kwon [Wed, 6 Jul 2016 03:08:04 +0000 (12:08 +0900)]
Remove traces about network module

- test, DB, IPC, ...

Change-Id: I7e013120565791f3f887871425d2f78b4e86c7c6
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
8 years agocpu : tidy up configuration 11/74111/5
Kichan Kwon [Mon, 13 Jun 2016 01:48:43 +0000 (10:48 +0900)]
cpu : tidy up configuration

- Remove unused config keys
- X_CPU_SHARE : absolute -> relative cpu share of root
- QUOTA_MAX_BANDWIDTH : max relative cpu time

Change-Id: I9221eed483b1a55c6e703793071b6e241c309d74
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
8 years agocommon : fix memory leak when Runtime-info requests information 55/78055/2
Kichan Kwon [Mon, 4 Jul 2016 06:30:57 +0000 (15:30 +0900)]
common : fix memory leak when Runtime-info requests information

- e_dbus_message_send internally use dbus_connection_send_with_reply
- However, edbus_message_send is used for replying, so resourced can't receive anything
- Therefore, we should use dbus_connection_send to reply
- In addition, edbus_init is modified to use dbus_conn

Change-Id: I5f00463ab3c434ff442889d60bb947baca86c206
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
8 years agocommon : fix abnormal retry counter 30/78130/1
Kichan Kwon [Mon, 4 Jul 2016 10:07:05 +0000 (19:07 +0900)]
common : fix abnormal retry counter

Change-Id: I34c923452834943112065ad483577397c9f45328
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
8 years agoRemove network module 62/77962/3
Kunhoon Baik [Sat, 2 Jul 2016 06:02:16 +0000 (15:02 +0900)]
Remove network module

- This feature may be turned on Tizen 4.0

Change-Id: I3c75e01bc622ac9d7a13ea992a8721b45d730056
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
8 years agoheart : suppose discharging when wrong current battery status is written 19/74319/3
Kichan Kwon [Tue, 14 Jun 2016 01:13:38 +0000 (10:13 +0900)]
heart : suppose discharging when wrong current battery status is written

Change-Id: If6a319d8d457623ede701e0ec26b3163a825f2d4
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
8 years agocpu : modify CPU sub-cgroup 79/71779/3
Kichan Kwon [Fri, 27 May 2016 05:43:50 +0000 (14:43 +0900)]
cpu : modify CPU sub-cgroup

- To control CPU share with our intention

- /background/quota -> /quota
- /background/download -> deleted

Change-Id: I13cfe7f1de3e8477d97f02d018bc927108fcfe74
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
8 years agoTidy up spec file 04/71304/1
Kichan Kwon [Wed, 25 May 2016 04:21:49 +0000 (13:21 +0900)]
Tidy up spec file

Change-Id: If0d89ecfad33025087ec58879f300a6c889bd5ca
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
8 years ago...: Apply Tizen coding rule 79/70079/2
sunm.lee [Wed, 18 May 2016 04:30:06 +0000 (13:30 +0900)]
...: Apply Tizen coding rule

Apply Tizen coding rule to:
 block, cpu, heart, mem-stress, memory, network,
 proc-stat, resourced, sluggish, swap, timer-slack,
 vip-agent

Change-Id: I58945a9b433744824b576d0cab2a4027867bf6da
Signed-off-by: sunm.lee <sunm.lee@samsung.com>
8 years agocommon, tests, resourced-dbus, utils: Apply Tizen coding rule 25/69825/1 accepted/tizen/common/20160517.174121 accepted/tizen/ivi/20160517.083414 accepted/tizen/mobile/20160517.083442 accepted/tizen/tv/20160517.083330 accepted/tizen/wearable/20160517.083400 submit/tizen/20160517.042048
sunm.lee [Tue, 17 May 2016 03:03:13 +0000 (12:03 +0900)]
common, tests, resourced-dbus, utils: Apply Tizen coding rule

Apply Tizen coding rule to:
 common, tests, resourced-dbus, utils

Change-Id: I8f1554a58b1dc03e459933cd9f6633a3bf8c5e56
Signed-off-by: sunm.lee <sunm.lee@samsung.com>
8 years agoInclude more functions into the memps logging definition 59/69059/1
Kichan Kwon [Wed, 11 May 2016 08:53:25 +0000 (17:53 +0900)]
Include more functions into the memps logging definition

Change-Id: I7049733da2dee2b7eda52c0fac06c80eb7070850
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
8 years agoDefine memps logging function only when it is used 72/68972/1 accepted/tizen/common/20160511.142037 accepted/tizen/ivi/20160512.050744 accepted/tizen/mobile/20160512.050733 accepted/tizen/tv/20160512.050641 accepted/tizen/wearable/20160512.050714 submit/tizen/20160511.010637
Kichan Kwon [Wed, 11 May 2016 00:51:14 +0000 (09:51 +0900)]
Define memps logging function only when it is used

Change-Id: I69e42652042698fe4c5db5f13f5b0fb5b5b5d696
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
8 years agofreezer : change freezer mode 41/68841/2 submit/tizen/20160510.074147
Kichan Kwon [Tue, 10 May 2016 05:47:59 +0000 (14:47 +0900)]
freezer : change freezer mode

Change-Id: Ide7e0f37cc189317709a1d43dac161a586213f6d
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
8 years agoMake switch to on/off memps logging 21/68421/4
Kichan Kwon [Wed, 4 May 2016 06:34:47 +0000 (15:34 +0900)]
Make switch to on/off memps logging

- Default state : on(mobile, wearable), off(tv)

Change-Id: I6267de0b8805a1318916ef449fcf8e40c0de9af5
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
8 years agocommon : check null parameter 87/68387/4
Kichan Kwon [Wed, 4 May 2016 01:41:44 +0000 (10:41 +0900)]
common : check null parameter

Change-Id: Ibfb0a5827d536ca56cc494d34f3234544cfc51c8
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
8 years agofreezer : update freezer library 03/68103/2
Kichan Kwon [Mon, 2 May 2016 08:27:18 +0000 (17:27 +0900)]
freezer : update freezer library

Change-Id: I36b33b6a12829aee356b75a8d9bada6643bfe8b5
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
8 years agofreezer : move aduitd to the VITAL_WAKEUP group 01/68101/2
Kichan Kwon [Mon, 2 May 2016 08:20:23 +0000 (17:20 +0900)]
freezer : move aduitd to the VITAL_WAKEUP group

- auditd receives socket messages from kernel
- If auditd is frozen until VITAL_DISPLAY_WAKEUP event,
 not only auditd can't process but also kernel can't go to the suspend state.
- Therefore, auditd should be included in the VITAL_WAKEUP group.

Change-Id: If0723e703bc72cad17195f2f9208188bd03b492b
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
8 years agoEnable freezer module 88/67788/2 accepted/tizen/common/20160429.170615 accepted/tizen/ivi/20160429.074453 accepted/tizen/mobile/20160429.074359 accepted/tizen/tv/20160429.074420 accepted/tizen/wearable/20160429.074437 submit/tizen/20160429.062253
Kichan Kwon [Thu, 28 Apr 2016 08:31:36 +0000 (17:31 +0900)]
Enable freezer module

Change-Id: Iccb19c8edcd513dbe175f0f20238cc33f63451e8
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
8 years agoDefine resourced config path 39/66939/2
Kichan Kwon [Fri, 22 Apr 2016 06:12:34 +0000 (15:12 +0900)]
Define resourced config path

Change-Id: Ibd33c1952b6a3571b7de302de0704bcf5565d6b3
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
8 years agovip : remove some VIP processes 12/66912/2
Kichan Kwon [Fri, 22 Apr 2016 03:19:39 +0000 (12:19 +0900)]
vip : remove some VIP processes

- Xorg : no longer used
- amd : to support multi-user

Change-Id: I2eaffddee7b0f44365af0dd5e6258740219a8235
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
8 years agovip : register only system slice services 07/66907/2
Kichan Kwon [Fri, 22 Apr 2016 03:15:09 +0000 (12:15 +0900)]
vip : register only system slice services

Change-Id: I91bed94d427cd0a37cd0ff42c9554afc7af31b41
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
8 years agocpu : use correct name 45/66645/1
Kichan Kwon [Wed, 20 Apr 2016 06:00:15 +0000 (15:00 +0900)]
cpu : use correct name

Change-Id: I182f65811e3fe8f83218c305cd65136f483dfe72
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
8 years agoRemove useless definitions 27/66627/1
Kichan Kwon [Wed, 20 Apr 2016 03:14:31 +0000 (12:14 +0900)]
Remove useless definitions

Change-Id: I7f8077268b2880328e33156d5f71f9dfe40c4007
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
8 years agoChange path of exclude list file 84/66284/2 accepted/tizen/common/20160418.142022 accepted/tizen/ivi/20160418.124535 accepted/tizen/mobile/20160418.124253 accepted/tizen/tv/20160418.124303 accepted/tizen/wearable/20160418.124459 submit/tizen/20160418.095021
Kichan Kwon [Mon, 18 Apr 2016 07:31:50 +0000 (16:31 +0900)]
Change path of exclude list file

- /usr/etc -> TZ_SYS_ETC(/opt/etc)

Change-Id: I8850e0b87f08ad66bd33e98227d10a593503bb99
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
8 years agoblock : prevent overlapped mount 41/65941/3
Kichan Kwon [Thu, 14 Apr 2016 06:38:23 +0000 (15:38 +0900)]
block : prevent overlapped mount

- When resourced checks overlapped mount, it compares path with mtab
- In the mtab, /home/~(link path) is written to /opt/home/~(original path)
- To match path and mounted directory, we use not link path but original path

Change-Id: I2c86b73c2e286b3b426752f408d77c5194b0eb27
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
8 years agoblock : no longer use configend option at the conf file 13/66113/2
Kichan Kwon [Fri, 15 Apr 2016 08:27:23 +0000 (17:27 +0900)]
block : no longer use configend option at the conf file

- configend is just used to inform the end of conf file

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