Commit Graph

26382 Commits

Author SHA1 Message Date
Ingo Weinhold
eba9a4c3ee * Introduced a per-team counter that is incremented whenever an image
is created or deleted (or exec*() has been invoked). The counter is
  sent with several debugger messages.
* Track the image event counter that is used when samples are added to
  the profiling buffer. If the current team counter differs, we flush
  the buffer first (sending an update message to the debugger), so that
  the debugger has a chance to match the addresses to the correct images.
* Disable profiling for a thread while it runs in the debugger support
  code. This fixes potential deadlocks which could occur when a
  profiling timer event occurred that would require the buffer to be
  flushed while the thread was just sending something to the debugger or
  waiting for a command. As it turns out, this is not sufficient either,
  since we should never try to flush the buffer when the timer event
  occurred in the kernel, since the thread might hold a lock that the
  debugger thread could try to acquire. Will implement a more general
  solution later.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27656 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-20 20:37:10 +00:00
Stephan Aßmus
18fe1bf6fb Small fix for 80 char/line limit.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27655 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-20 15:37:47 +00:00
Stephan Aßmus
a682d9819f Quite a cleanup action to avoid polluting the global namespace with private
BTextView classes:

* Declared the directly used BTextView helper classes as private BTextView
  classes and changed all affected files.
* Realized that Tracker's BPoseView was (accidentally?) using what used to
  be _BWidthBuffer_. It had declared it's own class with the same name and
  same members/size in headers/private/tracker/TextViewSupport.h, but the
  implementation was nowhere to be found. I can only explain this that
  the BTextView implementation was then actually linked and used. But the big
  problem was that it was used without locking (unlike in BTextView)! When
  many Tracker windows opened during system startup or later and they happened
  to each request characters not yet in the cache, I imagine things could have
  gone bad and corrupted memory. Anyways, since I can see the usefulness of
  the cache, BPoseView uses BTextView::WidthBuffer on purpose now. And I moved
  the locking inside BTextView::WidthBuffer::StringWidth().
* Adjusted InterfaceDefs.cpp accordingly.
* TODO: Move subsequent classes into BTextView namespace as well, ie derived
  classes that BTextView doesn't directly know about. All stuff in src/kits/
   inteface/textview_support/
* Added preliminary and not yet implemented layout friendly BTextView
  constructors.
* I will try to handle the insets imposed by BTextView::fTextRect a bit
  differently when used inside the new layout management framework. For this,
  I added BTextView::SetInsets() and GetInsets(). SetInsets() doesn't do
  anything yet.

So far, everything seems to work still... ;-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27654 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-20 15:08:40 +00:00
Stephan Aßmus
8121345989 * Don't disable the controls completely if subpixel anti-aliasing is not
available for hinted font rendering. Instead, display the information that
  only this combination has no effect on Haiku builds without subpixel based
  freetype rendering. Better fix for 2753.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27653 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-20 14:25:07 +00:00
Stephan Aßmus
60497da7e0 Coding style cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27652 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-20 14:23:13 +00:00
Ingo Weinhold
b533a08728 Implemented tracking image creation/deletion. It's not fully correct
yet, since there's no synchronization of the sample evalution with the
image creation/deletion. That is samples taken before an exec*() could
be evaluated after the new images have already been loaded and could
thus be translated to the wrong functions.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27651 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-20 14:10:57 +00:00
Ingo Weinhold
4ed8088f9a Added new debugger message B_DEBUGGER_MESSAGE_TEAM_EXEC, sent when
exec*() has been called.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27650 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-20 13:59:41 +00:00
Ingo Weinhold
78b13af677 The handling of a full profiling buffer couldn't work for two reasons:
* We can't enable interrupts in an interrupt handler. Instead we use the
  newly introduced callback feature, which notifies the debugger right
  before returning from the interrupt.
* We didn't indicate that the profiling buffer was full and that the
  thread shouldn't be profiled ATM. Therefore it could happen that it
  was profiled while trying to notify the debugger that the profiling
  buffer was full, resulting in a deadlock. Introduce a respective flag
  in the thread debug structure.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27649 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-20 12:44:41 +00:00
