summaryrefslogtreecommitdiffstats
path: root/darwin/DarwinProcess.c
Commit message (Collapse)AuthorAgeFilesLines
* Refactor Darwin platform unit conversion helpersAlexander Momchilov2021-08-251-9/+2
|
* Style touch-upsAlexander Momchilov2021-08-231-5/+5
|
* Fix macOS CPU time calculationsAlexander Momchilov2021-08-231-9/+27
|
* Darwin: Always update usernameBenny Baumann2021-06-221-1/+0
|
* Darwin: Implement CWD columnBenny Baumann2021-05-251-0/+25
|
* Add ELAPSED process columnChristian Göttsche2021-05-231-1/+1
| | | | | | | | | Add process columns showing the elapsed time since the process was started. Similar to STARTTIME, but shows the time passed since the process start instead of the fixed start time of the process. Closes https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=782636
* Darwin: use merged command line helpersChristian Göttsche2021-05-231-16/+24
|
* Call makeCommandStr on all platformsBenny Baumann2021-05-231-0/+1
|
* Move kernel/userland thread handling to platform-independent implementationBenny Baumann2021-05-231-5/+2
|
* Rename cmdlineBasenameOffset to cmdlineBasenameEnd to properly indicate the ↵Benny Baumann2021-05-231-8/+8
| | | | fields purpose
* Rename basenameOffset to cmdlineBasenameOffsetBenny Baumann2021-05-231-9/+10
|
* Rename command line field from comm to cmdlineBenny Baumann2021-05-231-1/+1
|
* platform-dependent files included relative to main source directorymayurdahibhate2021-05-101-2/+2
|
* Rework TTY columnChristian Göttsche2021-04-141-4/+10
| | | | | | | | | | * Rename internal identifier from TTY_NR to just TTY * Unify column header on platforms * Use devname(3) on BSD derivate to show the actual terminal, simplifies current FreeBSD implementation. * Use 'unsigned long int' as id type, to fit dev_t on Linux. Only on Solaris the terminal path is not yet resolved.
* Darwin: add normalized CPU percentage columnChristian Göttsche2021-03-031-0/+1
| | | | Missed in 15eab2012d21
* Sort out the mess around column sorting that had accumulated over timeDaniel Lange2021-01-211-7/+7
|
* Object: return int on comparisonChristian Göttsche2021-01-021-1/+1
| | | | | Comparisons do, due to the new introduced shaceship-comparisons, only return -1, 0, 1 or the result of strcmp().
* Make remaining number literals use uppercaseBenny Baumann2020-12-201-1/+1
|
* Unhardcode tick-to-ms conversionAlexander Momchilov2020-12-191-12/+10
| | | | | | | | | Division by 100000.0 worked because `sysconf(_SC_CLK_TCK)` happened to be 100. By unhardcoding: 1) It becomes more clear what this 100000.0 figure comes from. 2) It protects against bugs in the case `sysconf(_SC_CLK_TCK)` ever changes.
* Merge Process_pidColumns into Process_fields and rework auto-fit for ↵Christian Göttsche2020-12-191-7/+7
| | | | PID-like columns
* Rework enum ProcessFieldChristian Göttsche2020-12-191-4/+3
| | | | | | Use only one enum instead of a global and a platform specific one. Drop Platform_numberOfFields global variable. Set known size of Process_fields array
* Split boilerplate and platform-independent field comparisonBenny Baumann2020-12-191-1/+1
| | | | | | | | This acheives two things: - Allows for simple tie-breaking if values compare equal (needed to make sorting the tree-view stable) - Allows for platform-dependent overriding of the sort-order for specific fields Also fixes a small oversight on DragonFlyBSD when default-sorting.
* Invert Process_compare resolution so that superclass matches run firstHisham Muhammad2020-12-191-14/+7
| | | | | | | | | | * This removes duplicated code that adjusts the sort direction from every OS-specific folder. * Most fields in a regular htop screen are OS-independent, so trying Process_compare first and only falling back to the OS-specific compareByKey function if it's an OS-specific field makes sense. * This will allow us to override the sortKey in a global way without having to edit each OS-specific file.
* Merge branch 'fix_mach_timebase' of benbe/htopDaniel Lange2020-12-131-1/+2
|\
| * Correct timebase for non-x86 CPUs on DarwinBenny Baumann2020-12-131-1/+2
| | | | | | | | Fixes: #368
* | Add column in darwin to indicate whether the the process is running under ↵Dániel Bakai2020-12-131-11/+53
| | | | | | | | translation
* | Move Process_fields from darwin/Platform to darwin/DarwinProcessDániel Bakai2020-12-131-0/+29
|/
* Cull the definitions of pageSize and pageSizeKB from CRT.cNathan Scott2020-12-101-2/+2
| | | | | | | | | | | | | | | By storing the per-process m_resident and m_virt values in the form htop wants to display them in (KB, not pages), we no longer need to have definitions of pageSize and pageSizeKB in the common CRT code. These variables were never really CRT (i.e. display) related in the first place. It turns out the darwin platform code doesn't need to use these at all (the process values are extracted from the kernel in bytes not pages) and the other platforms can each use their own local pagesize variables, in more appropriate locations. Some platforms were actually already doing this, so this change is removing duplication of logic and variables there.
* Rename virtual memory column from M_SIZE to M_VIRTChristian Göttsche2020-11-211-2/+2
| | | | Closes: #325
* DarwinProcess: mark local function static and sort includesChristian Göttsche2020-11-171-7/+6
|
* Spacing around operatorsBenny Baumann2020-11-021-6/+6
|
* Whitespace and indentation issuesBenny Baumann2020-11-021-9/+9
|
* Spacing after keywords (if)Benny Baumann2020-11-021-3/+3
|
* Hold only a const version of Settings in ProcessChristian Göttsche2020-10-261-2/+2
|
* Cache PAGE_SIZEChristian Göttsche2020-10-191-2/+4
| | | | | | man:sysconf(3) states: The values obtained from these functions are system configuration constants. They do not change during the lifetime of a process.
* Refactor generating starttime string into Process classChristian Göttsche2020-10-161-10/+4
|
* Mark remaining classes constChristian Göttsche2020-10-131-1/+1
|
* Mark process argument of Process_isThread constChristian Göttsche2020-10-091-1/+1
|
* Update License consistently to GPLv2 as per COPYING fileDaniel Lange2020-10-051-1/+1
|
* Axe automated header generation.Zev Weiss2020-09-031-15/+0
| | | | | | | | | | | | | | Reasoning: - implementation was unsound -- broke down when I added a fairly basic macro definition expanding to a struct initializer in a *.c file. - made it way too easy (e.g. via otherwise totally innocuous git commands) to end up with timestamps such that it always ran MakeHeader.py but never used its output, leading to overbuild noise when running what should be a null 'make'. - but mostly: it's just an awkward way of dealing with C code.
* Clean up existing whitespaceDaniel Flanagan2019-10-311-6/+6
|
* If task_for_pid fails, stop trying.Hisham2016-03-311-0/+9
|
* Run through all command line arguments on Darwin.Hisham Muhammad2016-02-181-56/+10
| | | | | Also fixes the basename offset for highlighting the basename. Closes #379.
* Scan threads for process state information.Hisham Muhammad2016-02-181-9/+64
| | | | | | Based on: http://stackoverflow.com/questions/6788274/ios-mac-cpu-usage-for-thread and https://github.com/max-horvath/htop-osx/blob/e86692e869e30b0bc7264b3675d2a4014866ef46/ProcessList.c This should be a fix for #361.
* Fix tree organization on OSX.Hisham Muhammad2016-02-181-1/+2
| | | | Closes #393.
* Fix memory accounting in Darwin.Hisham2016-02-131-2/+2
| | | | | | | | | | htop currently expects m_size and m_resident in pages (Process.c). According to the proc_info.h header, the values returned by libproc are in bytes: http://www.opensource.apple.com/source/xnu/xnu-1456.1.26/bsd/sys/proc_info.h Eventually we should change the htop crossplatform API to expect memory in bytes, but this is the smaller change that should fix it. Closes #385.
* Check for failure in allocations.Hisham2016-02-021-4/+4
|
* Calculate CPU averages on Darwin (See #295).Hisham Muhammad2015-10-231-5/+5
|
* fix calloc() callsChristian Hesse2015-09-071-1/+1
| | | | | | | * size_t nmemb (number of elements) first, then size_t size * do not assume char is size 1 but use sizeof() * allocate for char, not pointer to char (found by Michael McConville, fixes #261)
* Standardize indentation.Hisham Muhammad2015-08-191-85/+85
|

© 2014-2024 Faster IT GmbH | imprint | privacy policy