~ubuntu-branches/ubuntu/natty/libreoffice-l10n/natty-security

« back to all changes in this revision

Viewing changes to libreoffice-build/doc/configmgr.txt

  • Committer: Package Import Robot
  • Author(s): Matthias Klose
  • Date: 2011-01-19 15:13:37 UTC
  • mfrom: (0.3.1) (0.2.1) (0.1.1)
  • Revision ID: package-import@ubuntu.com-20110119151337-5pr1w2ev91hmmdye
Tags: 1:3.3.0~rc3-2ubuntu1
* Merge 3.3.0~rc3 changes.
* Merged Debian packaging up to r2330.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
** More re-factoring TODOs:
 
2
 
 
3
    + remove IConfigBroadcaster - only 1 sub-class
 
4
        ConfigChangeBroadcaster [!?]
 
5
 
 
6
** older material:
 
7
 
 
8
+ interlocked foo ..
 
9
    + salhelper::SimpleReferenceObject
 
10
    + bin 'simplereferenceobject.hxx' includes (?)
 
11
+ kill memory-segment foo ...
 
12
+ kill cacheline accessor bits 
 
13
 
 
14
+ back-port:
 
15
    + commit ...
 
16
 
 
17
+ add locking to the 'idle writer' [thing...]
 
18
+ next slow thing:
 
19
    + the binary cache reading thing [urgh]
 
20
        + string reduction foo ...
 
21
 
 
22
 
 
23
** Warning Free Build ** [!?:-]
 
24
 
 
25
+ profiling:
 
26
    + string / isNamed optimisation
 
27
    + implMakeNormalizedPredicate:
 
28
        + pre-scan to avoid allocation / duplication (?)
 
29
        + what is the common case ?
 
30
 
 
31
    + we call 'implMakeCompositeName'
 
32
        then  'implSplitCompositeName' - in short sequence ...
 
33
            + tons of extra allocation & pain ;-) [ why ? ]
 
34
 
 
35
+ this is calling 'getElementNames' ... [ how can it be so slow ? ;-]
 
36
    + the 'ElementTree' sub-class needs to be cleverer [!]
 
37
 
 
38
2 - SetVisitorAdaptor::visit
 
39
3 - CollectNodeNames::handle
 
40
4 - Tree::getName
 
41
5 - TreeImpl::getSimpleNodeName
 
42
6 - TreeImpl::getSimpleRootName
 
43
    Name TreeImpl::getSimpleRootName() const
 
44
    {
 
45
        return doGetRootName().getName();
 
46
    }
 
47
        -> configpath.cxx (Component::getName):
 
48
            Name Component::getName()    const SAL_THROW(())
 
49
            {
 
50
                if (isSimpleName()) return m_aName;
 
51
 
 
52
                OUString sName, sType;
 
53
                implSplitCompositeName(m_aName,sType,sName);
 
54
        
 
55
                return Name(sName,PackageOnly());
 
56
            }
 
57
        -> [ URGH !? ;-]
 
58
 
 
59
7 - ElementTreeImpl::doGetRootName
 
60
    Path::Component ElementTreeImpl::doGetRootName() const
 
61
        { return makeExtendedName( m_aElementName ); }
 
62
8 - ElementTreeImpl::makeExtendedName ...
 
63
    Path::Component ElementTreeImpl::makeExtendedName(Name const& _aSimpleName) const
 
64
    {
 
65
        Name aTypeName = implGetOriginalName(root_());
 
66
        ... grind grind ...
 
67
 
 
68
 
 
69
            CollectPropertyInfo::Result CollectNodeNames::handle(configuration::Tree const& aTree, configuration::NodeRef const& aNode)
 
70
            {
 
71
                    m_aList.push_back(aTree.getName(aNode).toString());
 
72
                    return CONTINUE;
 
73
            }
 
74
 
 
75
 
 
76
+ before:
 
77
(per iteration) 0.068004
 
78
(per iteration) 0.065609
 
79
(per iteration) 0.065594
 
80
with Accessor stubbed:
 
81
(per iteration) 0.055364
 
82
(per iteration) 0.055060
 
83
(per iteration) 0.054961
 
84
 
 
85
+ remove accessor.hxx ...
 
86
 
 
87
+ to debug:
 
88
    ENVCFGFLAGS="-me -tiwepd" ./soffice.bin -writer
 
89
 
 
90
+ 'OneLock'
 
91
    + bin 'Accessor' foo ...
 
92
    + 
 
93
 
 
94
inc/
 
95
attributelist.hxx:69:    virtual sal_Int16 SAL_CALL getLength(void) throw (::com::sun::star::uno::RuntimeException);
 
96
bootstrapcontext.hxx:137:                throw (uno::RuntimeException);
 
97
bootstrap.hxx:112:            throw (uno::RuntimeException) ;
 
98
cacheddataprovider.hxx:204:                The exact exception being thrown may depend on the underlying backend.
 
99
configexcept.hxx:125:           WrappedUnoException rethrowWrapped(Except const& anException)
 
100
confsvccomponent.hxx:84:                virtual uno::Sequence<sal_Int8> SAL_CALL getImplementationId(  ) throw(uno::RuntimeException);
 
101
interactionrequest.hxx:114:            throw( uno::RuntimeException );
 
102
mergeddataprovider.hxx:83:            @throws com::sun::star::uno::Exception
 
103
oslstream.hxx:85:                throw(stario::NotConnectedException, stario::BufferSizeExceededException, staruno::RuntimeException);
 
104
propertysethelper.hxx:78:    virtual uno::Any SAL_CALL queryInterface( uno::Type const & rType ) throw (uno::RuntimeException);
 
105
serviceinfohelper.hxx:116:            throw(uno::RuntimeException);
 
106
 
 
107
 
 
108
api2/
 
109
    + ' impl.*' all in these guys:
 
110
accessimpl.hxx:85:                      throw(uno::RuntimeException);
 
111
    + all take 'GuardedNodeDataAccess' ...
 
112
        + clobbered that (accessimpl.hxx)
 
113
apinotifierimpl.hxx:74:                 throw(uno::RuntimeException);
 
114
    + uses GuardedNotifier (cf. confignotifier.hxx)
 
115
elementimpl.hxx:80:                     throw(uno::RuntimeException);
 
116
    + some manual extras ...
 
117
    + also DisposeGuard -> UnoApiLock (confignotifier.hxx)
 
118
    + also GuardedRootElement (apitreeaccess.hxx)
 
119
    + also GuardedTreeElement
 
120
propsetaccessimpl.hxx:149:                      throw(beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException);
 
121
    + GuardedNodeUpdate - also take it ...
 
122
    + some explicit ...
 
123
providerimpl.hxx:163:                @throws com::sun::star::lang::IllegalArgumentException
 
124
    + non-event (?)
 
125
updateimpl.hxx:69:                      throw(css::lang::IllegalArgumentException, css::container::NoSuchElementException, css::lang::WrappedTargetException, uno::RuntimeException);
 
126
    + use existing guards...
 
127
 
 
128
 
 
129
+ locked:
 
130
    confprovider2.hxx:78:                               throw(uno::Exception, uno::RuntimeException);
 
131
        + clobbered
 
132
    provider.hxx:135:           virtual uno::Reference< beans::XPropertySetInfo > SAL_CALL getPropertySetInfo(  ) throw(uno::RuntimeException);         
 
133
        + clobbered
 
134
 
 
135
    propertiesfilterednotifier.hxx:58:          virtual void SAL_CALL acquire(  ) throw();
 
136
    propertyinfohelper.hxx:62:                  throw(uno::RuntimeException);
 
137
        + looks ok.
 
138
 
 
139
elementaccess.hxx:118:          virtual void SAL_CALL acquire() throw();
 
140
groupaccess.hxx:94:                             throw(uno::RuntimeException);
 
141
groupobjects.hxx:85:            uno::Any SAL_CALL queryInterface( uno::Type const& rType ) throw (uno::RuntimeException );
 
142
groupupdate.hxx:68:             uno::Any SAL_CALL queryInterface( uno::Type const& rType ) throw (uno::RuntimeException );
 
143
listenercontainer.hxx:170:                       * @throw com::sun::star::lang::DisposedException
 
144
propertysetaccess.hxx:103:                      throw(uno::RuntimeException);
 
145
setaccess.hxx:105:                              throw(uno::RuntimeException);
 
146
setobjects.hxx:84:              uno::Any SAL_CALL queryInterface( uno::Type const& rType ) throw (uno::RuntimeException );
 
147
setupdate.hxx:78:               uno::Any SAL_CALL queryInterface( uno::Type const& rType ) throw (uno::RuntimeException );
 
148
 
 
149
 
 
150
+ regression tests:
 
151
    // May be there is no type set ...
 
152
    if (xCfg->hasByName(TYPES_SET))
 
153
        + called on a 'set' instead of a value ... [!?]
 
154
 
 
155
 
 
156
+ treemgr/ - API:
 
157
    configpath.cxx:
 
158
        + configuration::Name (oustring), ::Path, 
 
159
    configdefaultprovider.cxx
 
160
    configexcept.cxx - exceptions
 
161
    configgroup.cxx
 
162
    configset.cxx
 
163
    nodechange.cxx
 
164
    nodechangeinfo.cxx
 
165
    noderef.cxx
 
166
    roottree.cxx
 
167
    template.cxx
 
168
 
 
169
    + 'viewstrategy' - determines how the view is used ...
 
170
    + TreeMgr: evilness:
 
171
        + bin evil 'source/treemgr/viewnode.hxx' ...
 
172
            + 'Tree' (Accessor+'TreeData*')
 
173
 
 
174
 
 
175
 
 
176
+ Profile:
 
177
    + kcachegrind shows lots of time in GroupNodeAccess::implGetChild(Name)...
 
178
        + ~300k calls to 'compare' during writer startup
 
179
        + ViewStrategy's 'getMemberValueAccess' ...
 
180
    + a 1 element cache:
 
181
        - check the last thing,
 
182
        + the one after [ for linear walks ]
 
183
            + should be easy ... :-)
 
184
        + cf. ~/esc/amd/configmgr-performance.png [!]
 
185
            + should save a -ton- of cycles ...
 
186
 
 
187
** TODO:
 
188
   + understand how writes to the treecache work ...
 
189
        + api2/propsetaccessimpl.cxx (implSetPropertyValue):
 
190
                NodeChange aChange = lock.getNodeUpdater().validateSetValue( aChild, aValue );
 
191
                if (aChange.test().isChange())
 
