summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2016-12-29Different semantics for inline functionssandbox/jaehun77/gcc6Jaehun Jeong1-21/+21
Signed-off-by: Jaehun Jeong <jh4u.jeong@samsung.com>
2016-12-14Allow ProcExclude signal without privilegesubmit/tizen_3.0/20161214.143724accepted/tizen/3.0/wearable/20161215.002655accepted/tizen/3.0/tv/20161215.002631accepted/tizen/3.0/mobile/20161215.002622accepted/tizen/3.0/ivi/20161215.002659accepted/tizen/3.0/common/20161215.164139Kunhoon Baik1-3/+39
- To allow the request of Minicontroller Rollback to original Mr.Kwon's patch : https://review.tizen.org/gerrit/#/c/103884/1 Change-Id: I1d6043c8388c14bdf636157288922dc6df2a3a24
2016-12-14Merge "Revert "Allow ProcExclude signal without privilege"" into tizen_3.0Kunhoon Baik1-31/+11
2016-12-14Revert "Allow ProcExclude signal without privilege"Kunhoon Baik1-31/+11
This reverts commit 73b906e4714db967fa6438260c3fa020e67d71a7. Change-Id: I92b71689d87c4541aa4933aaecb19ed2f14d1255
2016-12-13Fix memory leak and invalid accesssubmit/tizen_3.0/20161214.043807submit/tizen_3.0/20161213.133010accepted/tizen/3.0/wearable/20161214.070721accepted/tizen/3.0/tv/20161214.070711accepted/tizen/3.0/mobile/20161214.070655accepted/tizen/3.0/ivi/20161214.070738accepted/tizen/3.0/common/20161214.074615Kichan Kwon5-21/+37
Change-Id: I8561972e584233fd417d84a8850293e6c666f306 Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
2016-12-13proc-stat : fix invalid unlockKichan Kwon6-16/+19
- 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>
2016-12-12common : userinfo-list refactoringKichan Kwon5-98/+133
- 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>
2016-12-12Replace strerror to strerror_rKichan Kwon12-41/+56
- 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>
2016-12-12common : clean up DBusErrorKichan Kwon6-160/+155
- Define cleanup function - Remove unused variable Change-Id: I11ff0af7ffd55d47f3b0eccdbde652ec243493fe Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
2016-12-12proc-stat : improve stability about controlling proc_app_list.Kichan Kwon3-178/+240
- 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>
2016-12-12Simplify CMakefileKichan Kwon5-66/+31
- 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>
2016-12-12common : separate cgroup integer function with uint and intKichan Kwon8-64/+113
- Some numbers like pid should be written to unsigned int Change-Id: Id34e1395974afd7526e1d92bb2dcfef4a2fd4f84 Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
2016-12-10Allow ProcExclude signal without privilegesubmit/tizen_3.0/20161212.010021Kichan Kwon1-11/+31
- To allow the request of Minicontroller Change-Id: Iebaf678f2069b65216aeed3f311efbbfd5781b96 Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
2016-12-07heart : remove heart-appoptKichan Kwon4-806/+6
- 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>
2016-12-06heart : fix wrong battery indexingsubmit/tizen_3.0/20161206.084145accepted/tizen/3.0/wearable/20161207.012400accepted/tizen/3.0/tv/20161207.012342accepted/tizen/3.0/mobile/20161207.012325accepted/tizen/3.0/ivi/20161207.012417accepted/tizen/3.0/common/20161207.194604Kichan Kwon1-27/+47
- 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>
2016-12-06heart : detach async DB updatingKichan Kwon1-77/+13
- LevelDB is not thread-safe Change-Id: I845246c7041a120c8e710ce52c9c554732c0e012 Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
2016-12-05heart : upgrade HEART-batterysubmit/tizen_3.0/20161205.073831accepted/tizen/3.0/wearable/20161205.235106accepted/tizen/3.0/tv/20161205.235048accepted/tizen/3.0/mobile/20161205.235030accepted/tizen/3.0/ivi/20161205.235125Kichan Kwon3-78/+1010
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>
2016-12-05heart : fix minor issuesKichan Kwon2-32/+39
- Fix memory leak - Remove unreachable code - Fix cache searching condition Change-Id: Ia91f07461afa7a759899533276717ec2c175dfc0 Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
2016-12-05Fix minor issuesKichan Kwon2-2/+5
- Check memory allocation - Initialize variables Change-Id: I733751b3efd7042de73c6f8656421a1a4d0c4971 Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
2016-12-05Upgrade: set RW update script numberSunmin Lee2-2/+2
Change-Id: I77e66fb8cfd9cf19111af2e2dad91e5868fc313e [Rebase] Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
2016-12-05Upgrade: omit RO update commands in upgrade scriptSunmin Lee2-6/+0
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>
2016-11-22proc-stat : fix about ANR popup signallokilee731-28/+9
- 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>
2016-11-21Bug Fix & Minor code changesKunhoon Baik3-44/+49
- 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>
2016-11-21Merge branch 'tizen' into tizen_3.0Kichan Kwon7-35/+51
Change-Id: I24c32bc9ccf3e0ac85f5b84c26b57d2ded02c909 Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
2016-11-14Fix memory issuesKichan Kwon1-6/+6
Change-Id: If6b6aec2f11454c796b2f54615d99921926ff4f0 Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
2016-11-11Make rules about controlling cgroupKichan Kwon4-19/+20
- 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>
2016-11-11proc-stat : use glib for monitoring exclude listKichan Kwon3-16/+31
- For removing ecore-file dependency Change-Id: I2fb208e60c7bdd23d151eb6a3ab3ec93a629964f Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
2016-11-08Fix memory issuesKichan Kwon1-6/+6
Change-Id: If6b6aec2f11454c796b2f54615d99921926ff4f0 Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
2016-11-07Remove deprecated resourced.socketKichan Kwon3-12/+0
Change-Id: Id264986beb0d20a97303b666a9fa3bdc6c385908 Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
2016-11-07Code Clean: spec file has dead code.MyungJoo Ham1-9/+2
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>
2016-11-07proc-stat : create critical section for proc_app_listKichan Kwon8-8/+104
- System-freezer will link proc_app_list functions to use it Change-Id: I57acaba1bee806e98e7f42bdf4529a892cdb7dae Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
2016-11-07Fix minor issuesKichan Kwon3-7/+10
Change-Id: I129b4fd3dc0284223c419d930bb3c16356234c5e Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
2016-11-07common : remove not used systemd-utilKichan Kwon3-233/+0
Change-Id: I90368bebe65f9390feff539c20655c943b811506 Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
2016-11-07common : add cgroup control functionsKichan Kwon9-37/+410
- 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>
2016-11-07proc-stat : remove duplicated macroKichan Kwon2-7/+1
- Size converting macro is supported by resourced util Change-Id: I56365f759de498894c914e0b1f2943a83a9532a6 Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
2016-11-07common : combine lowmem-common with memory-commonKichan Kwon5-41/+12
Change-Id: I848de5426f563997be73e551d248796fed0335dc Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
2016-11-07common : improve per-app memory usage calculationKichan Kwon9-112/+305
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>
2016-11-07proc-stat : improve per-app CPU usage calculationKichan Kwon4-41/+59
- 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>
2016-11-07proc-stat : write appinfo into the file and exploit for restoringKichan Kwon5-2/+542
- 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>
2016-11-07common : each module can restore when resourced is restartedKichan Kwon8-49/+94
- 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>
2016-11-07common : improve module structureKichan Kwon9-41/+96
- 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>
2016-11-07cpu : move cgroup along with children.Kichan Kwon1-5/+23
Change-Id: Id177abb4510935da9396a72355c779ca81a91c4d Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
2016-11-07proc-stat : no more wrap structure around child pidKichan Kwon6-93/+36
- 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>
2016-11-03common : directly read user informationsubmit/tizen/20161111.004248accepted/tizen/wearable/20161114.003645accepted/tizen/tv/20161114.003620accepted/tizen/mobile/20161114.003554accepted/tizen/ivi/20161114.003721accepted/tizen/common/20161114.170718Kichan Kwon1-1/+1
Change-Id: I94a9d393236d73b44262ebc5631619eadd711284 Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
2016-10-25Remove meaningless format specifierKichan Kwon1-1/+1
Change-Id: Ib06118f5f7f49e7d01dc55b04d1d172ee20ec9b8 Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
2016-10-06Version upsubmit/tizen_3.0_wearable/20161015.000005submit/tizen_3.0_tv/20161015.000005submit/tizen_3.0_mobile/20161015.000006submit/tizen_3.0_common/20161104.104000submit/tizen_3.0/20161206.001603submit/tizen_3.0/20161028.082423submit/tizen_3.0/20161028.062323submit/tizen/20161006.084312accepted/tizen/wearable/20161007.103805accepted/tizen/tv/20161007.103810accepted/tizen/mobile/20161007.103758accepted/tizen/ivi/20161007.103815accepted/tizen/common/20161006.153829accepted/tizen/3.0/wearable/20161206.001919accepted/tizen/3.0/wearable/20161028.133612accepted/tizen/3.0/wearable/20161015.083932accepted/tizen/3.0/tv/20161206.001901accepted/tizen/3.0/tv/20161028.133309accepted/tizen/3.0/tv/20161016.005600accepted/tizen/3.0/mobile/20161206.001844accepted/tizen/3.0/mobile/20161028.132947accepted/tizen/3.0/mobile/20161015.034052accepted/tizen/3.0/ivi/20161206.001935accepted/tizen/3.0/ivi/20161028.133851accepted/tizen/3.0/common/20161114.110038Kichan Kwon1-2/+2
Change-Id: I0b9d4b361d0f69bea4e2bbfac0dfb49b65419660 Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
2016-10-05Merge "Add path variable in the script file" into tizenKichan Kwon1-2/+2
2016-10-04Make static global variable used in only one fileChang Hyeon Chae5-6/+6
Change-Id: Ida84dd5b4ef5334ea6c264c7697052962ed222c0 Signed-off-by: Chang Hyeon Chae <ckid.chae@samsung.com>
2016-10-04Add path variable in the script fileKichan Kwon1-2/+2
- For security issue Change-Id: Ia71a2197a1aeaff02b4b3ba651745c9d504a413d Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
2016-09-29Fix security issuessubmit/tizen_3.0_ivi/20161010.000006submit/tizen/20160929.083711accepted/tizen/wearable/20160929.233917accepted/tizen/tv/20160929.233928accepted/tizen/mobile/20160929.233921accepted/tizen/ivi/20160929.233932accepted/tizen/common/20160929.163548accepted/tizen/3.0/ivi/20161011.062315Kichan Kwon2-8/+17
- 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>