History log of /haiku/src/bin/debug/profile/Team.cpp
Revision Date Author Comments
# 4de612c9 05-Jul-2019 Murai Takashi <tmurai01@gmail.com>

bin/debug/profile: Fix -Wformat=

Change-Id: I94f9e4e68b75a7b84883d1bb7fe3f4e0aa7c6b8a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1563
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>


# 4dc355e9 27-Jun-2013 Rene Gollent <anevilyak@gmail.com>

Adjust debug_utils functions.

The functions in question now return an error rather than simply calling
exit() directly when they fail, as this behavior wasn't acceptable for
e.g. Debugger. Adjusted all calling apps accordingly.


# 756b64fd 16-Dec-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

* Removed the obsolescent [B]Reference[able] API and replaced the remaining
uses. Fixes the gcc 2 acpi build.
* Renamed WeakReferenceable::{Add,Remove}Reference() to
{Acquire,Release}Reference() for consistency.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39871 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 6a28c22f 21-Feb-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

More refactoring:
* Renamed *ProfileResultImage to *ImageProfileResult.
* Separated the image result management from the *ProfileResult classes:
- The general per-thread image management functionality does now live in
Thread.
- Introduced interface ImageProfileResultContainer which is implemented by
Thread. An instance is passed to ProfileResult::AddSamples()/PrintResult().
* Made *ProfileResultImage independent of Image. The dependency is now to
SharedImage only.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35556 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5fc675d5 20-Feb-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

Some refactoring:
* Added new class ProfiledEntity which Thread derives from and which is the
new dependency for the profile result classes (instead of Thread).
* Renamed *ThreadProfileResult to *ProfileResult and *ThreadImage to
*ProfileResultImage and move ProfileResult[Image] into a new header/source
file.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35546 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 227fe7d3 23-Apr-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Scheduler/wait object listener:
- Moved scheduler listening interface to <listeners.h> and added more
convenient to use templatized notification functions.
- Added a listener mechanism for the wait objects (semaphores, condition
variables, mutex, rw_lock).
* system profiler:
- Hopefully fixed locking issues related to notifying the profiler thread
for good. We still had an inconsistent locking order, since the scheduler
notification callbacks are invoked with the thread lock held and have to
acquire the object lock then, while the other callbacks acquired the object
lock first and as a side effect of ConditionVariable::NotifyOne() acquired
the thread lock. Now we make sure the object lock is the innermost lock.
- Track the number of dropped events due to a full buffer.
_user_system_profiler_next_buffer() returns this count now.
- When scheduling profiling events are requested also listen to wait objects
and generate the respective profiling events. We send those events lazily
and cache the infos to avoid resending an event for the same wait object.
- When starting profiling we do now generate "thread scheduled" events for
the already running threads.
- _user_system_profiler_start(): Check whether the parameters pointer is a
userland address at all.
- The system_profiler_team_added event does now also contain the team's name.
* Added a sem_get_name_unsafe() returning a semaphore's name. It is "unsafe",
since the caller has to ensure that the semaphore exists and continues to
exist as long as the returned name is used.
* Adjusted the "profile" and "scheduling_recorder" according to the system
profiling changes. The latter prints the number of dropped events, now.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30345 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 1b9d2885 16-Apr-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Also pass the team arguments and thread names with the respective system
profiling events.
* profile: Avoid using get_{team,thread}_info() in common code paths. The
system profiling mode is asynchronous, so the team or thread in question
could already be gone.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30193 a95241bf-73f2-0310-859d-f6bbb57e9c96


# afa231ac 15-Apr-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Reorganized the image management. Introduced a SharedImage which knows the
symbols and is identified by name. Image does still represent a team-bound
image, but it refers to a SharedImage for the symbols, now. This allows us
to load the symbols for a shared object only once and share the data for all
teams referring to it.
* Made the area used for system profiling writable. "-a -f" would segfault
since the return addresses are sorted in-place.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30170 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 0f379156 11-Apr-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* debug_create_symbol_lookup_context() gets a team ID instead of a
debug context now. That's all it needs.
* Added the option "-a" to the profile command line tool. It triggers profiling
of the whole system. There are still some issues, particularly image related
ones.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30129 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 8e28c17f 29-Sep-2008 Karsten Heimrich <host.haiku@gmx.de>

* gcc4/ build fix



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27783 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 120cfc62 29-Sep-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

Moved several classes into their own files.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27779 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 4dc355e9a98bf91d5e0851e432692fb267839de0 27-Jun-2013 Rene Gollent <anevilyak@gmail.com>