Ingo Weinhold
23884ae025 Introduced a callback field in the thread structure. It can be set in an
interrupt handler and will be executed right before returning from the
interrupt.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27648 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-20 12:38:27 +00:00
Karsten Heimrich
bef5fffeae * use B_PNG_FORMAT, thanks Stephan
* truncate the path label, since a long path would automatically
  resize the window to something unusable in that case...

  Note: somehow the PopUpMenu does ignore a set max column size
        expanding from small to large leaves some drawing artefacts



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27647 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-20 10:49:00 +00:00
Stephan Aßmus
1aaf53ecac I accidentally removed some backwards compatible behavior. When there is no
label, a TextControl maintains it's current width in ResizeToPreferred() if
it is wide enough. Should fix #2751.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27646 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-20 10:46:09 +00:00
Karsten Heimrich
c7d112ff6a * unmark existing marked items in case we add a new item that is marked
i did exactly that way in my code, which messed up the location popup 



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27645 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-20 10:25:55 +00:00
Karsten Heimrich
d1fe803469 * automatic whitespace cleanup
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27644 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-20 10:17:00 +00:00
Stephan Aßmus
37b9874302 Update header indentation style.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27643 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-20 10:09:32 +00:00
Karsten Heimrich
fc3bed0577 * implement saving
* have png and home as default
* still misses some kind of settings...



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27642 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-20 09:35:20 +00:00
Philippe Houdoin
1c971ca7f0 Document the new HAIKU_IMAGE_LABEL user build option in UserBuildConfig.ReadMe. Thanks Ingo for pointing it.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27641 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-20 00:39:21 +00:00
Ingo Weinhold
424f833bc9 * Changed the profiling API: Instead of sending all functions that shall
be tracked to the kernel, which then counts the hits, an area is
  passed to kernel in which the hits are recorded. When the area is
  full, the debugger is notified. For some reason that part doesn't work
  yet -- the whole system freezes when waiting for a reply.
* Reorganized the profile tool code a bit. For one with respect to the
  changed API, but also to prepare tracking of image creation/deletion.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27640 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-20 00:34:03 +00:00
Karsten Heimrich
4ae1ed90b8 use whitespaces instead of dots
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27639 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-19 23:26:25 +00:00
Karsten Heimrich
9b4277bd75 * typos
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27638 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-19 23:16:21 +00:00
Karsten Heimrich
9f07ffa384 * reorganize options
* implement silent mode using the existing BWindow code



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27637 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-19 23:14:23 +00:00
Philippe Houdoin
127456e5b5 Added user-defined image volume label support.
The default label is as previously: Haiku.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27636 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-19 17:32:57 +00:00
Stephan Aßmus
0a2452f0da Appearance cannot be built for BeOS.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27635 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-19 11:26:56 +00:00
Stephan Aßmus
8cfc10ab72 * Use layout management in the AntialiasingSettingsView.
* Remove unused code.
* Remove INSTANT_UPDATE define, I guess instant update is always wanted.
* Replaced text control for setting the "averaging strength" with a slider
  and hopefully improved label.
* Simplified other labels a bit as well.
* Added detection of subpixel rendering availability by peeking into the
  Freetype option header. If it's not turned on, then the controls are not
  displayed and instead there is a text explaining the problem and hinting
  at what needs to be done in order to enable the feature.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27634 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-19 11:26:11 +00:00
Stefano Ceccherini
b7ef02aac6 use defines for some gif flags, for clearer code. Reordered initializers to avoid warnings.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27633 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-19 09:39:19 +00:00
Axel Dörfler
d3ae536bb9 * Made callout_pending() and callout_active() real functions instead of macros;
that makes drivers using it more independent from internal net_timer changes.
* Correctly implemented callout_active() using the new is_timer_running()
  stack function.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27632 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-19 09:26:14 +00:00
Axel Dörfler
491da20dbf * Added a is_timer_running() function.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27631 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-19 09:11:12 +00:00
Axel Dörfler
e167a0a5d9 * Added definition of CALLOUT_MPSAFE. This closes ticket #2752.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27630 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-19 08:33:23 +00:00
David McPaul
cac510c913 changes based on feedback from stippi
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27629 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-19 07:04:49 +00:00
Ingo Weinhold
abb2df34ee * SymbolLookup: Implemented loading the symbol tables from the shared
object files. Thus static functions will be found, too.
* debug_lookup_symbol_address() and debug_next_image_symbol() no longer
  need to read the symbol name via the debugger API, since the
  respective SymbolLookup methods compute the length of the symbol name
  that can safely be accessed locally, now.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27628 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-18 22:17:11 +00:00