192
                {
 
193
                        Broadcaster aSender(rNode.getNotifier().makeBroadcaster(aChange,true));
 
194
                        aSender.queryConstraints(aChange);
 
195
                        aTree.integrate(aChange, aNode, true);
 
196
        + treemgr/noderef.cxx (Tree::integrate):
 
197
                aChange.apply();
 
198
        + treemgr/nodechangeimpl.cxx (implApply)
 
199
                ... -> virtual 'doApply'
 
200
        + treemgr/valuemembernode.cxx (ValueMemberUpdate::setValue)
 
201
                + deferredoperation [or] - 'data::ValueNodeAccess::setValue ...'
 
202
        + tree/valuenodeaccess.cxx
 
203
                + [ just writes directly into sharable::ValueNode ]
 
204
   + how does ' SetInsertImpl' work ?
 
205
        + (?) ->
 
206
        + treemgr/viewstrategy.cxx 'ViewStrategy::insertElement' ->
 
207
            'ViewStrategy::doInsertElement' (virtual)
 
208
            -> deferredview, readonlyview, directview ...
 
209
        + treemgr/setnodeimpl.cxx (insertElement)
 
210
            + 'ElementSet::insertElement'
 
211
                + whacks it into a hash: 'ElementSet' ...
 
212
        + treemgr/directview.cxx (doInsertElement):
 
213
        + treemgr/treeimpl.cxx (ElementTreeImpl::attachTo)
 
214
        if (memory::Segment * pTargetSpace = getUpdatableSegment(*pOwningTree))
 
215
        {
 
216
            memory::UpdateAccessor aTargetAccessor(pTargetSpace);
 
217
 
 
218
            // copy over to the new segment
 
219
            data::TreeAddress aNewElement = m_aOwnData.getTreeAccess().copyTree(aTargetAccessor);
 
220
            data::SetNodeAccess::addElement(aOwningSet,  aNewElement);
 
221
            data::TreeAccessor aNewAccessor(aTargetAccessor.downgrade(),aNewElement);
 
222
            rtl::Reference<view::ViewStrategy> xNewBehavior = pOwningTree->getViewBehavior();
 
223
            this->rebuild(xNewBehavior,aNewAccessor,m_aOwnData.getAccessor());
 
224
        + treemgr/setnodeaccess.cxx (SetNodeAccess::addElement)
 
225
            + Just (pre)-pends to linked list [ no memory problems ... ]
 
226
** Understand - set removal & holding of references ... [?]
 
227
   + all refs by name ?
 
228
        + Only 2 types of change: SetChange & NodeChange ...
 
229
 
 
230
   + understand how locking / lifecycle works here ...
 
231
        + [ if at all (!) ]
 
232
 
 
233
** Obvious:
 
234
+ cleanup:
 
235
   'sharable' -> 'shareable' ? 
 
236
/data/OpenOffice/ooe680-m2/configmgr/source/tree/builddata.cxx:636: warning: unused parameter ‘_anUpdater’
 
237
/data/OpenOffice/ooe680-m2/configmgr/source/data/anydata.cxx:430: warning: unused parameter ‘_anAccessor’
 
238
/data/OpenOffice/ooe680-m2/configmgr/source/data/sequence.cxx:384: warning: unused parameter ‘_anAccessor’
 
239
/data/OpenOffice/ooe680-m2/configmgr/source/tree/setnodeaccess.cxx:108: warning: unused parameter ‘_aAccessor’
 
240
 
 
241
** Next step:
 
242
    + Hack cacheline.cxx - m_base storage [etc. !]...
 
243
 
 
244
    + Start on the NodeAddress -> NodeAccessor change ?
 
245
 
 
246
    + have a drive on removing un-used UpdateAccessors ? [etc.]
 
247
        + have a 'SegmentLock' instead (?)
 
248
 
 
249
** understand the treecache
 
250
    + grep -R '"cache' source
 
251
        + shows the entry points [!]
 
252
 
 
253
    + 'cacheddataprovider.hxx'
 
254
        + seems to be the main lifecycle API
 
255
    + cachefactory.hxx: 'createCacheManager'
 
256
        + api2/providerimpl.cxx:
 
257
            + returns a 'TreeManager'
 
258
            + access goes via that API ...
 
259
**  + All calls come in via the TreeManager impl ...
 
260
 
 
261
    ** TreeManager holds 'CacheData' and also a map of
 
262
                         CacheClientAccess -> CacheData
 
263
 
 
264
    + When a module is 'dead'
 
265
        + cacheaccess.cxx: CacheLoadingAccess tracks it in m_aDeadModules (2x)
 
266
        + CacheLoadingAccess
 
267
            - rather naughty about tracking the modules
 
268
            - doesn't clean them from the CacheData object.
 
269
        + everyone else is rather good ...
 
270
    + What is the relation between CacheLoadingAccess & CacheData ?
 
271
        + is the client ref count critical ?
 
272
                + clientRelease / clientAcquire
 
273
                + CacheLineClientRef - under-used & bogus internal ref.
 
274
        + reference++:
 
275
                + acquireModule, acquireNode, insertDefaults,
 
276
                  addTemplates, addComponentData
 
277
        + reference--
 
278
                + releaseModule, 'releasePending' !?, 
 
279
        + Horrific:
 
280
                + acquireModule -> opaque 'address', with no
 
281
                  auto-ref-counting semantics.
 
282
 
 
283
+ cachecontroller.cxx: [!]
 
284
    * Each 'loadComponent' call must have a 'freeComponent' call...
 
285
        + we have 69 'loading component'
 
286
        + and only 43 'releasing module's ... [urk]
 
287
 
 
288
+ peeling back to:
 
289
    + treemanager.cxx (requestSubtree):
 
290
        + each 'request for subtree' must have matching
 
291
    + treemanager.cxx (releaseSubtree):
 
292
        + 'releasing subtree'
 
293
**      + Odd ! - these seem to pair up perfectly ... **
 
294
        + 'aCache->releasenode(...) ?
 
295
        + aCache == CacheClientAccess ...
 
296
 
 
297
Leaking 4 trees total (61)
 
298
[0001] info (004698):      Discarding CacheData (Still holding 4 module trees)
 
299
  entry 'org.openoffice.Office.TypeDetection' (0x82a8d40)
 
300
  entry 'org.openoffice.TypeDetection.Filter' (0x82f7588)
 
301
  entry 'org.openoffice.TypeDetection.Misc' (0x855da80)
 
302
  entry 'org.openoffice.TypeDetection.Types' (0x82a9ff8)
 
303
 
 
304
        + -apparently- both setup with 'addComponentData'
 
305
                + is it a hierarchical thing ?
 
306
 
 
307
 
 
308
* Do what Joerg suggests at the bottom:
 
309
 
 
310
Notes on configmgr2
 
311
      [ why is this so impossibly slow & inefficient ! ]
 
312
 
 
313
+ work on patches/test/configmgr-profile.diff:
 
314
        + fixup tree-tests:
 
315
                + act on profile:
 
316
                + it's all the ~Reference<XNameAccess>
 
317
                        that causes the pain ...
 
318
 
 
319
Observations
 
320
    + the UNO API mandates that everything must be thread-safe
 
321
        + across 2 adjacent key access everything could change
 
322
        + this is not what anyone wants
 
323
 
 
324
    + new API ?
 
325
        + any = getStructure (path, type)
 
326
            + 1 set of locking & iteration (?)
 
327
            + getSubPath:
 
328
 
 
329
*** Performance ***
 
330
    + ~NotifierImpl - burns 56million instructions
 
331
        -> listenercontainer.hxx ...
 
332
        invariably has just 1 listener.
 
333
            + created by ApiTreeImpl:
 
334
                + m_aNotifier (new NotifierImpl(aTree))
 
335
            + NotifierImplHolder:
 
336
                + a vos::ORef<NotifierImpl>
 
337
                + [ can it not smart-create ? ]
 
338
 
 
339
 
 
340
*** Notes ***
 
341
 
 
342
    + 2 types of 'tree' node:
 
343
        + Group - presumably a normal node
 
344
        + Set - presumably a simple list
 
345
 
 
346
    + Question:
 
347
        + is it *really* worth screwing around with
 
348
          this design ?
 
349
        + generate some statistics.
 
350
 
 
351
*** API ***
 
352
 
 
353
**** UNO ****
 
354
 
 
355
container::XChild, container::XNamed, lang::XComponent,
 
356
configuration::XTemplateInstance, lang::XUnoTunnel
 
357
beans::XPropertySet, beans::XMultiPropertySet ...
 
358
util::XRefreshable, util::XFlushable, util::XStringEscape
 
359
 
 
360
  + source/
 
361
    + api2/
 
362
        + elementaccess.hxx:
 
363
            + BasicInnerElement: XChild, XNamed
 
364
            + BasicSetElement: XChild, XNamed, XComponent
 
365
                               XTemplateInstance, XUnoTunnel
 
366
            + BasicRootElement: XNamed, XComponent,
 
367
                                XChangesNotifier, XLocalizable
 
368
            + BasicUpdateelement: BasicRootElement, XChangesBatch
 
369
        + groupaccess.hxx:
 
370
            + BasicGroupAccess: XNameAccess, XHierarchicalName,
 
371
                                XHierarchicalNameAccess, XContainer,
 
372
                                XExactName, XProperty
 
373
        + propertysetaccess.hxx:
 
374
            + BasicPropertySet: XPropertySet, XMultiPropertySet,
 
375
                                XHierarchicalPropertySet,
 
376
                                XMultiHierarchicalPropertySet,
 
377
                                XPropertyState, XMultiPropertyStates
 
378
        + provider.hxx:
 
379
            + OProvider: XMultiServiceFactory, XLocalizable,
 
380
                         XRefreshable, XFlushable
 
381
        + setaccess.hxx:
 
382
            + BasicSetAccess: XNameAccess, XHierarchicalName,
 
383
                              XHierarchicalNameAccess, XContainer,
 
384
                              XExactName, XProperty, XPropertySetInfo,
 
385
                              XTemplateContainer, XStringEscape
 
386
 
 
387
**** api2/configapi layer ****
 
388
 
 
389
    This is used by all the UNO wrappers, and features a much simpler
 
390
API, works on both NodeGroup & NodeSet node references
 
391
[NodeSetInfoAccess eg.]
 
392
 
 
393
        + All operates on:
 
394
            + configuration::Tree references
 
395
 
 
396
        + apinodeaccess.cxx:
 
397
            + makeElement
 
398
            + makeUnoElement
 
399
            + GuardedNodeAccess:
 
400
        + accessimpl.cxx:
 
401
            + implGetByName
 
402
                + takes a GuardedNodeDataAccess lock.
 
403
 
 
404
        + calls into 'configuration' API
 
405
            ::configuration::getChildOrElement
 
406
            ::configuration::validateAndReducePath
 
407
            ::configuration::getDeepDescendant
 
408
 
 
409
        + apifactory.cxx:
 
410
            + configapi::Factory::
 
411
                + makes UNO proxies for things
 
412
 
 
413
        + apifactoryimpl.cxx:
 
414
            + ReadOnlyObjectFactory::doCreateSetElement
 
415
                + creates set elements.
 
416
 
 
417
        + groupobjects.cxx:
 
418
            + OSetElementGroupInfo
 
419
 
 
420
        + apiaccessobj.hxx:
 
421
            + OSetElement
 
422
                + instantiates an ApiTreeImpl
 
423
 
 
424
        + apitreeimplobj.cxx:
 
425
            + ApiTreeImpl::ApiTreeImpl + ::init
 
426
            + adds notifiers & all manner of gubbins
 
427
 
 
428
        + notifierimpl.hxx
 
429
            + 1 member: a SpecialListenerContainer
 
430
 
 
431
        + listenercontainer.cxx
 
432
            + manages XEventListener, XContainerListener,
 
433
              XChangesListener, XPropertyChangeListener,
 
434
              XVetoableChangeListener [etc.]
 
435
              XPropertiesChangeListener
 
436
**          + the vetoing - requires synchronous
 
437
              listening (always?) ... 
 
438
 
 
439
            typedef SpecialListenerContainer <SubNodeID,SubNodeHash,SubNodeEq,SubNodeToIndex> SpecialContainer;
 
440
            ...
 
441
            typedef cppu::OMultiTypeInterfaceContainerHelperVar< Key_,KeyHash_,KeyEq_ > SpecialContainerHelper;
 
442
            + Slowness via  OBroadcastHelperVar<> m_aSpecialHelper
 
443
                    + 100 elements ?
 
444
                    + default bucket count:
 
445
                        + we -usually- only use 1 element so ...
 
446
 
 
447
        + cppuhelper/inc/cppuhelper/interfacecontainer.h
 
448
            + OMultiTypeInterfaceContainerHelper
 
449
            + interesting: can add / remove same thing
 
450
              multiple times [ with a simple ref-count ? ]
 
451
 
 
452
        + since each node has an (allocated) NotifierImpl anyway
 
453
            + why not let the node track listeners itself ?
 
454
            + far easier to find & manage surely ?
 
455
 
 
456
        + what are in these buckets ?
 
457
            + are there 100 buckets to clear (each?)
 
458
            + 36million cycles
 
459
 
 
460
        + NotifierImpl much loved by:
 
461
            + broadcaster.cxx
 
462
            + confignotifier.cxx
 
463
            + apitreeimplobj.cxx
 
464
 
 
465
        + void configmgr::configapi::NotifierImpl::add(const configmgr::configuration::NodeID&,
 
466
               const com::sun::star::uno::Reference<com::sun::star::lang::XEventListener>&)
 
467
            + called for every node [ for some reason ]
 
468
 
 
469
 
 
470
* Listener Impls *
 
471
        + provider.cxx:
 
472
            + OProviderDisposingListener
 
473
            + implements XEventListener_BASE
 
474
        + propertiesfilterednotifier.cxx:
 
475
            + XPropertiesChangeListener,
 
476
              XEventListener
 
477
        + broadcaster.cxx (?)
 
478
 
 
479
        + One of the 'special' things about the cppuhelper container
 
480
 
 
481
 
 
482
    /*/.Name,.Property,.Value
 
483
 
 
484
 
 
485
  + 'GetGreatBlob' API call
 
486
    + how to manage the UNO type data for that ?
 
487
    + how to create a truly 'generic' type ?
 
488
        + ultimately a sequence of any's (right) ?
 
489
        + do we need a new type ?
 
490
        + can we mangle some existing call ?
 
491
 
 
492
 
 
493
** Plague of listeners **:      
 
494
 
 
495
#0  configmgr::configapi::NotifierImpl::add (this=0xb5740e58, aNode=@0xbf853c24, xListener=@0xbf853d04) at notifierimpl.hxx:122
 
496
#1  configmgr::configapi::Notifier::add (this=0xbf853c6c, aNode=@0xbf853c78, xListener=@0xbf853d04) at configmgr/source/api2/confignotifier.cxx:126
 
497
#2  configmgr::configapi::genericAddListener<com::sun::star::lang::XEventListener> (rNode=@0xb573e1f4, xListener=@0xbf853d04) at configmgr/source/api2/apinotifierimpl.cxx:84
 
498
#3  configmgr::configapi::implAddListener (rNode=@0xb573e1f4, xListener=@0xbf853d04) at configmgr/source/api2/apinotifierimpl.cxx:178
 
499
#4  configmgr::BasicRootElement::addEventListener (this=0xb573e1a0, xListener=@0xbf853d04) at configmgr/source/api2/elementaccess.cxx:283
 
500
 
 
501
 
 
502
adds the ApiTreeImpl as a listener:
 
503
 
 
504
#5  configmgr::configapi::ApiTreeImpl::ComponentAdapter::setComponent (this=0xb5672f10, rxSlot=@0xb5672f28, xComp=@0xbf853d6c) at configmgr/source/api2/apitreeimplobj.cxx:150
 
505
#6  configmgr::configapi::ApiTreeImpl::ComponentAdapter::setParent (this=0xb5672f10, xParent=@0xbf853d6c) at configmgr/source/api2/apitreeimplobj.cxx:168
 
506
#7  configmgr::configapi::ApiTreeImpl::setParentTree (this=0xb56772bc, pParentTree=0xb573e1f8) at configmgr/source/api2/apitreeimplobj.cxx:730
 
507
#8  configmgr::configapi::ApiTreeImpl::init (this=0xb56772bc, pParentTree=0xb573e1f8) at configmgr/source/api2/apitreeimplobj.cxx:671
 
508
#9  ApiTreeImpl (this=0xb56772bc, pInstance=0xb5677264, rProvider=@0xb58da3ac, aTree=@0xbf853ee4, pParentTree=0xb573e1f8) at configmgr/source/api2/apitreeimplobj.cxx:417
 
509
#10 OSetElement (this=0xb56772b4, pUnoThis=0xb5677264, aTree=@0xbf853ee4, rProvider=@0xb58da3ac, pParentTree=0xb573e1f8) at apiaccessobj.hxx:106
 
510
#11 OSetElementGroupInfo (this=0xb5677250, aTree=@0xbf853ee4, rProvider=@0xb58da3ac, pParentTree=0xb573e1f8) at groupobjects.hxx:153
 
511
#12 configmgr::configapi::ReadOnlyObjectFactory::doCreateSetElement (this=0xb58da384, aElementTree=@0xbf853f48, pSetElementTemplate=0x0) at configmgr/source/api2/apifactoryimpl.cxx:151
 
512
#13 configmgr::configapi::Factory::makeElement (this=0xb58da384, aTree=@0xbf854068, aNode=@0xbf853fdc) at configmgr/source/api2/apifactory.cxx:193
 
513
#14 configmgr::configapi::Factory::makeUnoElement (this=0xb58da384, aTree=@0xbf854068, aNode=@0xbf853fdc) at configmgr/source/api2/apifactory.cxx:164
 
514
#15 configmgr::configapi::makeElement (rFactory=@0xb58da384, aTree=@0xbf854068, aNode=@0xbf854050) at configmgr/source/api2/apinodeaccess.cxx:134
 
515
#16 configmgr::configapi::implGetByName (rNode=@0xb573e1f4, sName=@0xb56dc010) at configmgr/source/api2/accessimpl.cxx:697
 
516
#17 configmgr::BasicSetAccess::getByName (this=0xb573e1c8, sName=@0xb56dc010) at configmgr/source/api2/setaccess.cxx:127
 
517
 
 
518
 
 
519
Instrumented access pattern wrt. m_aListeners:
 
520
 
 
521
File /opt/OpenOffice/OOO_2_0_2/configmgr/source/api2/apitreeimplobj.cxx:480 void configmgr::configapi::ApiTreeImpl::checkAlive() const
 
522
File /opt/OpenOffice/OOO_2_0_2/configmgr/source/api2/confignotifier.cxx:111 configmgr::configapi::NotifierImpl::NotifierImpl(const configmgr::configuration::TreeRef&)
 
523
File /opt/OpenOffice/OOO_2_0_2/configmgr/source/api2/apitreeimplobj.cxx:465 void configmgr::configapi::ApiTreeImpl::setNodeInstance(const configmgr::configuration::NodeRef&, configmgr::configapi::UnoInterface*)
 
524
File /opt/OpenOffice/OOO_2_0_2/configmgr/source/api2/notifierimpl.hxx:122 void configmgr::configapi::NotifierImpl::add(const configmgr::configuration::NodeID&, const com::sun::star::uno::Reference<com::sun::star::lang::XEventListener>&)
 
525
File /opt/OpenOffice/OOO_2_0_2/configmgr/source/api2/apitreeimplobj.cxx:480 void configmgr::configapi::ApiTreeImpl::checkAlive() const
 
526
File /opt/OpenOffice/OOO_2_0_2/configmgr/source/api2/apitreeimplobj.cxx:480 void configmgr::configapi::ApiTreeImpl::checkAlive() const
 
527
File /opt/OpenOffice/OOO_2_0_2/configmgr/source/api2/apitreeimplobj.cxx:480 void configmgr::configapi::ApiTreeImpl::checkAlive() const
 
528
File /opt/OpenOffice/OOO_2_0_2/configmgr/source/api2/apitreeimplobj.cxx:473 bool configmgr::configapi::ApiTreeImpl::isAlive() const
 
529
File /opt/OpenOffice/OOO_2_0_2/configmgr/source/api2/notifierimpl.hxx:213 void configmgr::configapi::NotifierImpl::remove(const configmgr::configuration::NodeID&, const com::sun::star::uno::Reference<com::sun::star::lang::XEventListener>&)
 
530
File /opt/OpenOffice/OOO_2_0_2/configmgr/source/api2/apitreeimplobj.cxx:584 bool configmgr::configapi::ApiTreeImpl::implDisposeTree(const configmgr::memory::Accessor&)
 
531
File /opt/OpenOffice/OOO_2_0_2/configmgr/source/api2/apitreeimplobj.cxx:473 bool configmgr::configapi::ApiTreeImpl::isAlive() const
 
532
Error: File /opt/OpenOffice/OOO_2_0_2/configmgr/source/api2/apitreeimplobj.cxx, Line 533
 
533
Backtrace: [0] ./configmgr2.uno.so: ???+0x1a065c
 
534
Backtrace: [1] ./configmgr2.uno.so: ???+0x19ca99
 
535
Backtrace: [2] ./configmgr2.uno.so: ???+0x1a91ef
 
536
Backtrace: [3] ./configmgr2.uno.so: ???+0x1a7352
 
537
Backtrace: [4] ./configmgr2.uno.so: ???+0x1ac473
 
538
Backtrace: [5] /opt/OOInstall/program/cfgdemo: ???+0x3ba9
 
539
Backtrace: [6] /opt/OOInstall/program/cfgdemo: ???+0x31bd
 
540
Backtrace: [7] /opt/OOInstall/program/cfgdemo: ???+0x35b8
 
541
Backtrace: [8] /opt/OOInstall/program/cfgdemo: main+0x1d8
 
542
Backtrace: [9] /lib/libc.so.6: __libc_start_main+0xdc
 
543
Backtrace: [10] /opt/OOInstall/program/cfgdemo: __gxx_personality_v0+0x59
 
544
File /opt/OpenOffice/OOO_2_0_2/configmgr/source/api2/apitreeimplobj.cxx:480 void configmgr::configapi::ApiTreeImpl::checkAlive() const
 
545
File /opt/OpenOffice/OOO_2_0_2/configmgr/source/api2/confignotifier.cxx:111 configmgr::configapi::NotifierImpl::NotifierImpl(const configmgr::configuration::TreeRef&)
 
546
File /opt/OpenOffice/OOO_2_0_2/configmgr/source/api2/apitreeimplobj.cxx:465 void configmgr::configapi::ApiTreeImpl::setNodeInstance(const configmgr::configuration::NodeRef&, configmgr::configapi::UnoInterface*)
 
547
File /opt/OpenOffice/OOO_2_0_2/configmgr/source/api2/notifierimpl.hxx:122 void configmgr::configapi::NotifierImpl::add(const configmgr::configuration::NodeID&, const com::sun::star::uno::Reference<com::sun::star::lang::XEventListener>&)
 
548
File /opt/OpenOffice/OOO_2_0_2/configmgr/source/api2/apitreeimplobj.cxx:480 void configmgr::configapi::ApiTreeImpl::checkAlive() const
 
549
File /opt/OpenOffice/OOO_2_0_2/configmgr/source/api2/apitreeimplobj.cxx:480 void configmgr::configapi::ApiTreeImpl::checkAlive() const
 
550
File /opt/OpenOffice/OOO_2_0_2/configmgr/source/api2/apitreeimplobj.cxx:480 void configmgr::configapi::ApiTreeImpl::checkAlive() const
 
551
File /opt/OpenOffice/OOO_2_0_2/configmgr/source/api2/apitreeimplobj.cxx:473 bool configmgr::configapi::ApiTreeImpl::isAlive() const
 
552
File /opt/OpenOffice/OOO_2_0_2/configmgr/source/api2/notifierimpl.hxx:213 void configmgr::configapi::NotifierImpl::remove(const configmgr::configuration::NodeID&, const com::sun::star::uno::Reference<com::sun::star::lang::XEventListener>&)
 
553
File /opt/OpenOffice/OOO_2_0_2/configmgr/source/api2/apitreeimplobj.cxx:584 bool configmgr::configapi::ApiTreeImpl::implDisposeTree(const configmgr::memory::Accessor&)
 
554
File /opt/OpenOffice/OOO_2_0_2/configmgr/source/api2/apitreeimplobj.cxx:473 bool configmgr::configapi::ApiTreeImpl::isAlive() const
 
555
Error: File /opt/OpenOffice/OOO_2_0_2/configmgr/source/api2/apitreeimplobj.cxx, Line 533
 
556
 
 
557
** configmgr-lesslock.diff
 
558
 
 
559
    + analysing what's really going on...
 
560
    + SegmentHeap
 
561
        [ concurrent access possible ? ]
 
562
 
 
563
    + class Segment {
 
564
            SegmentHeap m_heap;
 
565
            ...
 
566
      };
 
567
 
 
568
    + class SegmentHeap : Noncopyable
 
569
 
 
570
ource/inc/datalock.hxx:49:             virtual void acquireReadAccess() = 0;
 
571
source/inc/segment.hxx:91:            void const * acquireReadAccess() const 
 
572
source/inc/segment.hxx:93:                this->lock().acquireReadAccess();
 
573
source/data/updateaccessor.cxx:78:                base = m_segment->acquireReadAccess();
 
574
source/data/simpleheap.cxx:179:            virtual void acquireReadAccess() { m_mutex.acquire(); }
 
575
source/data/accessor.cxx:58:            void const * base = m_segment ? m_segment->acquireReadAccess() : NULL;
 
576
 
 
577
source/inc/datalock.hxx:52:             virtual void acquireWriteAccess() = 0;          
 
578
source/inc/segment.hxx:80:            Heap& acquireWriteAccess()       
 
579
source/inc/segment.hxx:82:                this->lock().acquireWriteAccess(); 
 
580
 
 
581
on a segment:
 
582
source/data/updateaccessor.cxx:57:            m_heap = (m_segment) ? &m_segment->acquireWriteAccess() : 0;
 
583
source/data/simpleheap.cxx:182:            virtual void acquireWriteAccess() { m_mutex.acquire(); }     
 
584
 
 
585
 
 
586
+ datalock.hxx: DataLock (typedef'd to Lock)
 
587
 
 
588
   
 
589
it *seems* that 'isValidAddress'
 
590
    + burns 25% of time with debug build - is this
 
591
      the use of all this book-keeping state ?
 
592
 
 
593
    + SimpleCheckingHeapManager:
 
594
        + only 2 instances (static):
 
595
            + cacheHeap()
 
596
            + localHeap()
 
597
 
 
598
    + Question:
 
599
        + is the batch freeing of a 'Heap' relied on ?
 
600
 
 
601
* Strategy:
 
602
    + rip out the custom allocator crud ...
 
603
    + [ totally unnecessary ]
 
604
        + Address - hunt/destroy (?)
 
605
    + hoist any 'Heap' stuff up as a 'shared lock' class (?)
 
606
        + if it's used ...
 
607
        + Heap used for batch freeing too (!?) [urgh]
 
608
 
 
609
    + write a test tool ? [ for performance ]
 
610
        + [ automated regression tests ? ]
 
611
 
 
612
TODO:
 
613
    + remove 'realloc' - never called in anger ?
 
614
    + 'anydata' should be an UNO type [ surely ... ]
 
615
 
 
616
    + calls to 'allocate'
 
617
 
 
618
source/data/sequence.cxx:131:    Sequence aResult = _anAllocator.allocate(nTotalSize);
 
619
source/data/sequence.cxx:209:    OSL_ENSURE(_pSeqData, "ERROR: Trying to allocate from a NULL sequence");
 
620
source/data/sequence.cxx:312:    _anAllocator.deallocate(_aSeq);
 
621
source/data/sequence.cxx:321:    _anAllocator.deallocate(_aSeq);
 
622
 
 
623
source/data/anydata.cxx:234:            Address aStorage = _anAllocator.allocate( sizeof nValue );
 
624
source/data/anydata.cxx:245:            Address aStorage = _anAllocator.allocate( sizeof dValue );
 
625
source/data/anydata.cxx:260:        OSL_ENSURE( false, "Trying to allocate void value" );
 
626
source/data/anydata.cxx:405:        _anAllocator.deallocate(_aData.longValue);
 
627
source/data/anydata.cxx:409:        _anAllocator.deallocate(_aData.doubleValue);
 
628
 
 
629
source/tree/builddata.cxx:646:    Address aBaseAddress = _anUpdater.allocator().allocate(nFragmentSize);
 
630
source/tree/builddata.cxx:1201:    allocator().deallocate( _aBaseAddress.addressValue() );
 
631
source/tree/node.cxx:242:    Address aData = _anAllocator.allocate(sizeof(SetNodeTemplateData));
 
632
source/tree/node.cxx:281:    _anAllocator.deallocate(_aTemplateData);
 
633
 
 
634
chains to heap:
 
635
source/data/updateaccessor.cxx:112:            return m_heap ? m_heap->allocate(_sz) : Allocator::Address();
 
636
source/data/updateaccessor.cxx:119:            if (m_heap) m_heap->deallocate(_addr);
 
637
 
 
638
 
 
639
Supposed leaks: 5 items:
 
640
 
 
641
#0  configmgr::memory::SimpleCheckingHeapManager::destroyHeap (this=0xa3e3d990, _aHeap=0x8132148)
 
642
    at /data/OpenOffice/ood680-m4/configmgr/source/data/simpleheap.cxx:354
 
643
#1  0xa3d6ae0d in ~Heap (this=0x8131cdc) at /data/OpenOffice/ood680-m4/configmgr/source/data/heap.cxx:78
 
644
#2  0xa3d6b175 in ~SegmentHeap (this=0x8131cd8) at /data/OpenOffice/ood680-m4/configmgr/source/data/segmentheap.cxx:58
 
645
#3  0xa3be96f3 in ~Segment (this=0x8131cd8) at ../inc/segment.hxx:56
 
646
#4  0xa3be98f3 in ~CacheLine (this=0x8131cd0) at /data/OpenOffice/ood680-m4/configmgr/source/treecache/cacheline.hxx:75
 
647
#5  0xa3bd79b1 in salhelper::SimpleReferenceObject::release (this=0x8131cd0)
 
648
    at /opt/OpenOffice/ood680-m4/solver/680/unxlngi6.pro/inc/salhelper/simplereferenceobject.hxx:98
 
649
#6  0xa3be4df0 in rtl::Reference<configmgr::CacheLine>::set (this=0x81302dc, pBody=0x8140d50)
 
650
    at /opt/OpenOffice/ood680-m4/solver/680/unxlngi6.pro/inc/rtl/ref.hxx:125
 
651
#7  0xa3be4e10 in rtl::Reference<configmgr::CacheLine>::operator= (this=0x81302dc, handle=@0xbfe36150)
 
652
    at /opt/OpenOffice/ood680-m4/solver/680/unxlngi6.pro/inc/rtl/ref.hxx:136
 
653
#8  0xa3be6853 in configmgr::CacheData::internalAddModule (this=0x810fb70, _aName=@0xbfe361e4, _aModule=@0xbfe36150)
 
654
    at /data/OpenOffice/ood680-m4/configmgr/source/treecache/cachedata.cxx:166
 
655
#9  0xa3be3382 in configmgr::TemplateCacheData::implNewCacheLine (this=0x810fb70, _aModule=@0xbfe361e4)
 
656
    at /data/OpenOffice/ood680-m4/configmgr/source/treecache/cachedata.cxx:443
 
657
#10 0xa3be33fc in configmgr::TemplateCacheData::createDataSegment (this=0x810fb70, _aModule=@0xbfe361e4)
 
658
    at /data/OpenOffice/ood680-m4/configmgr/source/treecache/cachedata.cxx:396
 
659
#11 0xa3bedaca in configmgr::backend::CacheController::addTemplates (this=0x810fb38, _aComponentInstance=@0xbfe3628c)
 
660
    at /data/OpenOffice/ood680-m4/configmgr/source/treecache/cachecontroller.cxx:565
 
661
#12 0xa3bf0c7b in configmgr::backend::CacheController::loadComponent (this=0x810fb38, _aRequest=@0xbfe36314)
 
662
    at /data/OpenOffice/ood680-m4/configmgr/source/treecache/cachecontroller.cxx:462
 
663
#13 0xa3bf924a in configmgr::TreeManager::requestSubtree (this=0x810fe00, aSubtreePath=@0xbfe3645c, _aOptions=@0xbfe364cc)
 
664
    at /data/OpenOffice/ood680-m4/configmgr/source/treecache/treemanager.cxx:344
 
665
#14 0xa3d0b981 in configmgr::OProviderImpl::requestSubtree (this=0x80eca30, aSubtreePath=@0xbfe3645c, _aOptions=@0xbfe364cc)
 
666
    at /data/OpenOffice/ood680-m4/configmgr/source/api2/providerimpl.cxx:428
 
667
#15 0xa3d0c152 in configmgr::OProviderImpl::buildReadAccess (this=0x80eca30, _rAccessor=@0xbfe364e4, _aOptions=@0xbfe364cc, nMinLevels=-1)
 
668
    at /data/OpenOffice/ood680-m4/configmgr/source/api2/providerimpl.cxx:581
 
669
#16 0xa3d11b6d in configmgr::OConfigurationProviderImpl::createReadAccess (this=0x80eca30, aArgs=@0xbfe36574)
 
670
    at /data/OpenOffice/ood680-m4/configmgr/source/api2/confproviderimpl2.cxx:108
 
671
#17 0xa3d0edee in configmgr::OConfigurationProvider::createInstanceWithArguments (this=0x80ec2b0, aServiceSpecifier=@0xbfe36584, aArguments=@0xbfe36574)
 
672
    at /data/OpenOffice/ood680-m4/configmgr/source/api2/confprovider2.cxx:364
 
673
 
 
674
Leaked: 5 items
 
675
 
 
676
#0  configmgr::memory::SimpleCheckingHeapManager::destroyHeap (this=0xa3e3d990, _aHeap=0x8558618)
 
677
    at /data/OpenOffice/ood680-m4/configmgr/source/data/simpleheap.cxx:354
 
678
#1  0xa3d6ae0d in ~Heap (this=0x856751c) at /data/OpenOffice/ood680-m4/configmgr/source/data/heap.cxx:78
 
679
#2  0xa3d6b175 in ~SegmentHeap (this=0x8567518) at /data/OpenOffice/ood680-m4/configmgr/source/data/segmentheap.cxx:58
 
680
#3  0xa3be96f3 in ~Segment (this=0x8567518) at ../inc/segment.hxx:56
 
681
#4  0xa3be98f3 in ~CacheLine (this=0x8567510) at /data/OpenOffice/ood680-m4/configmgr/source/treecache/cacheline.hxx:75
 
682
#5  0xa3bd79b1 in salhelper::SimpleReferenceObject::release (this=0x8567510)
 
683
    at /opt/OpenOffice/ood680-m4/solver/680/unxlngi6.pro/inc/salhelper/simplereferenceobject.hxx:98
 
684
#6  0xa3be4df0 in rtl::Reference<configmgr::CacheLine>::set (this=0x81e351c, pBody=0x85ee688)
 
685
    at /opt/OpenOffice/ood680-m4/solver/680/unxlngi6.pro/inc/rtl/ref.hxx:125
 
686
#7  0xa3be4e10 in rtl::Reference<configmgr::CacheLine>::operator= (this=0x81e351c, handle=@0xbfe351e0)
 
687
    at /opt/OpenOffice/ood680-m4/solver/680/unxlngi6.pro/inc/rtl/ref.hxx:136
 
688
#8  0xa3be6853 in configmgr::CacheData::internalAddModule (this=0x810fb70, _aName=@0xbfe35274, _aModule=@0xbfe351e0)
 
689
    at /data/OpenOffice/ood680-m4/configmgr/source/treecache/cachedata.cxx:166
 
690
#9  0xa3be3382 in configmgr::TemplateCacheData::implNewCacheLine (this=0x810fb70, _aModule=@0xbfe35274)
 
691
    at /data/OpenOffice/ood680-m4/configmgr/source/treecache/cachedata.cxx:443
 
692
#10 0xa3be33fc in configmgr::TemplateCacheData::createDataSegment (this=0x810fb70, _aModule=@0xbfe35274)
 
693
    at /data/OpenOffice/ood680-m4/configmgr/source/treecache/cachedata.cxx:396
 
694
#11 0xa3bedaca in configmgr::backend::CacheController::addTemplates (this=0x810fb38, _aComponentInstance=@0xbfe3531c)
 
695
    at /data/OpenOffice/ood680-m4/configmgr/source/treecache/cachecontroller.cxx:565
 
696
#12 0xa3bf0c7b in configmgr::backend::CacheController::loadComponent (this=0x810fb38, _aRequest=@0xbfe353a4)
 
697
    at /data/OpenOffice/ood680-m4/configmgr/source/treecache/cachecontroller.cxx:462
 
698
#13 0xa3bf924a in configmgr::TreeManager::requestSubtree (this=0x810fe00, aSubtreePath=@0xbfe354ec, _aOptions=@0xbfe3555c)
 
699
    at /data/OpenOffice/ood680-m4/configmgr/source/treecache/treemanager.cxx:344
 
700
#14 0xa3d0b981 in configmgr::OProviderImpl::requestSubtree (this=0x80eca30, aSubtreePath=@0xbfe354ec, _aOptions=@0xbfe3555c)
 
701
    at /data/OpenOffice/ood680-m4/configmgr/source/api2/providerimpl.cxx:428
 
702
#15 0xa3d0bd8a in configmgr::OProviderImpl::buildUpdateAccess (this=0x80eca30, _rAccessor=@0xbfe35574, _aOptions=@0xbfe3555c, nMinLevels=-1)
 
703
    at /data/OpenOffice/ood680-m4/configmgr/source/api2/providerimpl.cxx:623
 
704
#16 0xa3d11963 in configmgr::OConfigurationProviderImpl::createUpdateAccess (this=0x80eca30, aArgs=@0xbfe356b8)
 
705
    at /data/OpenOffice/ood680-m4/configmgr/source/api2/confproviderimpl2.cxx:140
 
706
#17 0xa3d0edee in configmgr::OConfigurationProvider::createInstanceWithArguments (this=0x80ec2b0, aServiceSpecifier=@0xbfe356bc, aArguments=@0xbfe356b8)
 
707
    at /data/OpenOffice/ood680-m4/configmgr/source/api2/confprovider2.cxx:364
 
708
#18 0xa229f6a4 in filter::config::FilterCache::impl_createConfigAccess (this=0x8541478, sRoot=@0xbfe35718, bReadOnly=0 '\0', bLocalesMode=1 '\001')
 
709
    at /opt/OpenOffice/ood680-m4/filter/source/config/cache/filtercache.cxx:1061
 
710
#19 0xa22a56e5 in filter::config::FilterCache::impl_openConfig (this=0x8541478, eProvider=filter::config::FilterCache::E_PROVIDER_OTHERS)
 
711
    at /opt/OpenOffice/ood680-m4/filter/source/config/cache/filtercache.cxx:958
 
712
#20 0xa22a6cc1 in filter::config::FilterCache::impl_load (this=0x8541478, eRequiredState=filter::config::FilterCache::E_CONTAINS_FRAMELOADERS)
 
713
    at /opt/OpenOffice/ood680-m4/filter/source/config/cache/filtercache.cxx:1548
 
714
#21 0xa22a8bd5 in filter::config::FilterCache::load (this=0x8541478, eRequired=filter::config::FilterCache::E_CONTAINS_FRAMELOADERS, bByThread=0 '\0')
 
715
    at /opt/OpenOffice/ood680-m4/filter/source/config/cache/filtercache.cxx:332
 
716
#22 0xa2291b5d in filter::config::BaseContainer::impl_loadOnDemand (this=0x85d7ae0)
 
717
    at /opt/OpenOffice/ood680-m4/filter/source/config/cache/basecontainer.cxx:158
 
718
#23 0xa2292522 in filter::config::BaseContainer::createSubSetEnumerationByProperties (this=0x85d7ae0, lProperties=@0xbfe359a8)
 
719
    at /opt/OpenOffice/ood680-m4/filter/source/config/cache/basecontainer.cxx:527
 
720
 
 
721
leaked: 30 items.
 
722
 
 
723
#0  configmgr::memory::SimpleCheckingHeapManager::destroyHeap (this=0xa3e3d990, _aHeap=0x828a2a8)
 
724
    at /data/OpenOffice/ood680-m4/configmgr/source/data/simpleheap.cxx:354
 
725
#1  0xa3d6ae0d in ~Heap (this=0x8280f94) at /data/OpenOffice/ood680-m4/configmgr/source/data/heap.cxx:78
 
726
#2  0xa3d6b175 in ~SegmentHeap (this=0x8280f90) at /data/OpenOffice/ood680-m4/configmgr/source/data/segmentheap.cxx:58
 
727
#3  0xa3be96f3 in ~Segment (this=0x8280f90) at ../inc/segment.hxx:56
 
728
#4  0xa3be9737 in ~CacheLine (this=0x8280f88) at /data/OpenOffice/ood680-m4/configmgr/source/treecache/cacheline.hxx:75
 
729
#5  0xa3be97f2 in ~ExtendedCacheLine (this=0x8280f88) at /data/OpenOffice/ood680-m4/configmgr/source/treecache/cacheline.hxx:151
 
730
#6  0xa3bd79b1 in salhelper::SimpleReferenceObject::release (this=0x8280f88)
 
731
    at /opt/OpenOffice/ood680-m4/solver/680/unxlngi6.pro/inc/salhelper/simplereferenceobject.hxx:98
 
732
#7  0xa3bd79d4 in ~Reference (this=0x81cc75c) at /opt/OpenOffice/ood680-m4/solver/680/unxlngi6.pro/inc/rtl/ref.hxx:111
 
733
#8  0xa3be0f93 in ~pair (this=0x81cc758) at /opt/OpenOffice/ood680-m4/solver/680/unxlngi6.pro/inc/stl/stl/_pair.h:37
 
734
#9  0xa3be0fe3 in _STL::_Destroy<_STL::pair<configmgr::configuration::Name const, rtl::Reference<configmgr::CacheLine> > > (__pointer=0x81cc758)
 
735
    at /opt/OpenOffice/ood680-m4/solver/680/unxlngi6.pro/inc/stl/stl/_construct.h:67
 
736
#10 0xa3be10e8 in _STL::_Rb_tree<configmgr::configuration::Name, _STL::pair<configmgr::configuration::Name const, rtl::Reference<configmgr::CacheLine> >, _STL::_Select1st<_STL::pair<configmgr::configuration::Name const, rtl::Reference<configmgr::CacheLine> > >, _STL::less<configmgr::configuration::Name>, _STL::allocator<_STL::pair<configmgr::configuration::Name const, rtl::Reference<configmgr::CacheLine> > > >::_M_erase (this=0x80d7d40, __x=0x81cc748)
 
737
    at /opt/OpenOffice/ood680-m4/solver/680/unxlngi6.pro/inc/stl/stl/_tree.c:637
 
738
#11 0xa3be10ca in _STL::_Rb_tree<configmgr::configuration::Name, _STL::pair<configmgr::configuration::Name const, rtl::Reference<configmgr::CacheLine> >, _STL::_Select1st<_STL::pair<configmgr::configuration::Name const, rtl::Reference<configmgr::CacheLine> > >, _STL::less<configmgr::configuration::Name>, _STL::allocator<_STL::pair<configmgr::configuration::Name const, rtl::Reference<configmgr::CacheLine> > > >::_M_erase (this=0x80d7d40, __x=0x81cca30)
 
739
    at /opt/OpenOffice/ood680-m4/solver/680/unxlngi6.pro/inc/stl/stl/_tree.c:635
 
740
#12 0xa3be10ca in _STL::_Rb_tree<configmgr::configuration::Name, _STL::pair<configmgr::configuration::Name const, rtl::Reference<configmgr::CacheLine> >, _STL::_Select1st<_STL::pair<configmgr::configuration::Name const, rtl::Reference<configmgr::CacheLine> > >, _STL::less<configmgr::configuration::Name>, _STL::allocator<_STL::pair<configmgr::configuration::Name const, rtl::Reference<configmgr::CacheLine> > > >::_M_erase (this=0x80d7d40, __x=0x81c0858)
 
741
    at /opt/OpenOffice/ood680-m4/solver/680/unxlngi6.pro/inc/stl/stl/_tree.c:635
 
742
#13 0xa3be10ca in _STL::_Rb_tree<configmgr::configuration::Name, _STL::pair<configmgr::configuration::Name const, rtl::Reference<configmgr::CacheLine> >, _STL::_Select1st<_STL::pair<configmgr::configuration::Name const, rtl::Reference<configmgr::CacheLine> > >, _STL::less<configmgr::configuration::Name>, _STL::allocator<_STL::pair<configmgr::configuration::Name const, rtl::Reference<configmgr::CacheLine> > > >::_M_erase (this=0x80d7d40, __x=0x8134a88)
 
743
    at /opt/OpenOffice/ood680-m4/solver/680/unxlngi6.pro/inc/stl/stl/_tree.c:635
 
744
#14 0xa3be10ca in _STL::_Rb_tree<configmgr::configuration::Name, _STL::pair<configmgr::configuration::Name const, rtl::Reference<configmgr::CacheLine> >, _STL::_Select1st<_STL::pair<configmgr::configuration::Name const, rtl::Reference<configmgr::CacheLine> > >, _STL::less<configmgr::configuration::Name>, _STL::allocator<_STL::pair<configmgr::configuration::Name const, rtl::Reference<configmgr::CacheLine> > > >::_M_erase (this=0x80d7d40, __x=0x81f04c0)
 
745
    at /opt/OpenOffice/ood680-m4/solver/680/unxlngi6.pro/inc/stl/stl/_tree.c:635
 
746
#15 0xa3be114e in _STL::_Rb_tree<configmgr::configuration::Name, _STL::pair<configmgr::configuration::Name const, rtl::Reference<configmgr::CacheLine> >, _STL::_Select1st<_STL::pair<configmgr::configuration::Name const, rtl::Reference<configmgr::CacheLine> > >, _STL::less<configmgr::configuration::Name>, _STL::allocator<_STL::pair<configmgr::configuration::Name const, rtl::Reference<configmgr::CacheLine> > > >::clear (this=0x80d7d40)
 
747
    at /opt/OpenOffice/ood680-m4/solver/680/unxlngi6.pro/inc/stl/stl/_tree.h:447
 
748
#16 0xa3be5682 in ~_Rb_tree (this=0x80d7d40) at /opt/OpenOffice/ood680-m4/solver/680/unxlngi6.pro/inc/stl/stl/_tree.h:341
 
749
#17 0xa3be56d3 in ~map (this=0x80d7d40) at /opt/OpenOffice/ood680-m4/solver/680/unxlngi6.pro/inc/stl/stl/_map.h:44
 
750
#18 0xa3be324b in ~CacheData (this=0x80d7d3c) at /data/OpenOffice/ood680-m4/configmgr/source/treecache/cachedata.cxx:136
 
751
#19 0xa3be21db in ~ExtendedCacheData (this=0x80d7d3c) at /data/OpenOffice/ood680-m4/configmgr/source/treecache/cachedata.hxx:174
 
752
#20 0xa3bde965 in ~CacheLoadingAccess (this=0x80d7d30) at /data/OpenOffice/ood680-m4/configmgr/source/treecache/cacheaccess.cxx:220
 
753
#21 0xa3bd79b1 in salhelper::SimpleReferenceObject::release (this=0x80d7d30)
 
754
    at /opt/OpenOffice/ood680-m4/solver/680/unxlngi6.pro/inc/salhelper/simplereferenceobject.hxx:98
 
755
#22 0xa3bd7a9c in ~Reference (this=0x811044c) at /opt/OpenOffice/ood680-m4/solver/680/unxlngi6.pro/inc/rtl/ref.hxx:111
 
756
#23 0xa3bf37f3 in ~pair (this=0x8110438) at /opt/OpenOffice/ood680-m4/solver/680/unxlngi6.pro/inc/stl/stl/_pair.h:37
 
757
#24 0xa3bf3843 in _STL::_Destroy<_STL::pair<configmgr::RequestOptions const, rtl::Reference<configmgr::CacheLoadingAccess> > > (__pointer=0x8110438)
 
758
    at /opt/OpenOffice/ood680-m4/solver/680/unxlngi6.pro/inc/stl/stl/_construct.h:67
 
759
#25 0xa3bf3894 in _STL::_Rb_tree<configmgr::RequestOptions, _STL::pair<configmgr::RequestOptions const, rtl::Reference<configmgr::CacheLoadingAccess> >, _STL::_Select1st<_STL::pair<configmgr::RequestOptions const, rtl::Reference<configmgr::CacheLoadingAccess> > >, configmgr::lessRequestOptions, _STL::allocator<_STL::pair<configmgr::RequestOptions const, rtl::Reference<configmgr::CacheLoadingAccess> > > >::_M_erase (this=0xbfe36414, __x=0x8110428)
 
760
    at /opt/OpenOffice/ood680-m4/solver/680/unxlngi6.pro/inc/stl/stl/_tree.c:637
 
761
#26 0xa3bf3876 in _STL::_Rb_tree<configmgr::RequestOptions, _STL::pair<configmgr::RequestOptions const, rtl::Reference<configmgr::CacheLoadingAccess> >, _STL::_Select1st<_STL::pair<configmgr::RequestOptions const, rtl::Reference<configmgr::CacheLoadingAccess> > >, configmgr::lessRequestOptions, _STL::allocator<_STL::pair<configmgr::RequestOptions const, rtl::Reference<configmgr::CacheLoadingAccess> > > >::_M_erase (this=0xbfe36414, __x=0x82900d8)
 
762
 
 
763
leaked 100's of items:
 
764
 
 
765
#0  configmgr::memory::SimpleCheckingHeapManager::destroyHeap (this=0xa3e3d990, _aHeap=0x81c6bd0)
 
766
    at /data/OpenOffice/ood680-m4/configmgr/source/data/simpleheap.cxx:354
 
767
#1  0xa3d6ae0d in ~Heap (this=0x81456b4) at /data/OpenOffice/ood680-m4/configmgr/source/data/heap.cxx:78
 
768
#2  0xa3d6b175 in ~SegmentHeap (this=0x81456b0) at /data/OpenOffice/ood680-m4/configmgr/source/data/segmentheap.cxx:58
 
769
#3  0xa3be96f3 in ~Segment (this=0x81456b0) at ../inc/segment.hxx:56
 
770
 
 
771
        + this is our internal / custom allocated segment [!]
 
772
 
 
773
#4  0xa3be9737 in ~CacheLine (this=0x81456a8) at /data/OpenOffice/ood680-m4/configmgr/source/treecache/cacheline.hxx:75
 
774
#5  0xa3be97f2 in ~ExtendedCacheLine (this=0x81456a8) at /data/OpenOffice/ood680-m4/configmgr/source/treecache/cacheline.hxx:151
 
775
#6  0xa3bd79b1 in salhelper::SimpleReferenceObject::release (this=0x81456a8)
 
776
    at /opt/OpenOffice/ood680-m4/solver/680/unxlngi6.pro/inc/salhelper/simplereferenceobject.hxx:98
 
777
#7  0xa3bd79d4 in ~Reference (this=0x81c086c) at /opt/OpenOffice/ood680-m4/solver/680/unxlngi6.pro/inc/rtl/ref.hxx:111
 
778
#8  0xa3be0f93 in ~pair (this=0x81c0868) at /opt/OpenOffice/ood680-m4/solver/680/unxlngi6.pro/inc/stl/stl/_pair.h:37
 
779
#9  0xa3be0fe3 in _STL::_Destroy<_STL::pair<configmgr::configuration::Name const, rtl::Reference<configmgr::CacheLine> > > (__pointer=0x81c0868)
 
780
    at /opt/OpenOffice/ood680-m4/solver/680/unxlngi6.pro/inc/stl/stl/_construct.h:67
 
781
#10 0xa3be10e8 in _STL::_Rb_tree<configmgr::configuration::Name, _STL::pair<configmgr::configuration::Name const, rtl::Reference<configmgr::CacheLine> >, _STL::_Select1st<_STL::pair<configmgr::configuration::Name const, rtl::Reference<configmgr::CacheLine> > >, _STL::less<configmgr::configuration::Name>, _STL::allocator<_STL::pair<configmgr::configuration::Name const, rtl::Reference<configmgr::CacheLine> > > >::_M_erase (this=0x80d7d40, __x=0x81c0858)
 
782
    at /opt/OpenOffice/ood680-m4/solver/680/unxlngi6.pro/inc/stl/stl/_tree.c:637
 
783
#11 0xa3be10ca in _STL::_Rb_tree<configmgr::configuration::Name, _STL::pair<configmgr::configuration::Name const, rtl::Reference<configmgr::CacheLine> >, _STL::_Select1st<_STL::pair<configmgr::configuration::Name const, rtl::Reference<configmgr::CacheLine> > >, _STL::less<configmgr::configuration::Name>, _STL::allocator<_STL::pair<configmgr::configuration::Name const, rtl::Reference<configmgr::CacheLine> > > >::_M_erase (this=0x80d7d40, __x=0x8134a88)
 
784
    at /opt/OpenOffice/ood680-m4/solver/680/unxlngi6.pro/inc/stl/stl/_tree.c:635
 
785
#12 0xa3be10ca in _STL::_Rb_tree<configmgr::configuration::Name, _STL::pair<configmgr::configuration::Name const, rtl::Reference<configmgr::CacheLine> >, _STL::_Select1st<_STL::pair<configmgr::configuration::Name const, rtl::Reference<configmgr::CacheLine> > >, _STL::less<configmgr::configuration::Name>, _STL::allocator<_STL::pair<configmgr::configuration::Name const, rtl::Reference<configmgr::CacheLine> > > >::_M_erase (this=0x80d7d40, __x=0x81f04c0)
 
786
    at /opt/OpenOffice/ood680-m4/solver/680/unxlngi6.pro/inc/stl/stl/_tree.c:635
 
787
#13 0xa3be114e in _STL::_Rb_tree<configmgr::configuration::Name, _STL::pair<configmgr::configuration::Name const, rtl::Reference<configmgr::CacheLine> >, _STL::_Select1st<_STL::pair<configmgr::configuration::Name const, rtl::Reference<configmgr::CacheLine> > >, _STL::less<configmgr::configuration::Name>, _STL::allocator<_STL::pair<configmgr::configuration::Name const, rtl::Reference<configmgr::CacheLine> > > >::clear (this=0x80d7d40)
 
788
    at /opt/OpenOffice/ood680-m4/solver/680/unxlngi6.pro/inc/stl/stl/_tree.h:447
 
789
#14 0xa3be5682 in ~_Rb_tree (this=0x80d7d40) at /opt/OpenOffice/ood680-m4/solver/680/unxlngi6.pro/inc/stl/stl/_tree.h:341
 
790
#15 0xa3be56d3 in ~map (this=0x80d7d40) at /opt/OpenOffice/ood680-m4/solver/680/unxlngi6.pro/inc/stl/stl/_map.h:44
 
791
#16 0xa3be324b in ~CacheData (this=0x80d7d3c) at /data/OpenOffice/ood680-m4/configmgr/source/treecache/cachedata.cxx:136
 
792
#17 0xa3be21db in ~ExtendedCacheData (this=0x80d7d3c) at /data/OpenOffice/ood680-m4/configmgr/source/treecache/cachedata.hxx:174
 
793
#18 0xa3bde965 in ~CacheLoadingAccess (this=0x80d7d30) at /data/OpenOffice/ood680-m4/configmgr/source/treecache/cacheaccess.cxx:220
 
794
#19 0xa3bd79b1 in salhelper::SimpleReferenceObject::release (this=0x80d7d30)
 
795
    at /opt/OpenOffice/ood680-m4/solver/680/unxlngi6.pro/inc/salhelper/simplereferenceobject.hxx:98
 
796
#20 0xa3bd7a9c in ~Reference (this=0x811044c) at /opt/OpenOffice/ood680-m4/solver/680/unxlngi6.pro/inc/rtl/ref.hxx:111
 
797
#21 0xa3bf37f3 in ~pair (this=0x8110438) at /opt/OpenOffice/ood680-m4/solver/680/unxlngi6.pro/inc/stl/stl/_pair.h:37
 
798
#22 0xa3bf3843 in _STL::_Destroy<_STL::pair<configmgr::RequestOptions const, rtl::Reference<configmgr::CacheLoadingAccess> > > (__pointer=0x8110438)
 
799
    at /opt/OpenOffice/ood680-m4/solver/680/unxlngi6.pro/inc/stl/stl/_construct.h:67
 
800
#23 0xa3bf3894 in _STL::_Rb_tree<configmgr::RequestOptions, _STL::pair<configmgr::RequestOptions const, rtl::Reference<configmgr::CacheLoadingAccess> >, _STL::_Select1st<_STL::pair<configmgr::RequestOptions const, rtl::Reference<configmgr::CacheLoadingAccess> > >, configmgr::lessRequestOptions, _STL::allocator<_STL::pair<configmgr::RequestOptions const, rtl::Reference<configmgr::CacheLoadingAccess> > > >::_M_erase (this=0xbfe36414, __x=0x8110428)
 
801
    at /opt/OpenOffice/ood680-m4/solver/680/unxlngi6.pro/inc/stl/stl/_tree.c:637
 
802
#24 0xa3bf3876 in _STL::_Rb_tree<configmgr::RequestOptions, _STL::pair<configmgr::RequestOptions const, rtl::Reference<configmgr::CacheLoadingAccess> >, _STL::_Select1st<_STL::pair<configmgr::RequestOptions const, rtl::Reference<configmgr::CacheLoadingAccess> > >, configmgr::lessRequestOptions, _STL::allocator<_STL::pair<configmgr::RequestOptions const, rtl::Reference<configmgr::CacheLoadingAccess> > > >::_M_erase (this=0xbfe36414, __x=0x82900d8)
 
803
    at /opt/OpenOffice/ood680-m4/solver/680/unxlngi6.pro/inc/stl/stl/_tree.c:635
 
804
#25 0xa3bf38fa in _STL::_Rb_tree<configmgr::RequestOptions, _STL::pair<configmgr::RequestOptions const, rtl::Reference<configmgr::CacheLoadingAccess> >, _STL::_Select1st<_STL::pair<configmgr::RequestOptions const, rtl::Reference<configmgr::CacheLoadingAccess> > >, configmgr::lessRequestOptions, _STL::allocator<_STL::pair<configmgr::RequestOptions const, rtl::Reference<configmgr::CacheLoadingAccess> > > >::clear (this=0xbfe36414)
 
805
    at /opt/OpenOffice/ood680-m4/solver/680/unxlngi6.pro/inc/stl/stl/_tree.h:447
 
806
#26 0xa3bf39c7 in _STL::map<configmgr::RequestOptions, rtl::Reference<configmgr::CacheLoadingAccess>, configmgr::lessRequestOptions, _STL::allocator<_STL::pair<configmgr::RequestOptions const, rtl::Reference<configmgr::CacheLoadingAccess> > > >::clear (this=0xbfe36414)
 
807
    at /opt/OpenOffice/ood680-m4/solver/680/unxlngi6.pro/inc/stl/stl/_map.h:191
 
808
#27 0xa3beeadb in configmgr::backend::CacheController::disposeAll (this=0x810fb38, _bFlushRemainingUpdates=true)
 
809
    at /data/OpenOffice/ood680-m4/configmgr/source/treecache/cachecontroller.cxx:182
 
810
#28 0xa3beeb83 in configmgr::backend::CacheController::dispose (this=0x810fb38)
 
811
    at /data/OpenOffice/ood680-m4/configmgr/source/treecache/cachecontroller.cxx:197
 
812
#29 0xa3bf7536 in configmgr::TreeManager::disposeBackendCache (this=0x810fe00) at /data/OpenOffice/ood680-m4/configmgr/source/treecache/treemanager.cxx:287
 
813
#30 0xa3bfae8c in configmgr::TreeManager::dispose (this=0x810fe00) at /data/OpenOffice/ood680-m4/configmgr/source/treecache/treemanager.cxx:138
 
814
#31 0xa3d0c81e in configmgr::OProviderImpl::dispose (this=0x80eca30) at /data/OpenOffice/ood680-m4/configmgr/source/api2/providerimpl.cxx:379
 
815
#32 0xa3d0ef51 in configmgr::OConfigurationProvider::disposing (this=0x80ec2b0) at /data/OpenOffice/ood680-m4/configmgr/source/api2/confprovider2.cxx:339
 
816
#33 0xb765c2a5 in cppu::WeakComponentImplHelperBase::dispose () from ./libuno_cppuhelpergcc3.so.3
 
817
#34 0xa3bc5407 in cppu::WeakComponentImplHelper1<com::sun::star::lang::XServiceInfo>::dispose (this=0x80ec2b0)
 
818
    at /opt/OpenOffice/ood680-m4/solver/680/unxlngi6.pro/inc/cppuhelper/compbase1.hxx:91
 
819
#35 0xa3d0730a in configmgr::OProvider::disposing (this=0x80ec2b0) at /data/OpenOffice/ood680-m4/configmgr/source/api2/provider.cxx:218
 
820
#36 0xa3d0898a in configmgr::OProviderDisposingListener::disposing (this=0x80e75a8, rEvt=@0xbfe36684)
 
821
    at /data/OpenOffice/ood680-m4/configmgr/source/api2/provider.cxx:95
 
822
#37 0xb7663f1a in cppu::OInterfaceContainerHelper::disposeAndClear () from ./libuno_cppuhelpergcc3.so.3
 
823
#38 0xb76640f6 in cppu::OMultiTypeInterfaceContainerHelper::disposeAndClear () from ./libuno_cppuhelpergcc3.so.3
 
824
#39 0xb765c29a in cppu::WeakComponentImplHelperBase::dispose () from ./libuno_cppuhelpergcc3.so.3
 
825
#40 0xb766d24f in cppu::WeakComponentImplHelper2<com::sun::star::uno::XComponentContext, com::sun::star::container::XNameContainer>::dispose ()
 
826
   from ./libuno_cppuhelpergcc3.so.3
 
827
#41 0x08074d9e in desktop::Desktop::DestroyApplicationServiceManager ()
 
828
#42 0x0806716a in desktop::Desktop::DeInit ()
 
829
#43 0xb7d4ed90 in DeInitVCL () from ./libvcl680li.so
 
830
#44 0xb7d4f28a in ImplSVMain () from ./libvcl680li.so
 
831
#45 0xb7d4f2f3 in SVMain () from ./libvcl680li.so
 
832
#46 0x08064641 in sal_main ()
 
833
#47 0xb6e7087c in __libc_start_main (main=0x8064664 <main>, argc=2, ubp_av=0xbfe36834, init=0x807fb50 <__libc_csu_init>, fini=0x807fb40 <__libc_csu_fini>, 
 
834
    rtld_fini=0xb7f90550 <_dl_fini>, stack_end=0xbfe3682c) at libc-start.c:231
 
835
#48 0x08064571 in _start ()
 
836
 
 
837
 
 
838
Binning the 'source/treecache' directory gives:
 
839
 
 
840
../unxlngi6.pro/slo/providerimpl.o: In function `configmgr::OProviderImpl::initSession(configmgr::ContextReader const&)':
 
841
/data/OpenOffice/ood680-m4/configmgr/source/api2/providerimpl.cxx:233: undefined reference to `configmgr::CacheFactory::instance()'
 
842
/data/OpenOffice/ood680-m4/configmgr/source/api2/providerimpl.cxx:233: undefined reference to `configmgr::CacheFactory::createCacheManager(com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&)'
 
843
../unxlngi6.pro/slo/providerimpl.o: In function `configmgr::OProviderImpl::dispose()':
 
844
/data/OpenOffice/ood680-m4/configmgr/source/api2/providerimpl.cxx:379: undefined reference to `configmgr::TreeManager::dispose()'
 
845
collect2: ld returned 1 exit status
 
846
 
 
847
          + All goes through the treemanager.hxx interface [simple]
 
848
 
 
849
** TODO:
 
850
    + remove 'Segment'
 
851
 
 
852
 
 
853
+ Binned 'SegmentID' (string) in error ...
 
854
    + axed 'SegmentAddress' in error [?!]
 
855
 
 
856
+ Next:
 
857
    + 'Allocator' ?
 
858
    + 'Accessor' ?
 
859
    + bin 'SegmentId' (?)
 
860
    + bin 'SegmentAddress' (?)
 
861
 
 
862
    + Accessor:
 
863
        + calls acquire/release ReadAccess 
 
864
        + source/data/ updateAccessor ...
 
865
        + Read & Write access are the same thing [!?] :-)
 
866
            + just holding the lock ...
 
867
    + UpdateAccessor
 
868
        + 'downgrade' - used ?
 
869
    + why lock ?
 
870
        + no 2 threads concurrently writing the same
 
871
          memory being 'accessed' - but ...
 
872
            + if we have a ptr to it anyway, surely
 
873
              we must protect lifecycle ?
 
874
            + who has a pointer to it ?
 
875
 
 
876
    + re-test with just debug=true on ...
 
877
 
 
878
            + retain it's locking semantic.
 
879
 
 
880
    + remove bogus Accessors [ not all ]
 
881
        + doGetDataSegmentForUpdate
 
882
 
 
883
    killed Allocator, Heap, HeapManager, DataLock (->Segment)
 
884
    Accessor -> just a locking wrapper
 
885
 
 
886
 
 
887
* No performance hit *
 
888
 
 
889
after:
 
890
 
 
891
001763 1 } PERFORMANCE - DesktopOpenClients_Impl()
 
892
001629 1 } PERFORMANCE - DesktopOpenClients_Impl()
 
893
001700 1 } PERFORMANCE - DesktopOpenClients_Impl()
 
894
001747 1 } PERFORMANCE - DesktopOpenClients_Impl()
 
895
 
 
896
before:
 
897
 
 
898
001794 1 } PERFORMANCE - DesktopOpenClients_Impl()
 
899
001837 1 } PERFORMANCE - DesktopOpenClients_Impl()
 
900
001708 1 } PERFORMANCE - DesktopOpenClients_Impl()
 
901
001760 1 } PERFORMANCE - DesktopOpenClients_Impl()
 
902
 
 
903
 
 
904
Configmgr comments:
 
905
 
 
906
> [*] Any tree structure growing from one root node conceptually has an 
 
907
> own segment. Possible trees are: the entire data tree for one 
 
908
> 'component' in the cache, all templates in the cache as one tree (with 
 
909
> an artificial root node) and the data tree for a 'set' element (template 
 
910
> instance) that is not currently contained in a set. The last kind is 
 
911
> local to a 'view' and never shared.
 
912
 
913
> >     All allocation is now done from the global heap.
 
914
> > 
 
915
 
916
> I'd suggest to use rtl_(de)allocate directly instead of 
 
917
> new/new[]/delete/delete[] for the low-level allocations.
 
918
 
919
 
 
920
** reinterpret_cast<> is reqired:
 
921
 
 
922
> (I admit to 
 
923
> sometimes using constructor-style casts for numerical conversions that 
 
924
> could be done with static_cast, but for pointers and references only the 
 
925
> verbose casts should be used.
 
926
 
 
927
** More easy / low-hanging fruit.
 
928
 
 
929
>- The separation between TreeManager and CacheController and the two 
 
930
> slightly different Cache -Data, -Line, -Access hierarchies. The 
 
931
> separation between a process that handles loading/storing and a client 
 
932
> process was supposed to be between them.
 
933
>
 
934
> - Additional abstractions (Tree + Accessor -> view::Tree) and other 
 
935
> complexity in the view layer ('treemgr' directory). That was always on 
 
936
> top of my list of things to fix - but also the most complex one. (There 
 
937
> are a few bugs associated to that as well.)
 
938
 
 
939
> Where you say
 
940
>   #warning This looks -totally- whacked out !
 
941
> you are right.
 
942
 
 
943
** bin that code
 
944
 
 
945
>>       My 1 remaining concern is that (perhaps) the 'Free a whole Segment'
 
946
>> thing is actually relied upon, but I suspect if so, it's symptomatic of
 
947
>> a leak somewhere ;-) [ at least now we can detect leaks more easily,
 
948
>> since we don't hold pointers to all allocated blocks ;-].
 
949
>> 
 
950
>
 
951
>Of course if there was a concious reliance on that feature it wasn't
 
952
>really a leak. It may well be the case that discarding an expired
 
953
>cache segment or a 'detached set element' segment - after inserting
 
954
>it, when disposing it or when the entire view goes away (the latter
 
955
>two should be similar) - does not bother to iterate the data
 
956
>structures within to release individual pieces.
 
957
 
 
958
 
 
959
 
 
960
** freeTree problem:
 
961
 
 
962
==4473== Invalid read of size 4
 
963
==4473==    at 0x29631DC9: configmgr::sharable::NodeInfo::getName() const (node.cxx:85)
 
964
==4473==    by 0x29631E0C: configmgr::sharable::Node::getName() const (node.cxx:422)
 
965
==4473==    by 0x294A776D: configmgr::data::NodeAccess::getName() const (nodeaccess.hxx:88)
 
966
==4473==    by 0x294A5D28: configmgr::CacheLine::internalGetNode(configmgr::memory::Accessor const&, configmgr::configuration::AbsolutePath const&) const (cacheline.cxx:208)
 
967
==4473==    by 0x294A5F4F: configmgr::CacheLine::getNode(configmgr::memory::Accessor const&, configmgr::configuration::AbsolutePath const&) const (cacheline.cxx:222)
 
968
==4473==    by 0x294A0CF3: configmgr::CacheData::internalGetNode(configmgr::memory::Accessor const&, configmgr::configuration::AbsolutePath const&) const (cachedata.cxx:289)
 
969
==4473==    by 0x294A11DF: configmgr::CacheData::acquireNode(configmgr::memory::Accessor const&, configmgr::configuration::AbsolutePath const&) (cachedata.cxx:325)
 
970
==4473==    by 0x2949C4AA: configmgr::CacheClientAccess::acquireNode(configmgr::memory::Accessor const&, configmgr::configuration::AbsolutePath const&) (cacheaccess.cxx:138)
 
971
==4473==    by 0x294B7396: configmgr::TreeManager::requestSubtree(configmgr::configuration::AbsolutePath const&, configmgr::RequestOptions const&) (treemanager.cxx:374)
 
972
==4473==    by 0x295C9658: configmgr::OProviderImpl::requestSubtree(configmgr::configuration::AbsolutePath const&, configmgr::RequestOptions const&) (providerimpl.cxx:431)
 
973
==4473==    by 0x295C9A61: configmgr::OProviderImpl::buildUpdateAccess(rtl::OUString const&, configmgr::RequestOptions const&, long) (providerimpl.cxx:626)
 
974
==4473==    by 0x295CF63A: configmgr::OConfigurationProviderImpl::createUpdateAccess(com::sun::star::uno::Sequence<com::sun::star::uno::Any> const&) (confproviderimpl2.cxx:143)
 
975
==4473==    by 0x295CCAC5: configmgr::OConfigurationProvider::createInstanceWithArguments(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::uno::Any> const&) (confprovider2.cxx:367)
 
976
==4473==    by 0x807D727: desktop::LanguageSelection::getConfigAccess(char const*, unsigned char) (in /opt/HHInstall/program/soffice.bin)
 
977
==4473==    by 0x807E438: desktop::LanguageSelection::prepareLanguage() (in /opt/HHInstall/program/soffice.bin)
 
978
==4473==    by 0x806B0E8: desktop::Desktop::Init() (in /opt/HHInstall/program/soffice.bin)
 
979
==4473==    by 0x40B1D46: InitVCL(com::sun::star::uno::Reference<com::sun::star::lang::XMultiServiceFactory> const&) (in /data/OpenOffice/ooe680-m2/vcl/unxlngi6.pro/lib/libvcl680li.so)
 
980
==4473==    by 0x40B1EA3: ImplSVMain() (in /data/OpenOffice/ooe680-m2/vcl/unxlngi6.pro/lib/libvcl680li.so)
 
981
==4473==    by 0x40B1FB0: SVMain() (in /data/OpenOffice/ooe680-m2/vcl/unxlngi6.pro/lib/libvcl680li.so)
 
982
==4473==    by 0x80644F0: sal_main (in /opt/HHInstall/program/soffice.bin)
 
983
==4473==    by 0x506987B: (below main) (libc-start.c:231)
 
984
 
 
985
==4473==  Address 0x298F3320 is 16 bytes inside a block of size 96 free'd
 
986
==4473==    at 0x4020FB0: free (vg_replace_malloc.c:233)
 
987
==4473==    by 0x49D3926: rtl_freeMemory (in /opt/HHInstall/program/libuno_sal.so.3)
 
988
==4473==    by 0x29623EFA: configmgr::memory::SimpleHeapManagerBase::deallocateMemory(unsigned long) (simpleheap.cxx:231)
 
989
==4473==    by 0x296240F5: configmgr::memory::SimpleCheckingHeapManager::deallocate(configmgr::memory::Opaque_*, unsigned long) (simpleheap.cxx:471)
 
990
==4473==    by 0x2962C9BB: configmgr::memory::Heap::deallocate(unsigned long) (heap.hxx:82)
 
991
==4473==    by 0x2962C9DC: configmgr::memory::SegmentHeap::deallocate(unsigned long) (segmentheap.hxx:96)
 
992
==4473==    by 0x2962C6D4: configmgr::memory::Allocator::deallocate(unsigned long) const (updateaccessor.cxx:122)
 
993
==4473==    by 0x2962D114: configmgr::data::DataTreeCleanup::destroyTree(configmgr::data::TreeAddress) (builddata.cxx:1207)
 
994
==4473==    by 0x2962D30E: configmgr::data::destroyTree(configmgr::memory::UpdateAccessor&, configmgr::data::TreeAddress) (builddata.cxx:480)
 
995
==4473==    by 0x29635177: configmgr::data::TreeAccessor::freeTree(configmgr::memory::UpdateAccessor&, configmgr::data::TreeAddress) (treeaccessor.cxx:80)
 
996
==4473==    by 0x294A631B: configmgr::CacheLine::~CacheLine() (cacheline.cxx:108)
 
997
==4473==    by 0x294948D0: salhelper::SimpleReferenceObject::release() (simplereferenceobject.hxx:98)
 
998
==4473==    by 0x294948F3: rtl::Reference<configmgr::CacheLine>::~Reference() (ref.hxx:111)
 
999
==4473==    by 0x294A09C5: configmgr::CacheData::releaseModule(configmgr::configuration::Name const&, bool) (cachedata.cxx:410)
 
1000
==4473==    by 0x2949C1BA: configmgr::CacheClientAccess::releaseNode(configmgr::configuration::AbsolutePath const&) (cacheaccess.cxx:157)
 
1001
==4473==    by 0x294B5758: configmgr::TreeManager::releaseSubtree(configmgr::configuration::AbsolutePath const&, configmgr::RequestOptions const&) (treemanager.cxx:580)
 
1002
==4473==    by 0x295CA3E0: configmgr::OProviderImpl::releaseSubtree(configmgr::configuration::AbsolutePath const&, configmgr::RequestOptions const&) (providerimpl.cxx:467)
 
1003
==4473==    by 0x295E920F: configmgr::configapi::ApiRootTreeImpl::releaseData() (apitreeimplobj.cxx:833)
 
1004
==4473==    by 0x295EAF73: configmgr::configapi::ApiRootTreeImpl::disposeTree() (apitreeimplobj.cxx:568)
 
1005
==4473==    by 0x295E82EB: configmgr::configapi::RootElement::disposeTree() (apitreeaccess.cxx:129)
 
1006
==4473==    by 0x295F9008: configmgr::configapi::implDisposeObject(configmgr::configapi::NodeAccess&, configmgr::configapi::RootElement&) (elementimpl.cxx:393)
 
1007
==4473==    by 0x295F722B: configmgr::BasicRootElement::release() (elementaccess.cxx:92)
 
1008
==4473==    by 0x295FC2EA: configmgr::ORootElementGroupInfo::release() (groupobjects.cxx:302)
 
1009
==4473==    by 0x807E3DA: desktop::LanguageSelection::prepareLanguage() (in /opt/HHInstall/program/soffice.bin)
 
1010
==4473==    by 0x806B0E8: desktop::Desktop::Init() (in /opt/HHInstall/program/soffice.bin)
 
1011
==4473==    by 0x40B1D46: InitVCL(com::sun::star::uno::Reference<com::sun::star::lang::XMultiServiceFactory> const&) (in /data/OpenOffice/ooe680-m2/vcl/unxlngi6.pro/lib/libvcl680li.so)
 
1012
==4473==    by 0x40B1EA3: ImplSVMain() (in /data/OpenOffice/ooe680-m2/vcl/unxlngi6.pro/lib/libvcl680li.so)
 
1013
==4473==    by 0x40B1FB0: SVMain() (in /data/OpenOffice/ooe680-m2/vcl/unxlngi6.pro/lib/libvcl680li.so)
 
1014
==4473==    by 0x80644F0: sal_main (in /opt/HHInstall/program/soffice.bin)
 
1015
==4473==    by 0x506987B: (below main) (libc-start.c:231)
 
1016
 
 
1017
 
 
1018
** Substantial chunks of memory wasteage:
 
1019
 
 
1020
        typedef std::set<INode*, ltNode> ChildList;
 
1021
 
 
1022
318k - allocated in these set nodes ...
 
1023
     + [ on writer startup ]
 
1024
        
 
1025
        class ChildListSet {
 
1026
                ChildList m_aChildList;
 
1027
                
 
1028
                ChildListSet(ChildListSet const&);
 
1029
        ChildListSet& operator=(ChildListSet const& aSet);
 
1030
        public:
 
1031
                ChildList& GetSet() {return m_aChildList;}
 
1032
                ChildList const& GetSet() const {return m_aChildList;}
 
1033
 
 
1034
                ChildListSet() {}
 
1035
        ChildListSet(ChildListSet const&, treeop::DeepChildCopy);
 
1036
                ~ChildListSet();
 
1037
        };      
 
1038
        
 
1039
michael@t60p:/opt/OpenOffice/OOE680_m6/configmgr> grep -R 'GetSet' source
 
1040
source/tree/cmtree.cxx:         for(ChildList::iterator it = aSet.GetSet().begin();
 
1041
source/tree/cmtree.cxx:                 it != aSet.GetSet().end();
 
1042
source/tree/cmtree.cxx:         for (ChildList::iterator it2 = m_aChildren.GetSet().begin();
 
1043
source/tree/cmtree.cxx:                 it2 != m_aChildren.GetSet().end();
 
1044
source/tree/cmtree.cxx:         ChildList::iterator it = m_aChildren.GetSet().find(&searchObj);
 
1045
source/tree/cmtree.cxx:         if (it == m_aChildren.GetSet().end())
 
1046
source/tree/cmtree.cxx:                 m_aChildren.GetSet().insert(aNode.get());
 
1047
source/tree/cmtree.cxx:         ChildList::const_iterator it = m_aChildren.GetSet().find(&searchObj);
 
1048
source/tree/cmtree.cxx:         if (m_aChildren.GetSet().end() != it)
 
1049
source/tree/cmtree.cxx:                 m_aChildren.GetSet().erase(it);
 
1050
source/tree/cmtree.cxx:         for(ChildList::const_iterator it = m_aChildren.GetSet().begin();
 
1051
source/tree/cmtree.cxx:                 it != m_aChildren.GetSet().end();
 
1052
source/tree/cmtree.cxx:         ChildList::iterator it = m_aChildren.GetSet().begin();
 
1053
source/tree/cmtree.cxx:         while( it != m_aChildren.GetSet().end() )
 
1054
source/tree/subtree.hxx:                ChildList& GetSet() {return m_aChildList;}
 
1055
source/tree/subtree.hxx:                ChildList const& GetSet() const {return m_aChildList;}
 
1056
 
 
1057
        I'm also looking at the Subtree set usage:
 
1058
 
 
1059
        http://go-oo.org/~michael/sortedsizes.ods
 
1060
 
 
1061
        My concern here is the 16bytes per RBTree node (used in the set), at
 
1062
least allocation here shows up on the profile.
 
1063
 
 
1064
        It seems that 90% of these sorted sets are 8 items or less, and thus (I
 
1065
suspect) rather fast to search, well, at least indistinguishable from
 
1066
the order of the Set. The RBTree overhead for these <= 8 sets is ~250k
 
1067
(malloc), overall 500k. I'm sure we can do better.
 
1068
 
 
1069
    + a sorted vector instead !?
 
1070
 
 
1071
number        length:
 
1072
   1544       1 
 
1073
    303       2 
 
1074
   2162       3 
 
1075
    275       4 
 
1076
     50       5 
 
1077
    151       6 
 
1078
    706       7 
 
1079
     39       8 
 
1080
     79       9 
 
1081
    124      10 
 
1082
     87      11 
 
1083
     27      12 
 
1084
     15      13 
 
1085
     75      14 
 
1086
      3      15 
 
1087
     77      16 
 
1088
     11      17 
 
1089
     10      18 
 
1090
     15      19 
 
1091
     10      20 
 
1092
      8      21 
 
1093
      3      22 
 
1094
      3      23 
 
1095
      3      24 
 
1096
      6      25 
 
1097
      5      26 
 
1098
      1      27 
 
1099
      3      30 
 
1100
      7      31 
 
1101
      1      32 
 
1102
      2      37 
 
1103
      4      38 
 
1104
      1      39 
 
1105
      1      41 
 
1106
      3      42 
 
1107
      1      44 
 
1108
      1      46 
 
1109
      1      49 
 
1110
      1      54 
 
1111
      1     107 
 
1112
      1     174 
 
1113
      2     331 
 
1114
      2     348 
 
1115
      1     692 
 
1116
      1     694 
 
1117
 
 
1118
 
 
1119
* Write regression tests for cmtree.cxx code ...
 
1120
    + commit them for sb to poke at ...
 
1121
        + link those objs directly ... (?)
 
1122
 
 
1123
 
 
1124
--- source/treecache/cachecontroller.cxx        16 Jan 2007 12:18:23 -0000      1.18.24.6
 
1125
+++ source/treecache/cachecontroller.cxx        7 Feb 2007 10:07:43 -0000
 
1126
@@ -560,7 +560,9 @@
 
1127
         addTemplates(backend::ComponentData(aMultiTemplates, aModuleName));
 
1128
 
 
1129
     }
 
1130
+#if defined __GNUC__
 
1131
 #warning unwind locking implications here too ... 'getTemplateTree' ...
 
1132
+#endif
 
1133
     data::TreeAddress aTemplateAddr = m_aTemplates.getTemplateTree(aTemplateLocation);
 
1134
     if (aTemplateAddr == NULL)
 
1135
         throw uno::Exception(::rtl::OUString::createFromAscii("Unknown template. Type description could not be found in the given module."), NULL);
 
1136
 
 
1137