Adjust debug_utils functions.

The functions in question now return an error rather than simply calling
exit() directly when they fail, as this behavior wasn't acceptable for
e.g. Debugger. Adjusted all calling apps accordingly.


# 756b64fd836dad5b63f41f0b01f8cedfec795f9d 16-Dec-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

* Removed the obsolescent [B]Reference[able] API and replaced the remaining
uses. Fixes the gcc 2 acpi build.
* Renamed WeakReferenceable::{Add,Remove}Reference() to
{Acquire,Release}Reference() for consistency.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39871 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 6a28c22f5c460a3856cf35845bde71de1992ca94 21-Feb-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

More refactoring:
* Renamed *ProfileResultImage to *ImageProfileResult.
* Separated the image result management from the *ProfileResult classes:
- The general per-thread image management functionality does now live in
Thread.
- Introduced interface ImageProfileResultContainer which is implemented by
Thread. An instance is passed to ProfileResult::AddSamples()/PrintResult().
* Made *ProfileResultImage independent of Image. The dependency is now to
SharedImage only.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35556 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5fc675d57e5ebfc2ce837b9bad0fccd5b96c64d9 20-Feb-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

Some refactoring:
* Added new class ProfiledEntity which Thread derives from and which is the
new dependency for the profile result classes (instead of Thread).
* Renamed *ThreadProfileResult to *ProfileResult and *ThreadImage to
*ProfileResultImage and move ProfileResult[Image] into a new header/source
file.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35546 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 227fe7d34aeed45d0727a0abde2ea2309352983b 23-Apr-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Scheduler/wait object listener:
- Moved scheduler listening interface to <listeners.h> and added more
convenient to use templatized notification functions.
- Added a listener mechanism for the wait objects (semaphores, condition
variables, mutex, rw_lock).
* system profiler:
- Hopefully fixed locking issues related to notifying the profiler thread
for good. We still had an inconsistent locking order, since the scheduler
notification callbacks are invoked with the thread lock held and have to
acquire the object lock then, while the other callbacks acquired the object
lock first and as a side effect of ConditionVariable::NotifyOne() acquired
the thread lock. Now we make sure the object lock is the innermost lock.
- Track the number of dropped events due to a full buffer.
_user_system_profiler_next_buffer() returns this count now.
- When scheduling profiling events are requested also listen to wait objects
and generate the respective profiling events. We send those events lazily
and cache the infos to avoid resending an event for the same wait object.
- When starting profiling we do now generate "thread scheduled" events for
the already running threads.
- _user_system_profiler_start(): Check whether the parameters pointer is a
userland address at all.
- The system_profiler_team_added event does now also contain the team's name.
* Added a sem_get_name_unsafe() returning a semaphore's name. It is "unsafe",
since the caller has to ensure that the semaphore exists and continues to
exist as long as the returned name is used.
* Adjusted the "profile" and "scheduling_recorder" according to the system
profiling changes. The latter prints the number of dropped events, now.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30345 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 1b9d2885d30d9fb9bdd083550d9da97c0e80af6c 16-Apr-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Also pass the team arguments and thread names with the respective system
profiling events.
* profile: Avoid using get_{team,thread}_info() in common code paths. The
system profiling mode is asynchronous, so the team or thread in question
could already be gone.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30193 a95241bf-73f2-0310-859d-f6bbb57e9c96


# afa231acb89e3fe30b4b0afae6a17f7fa69078df 15-Apr-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Reorganized the image management. Introduced a SharedImage which knows the
symbols and is identified by name. Image does still represent a team-bound
image, but it refers to a SharedImage for the symbols, now. This allows us
to load the symbols for a shared object only once and share the data for all
teams referring to it.
* Made the area used for system profiling writable. "-a -f" would segfault
since the return addresses are sorted in-place.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30170 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 0f3791568750bf18150d932c1e5fba2a215b9344 11-Apr-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* debug_create_symbol_lookup_context() gets a team ID instead of a
debug context now. That's all it needs.
* Added the option "-a" to the profile command line tool. It triggers profiling
of the whole system. There are still some issues, particularly image related
ones.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30129 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 8e28c17f2fde6b54e7b59d53e781f88330709161 29-Sep-2008 Karsten Heimrich <host.haiku@gmx.de>

* gcc4/ build fix



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27783 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 120cfc62383936b6b6b17c1c19852b074ab87401 29-Sep-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

Moved several classes into their own files.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27779 a95241bf-73f2-0310-859d-f6bbb57e9c96