Axel Dörfler
6126236e8a * Minor cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27627 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-18 16:04:28 +00:00
Stephan Aßmus
e9a105668d Update some comments after understanding things better. Some things which got
me confused were perfectly correct.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27626 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-18 15:35:54 +00:00
Axel Dörfler
35a16d8f5e * Moved the inode_types into Utilities.h.
* Added a S_EXTENDED_TYPES constant to simplify some checks.
* Simplified the fAllowDuplicates computation in BPlusTree::SetTo().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27625 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-18 15:22:29 +00:00
Stephan Aßmus
aecd884e05 * Added some hopefully helpful comments.
* Replaced my bogus comment that Ingo pointed out with a description that
  mentions LogicalPartitions also being used to describe so called "inner
  extended" partitions, which are only needed to point to the next PTS.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27624 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-18 14:56:49 +00:00
Axel Dörfler
e73923b0c2 * Renamed static recursive lock variables to match our coding style guidelines.
* Renamed runtime loader semphore to something clearer.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27623 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-18 14:01:29 +00:00
Axel Dörfler
95deefbf66 * Fixed wrong indentation and spacing.
* Enlarged default port size to 50.
* Added license header.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27622 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-18 13:12:22 +00:00
Axel Dörfler
01774b2af5 * Added optional package for BePDF 1.0.0b2.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27621 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-18 12:55:59 +00:00
Axel Dörfler
8f3c0d9fcc * wait_for_timer() now returns a status code.
* wait_for_timer() now detects if it has been called from within the timer
  execution thread, and will return in error instead of waiting for itself
  forever. This fixes bug #2682.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27620 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-18 12:45:43 +00:00
Stephan Aßmus
deb37e6f6b Added Network icon based on a patch sent by Meanwhile. Thanks!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27619 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-18 12:05:04 +00:00
Stephan Aßmus
9acc70ce90 Cleanup and simplification of the Pairs icon, based on a patch sent by
Meanwhile. Thanks!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27618 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-18 11:27:03 +00:00
Stefano Ceccherini
136d40a890 in case the passed name was NULL, the TeamMenuItem would set a NULL label, instead of passing the 'team n' string. Also use snprintf() to build said string, and change the code a bit. malloc.h > stdlib.h, and don't check for null before calling free()
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27617 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-18 10:24:19 +00:00
Stephan Aßmus
11b3c08b53 More comments about things that got me confused.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27616 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-18 09:22:06 +00:00
Stephan Aßmus
f1c34ec3eb Ah yes, here is the TODO I wrote with regards to the comment in my earlier
commit.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27615 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-18 09:20:34 +00:00
Stephan Aßmus
daa191ec7c Simplified a bit the extended partition parsing loop, no functional changes
intended. I am wondering though about the offset that is passed to the
logical partitions. If I am not confused, later partitions still use the
primary partition's offset as base offset, so I am wondering if more than
two non-extended logical partitions would work.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27614 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-18 09:19:20 +00:00
Stephan Aßmus
5eb27029ee * Only renamed a few variables to fit our style guide.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27613 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-18 09:14:50 +00:00
Axel Dörfler
21b592c551 * Added Screenshot app to the build.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27612 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-18 08:49:52 +00:00
Axel Dörfler
9a6072a35f * Resolved TODO added by Ingo: the runtime loader now lazily updates its
image IDs when needed.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27611 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-18 08:04:29 +00:00
Stefano Ceccherini
3534ce57f0 malloc.h ain't no standard header. Small style change.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27610 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-18 07:02:15 +00:00
Stefano Ceccherini
c2831e444a Use GetTrackerIcon() in case getting the specific app icon fails, instead of using the (outdated) icon in the resource. Fixes bug #984. Thanks to Stephan for the hint.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27609 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-18 06:55:59 +00:00
Ingo Weinhold
2f5c4a90d8 We don't get a separate B_DEBUGGER_MESSAGE_THREAD_CREATED message after
a B_DEBUGGER_MESSAGE_TEAM_CREATED, so we have to immediately start
profiling the main thread.
Profiling child processes basically works now, but since we still don't
track image creation/deletion, the results aren't correct yet (that is
library symbols might keep the same addresses).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27608 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-18 00:20:13 +00:00
Ingo Weinhold
eb333098fe Added work-around for a runtime loader problem after fork(). Its image
structures still have the parent IDs, so finding an image by ID would
fail in this case. We do now fall back to getting the image's text base
address and finding the image by address.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27607 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-18 00:15:44 +00:00