Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1068)

Issue 6242070: Instance counting for SkRefCnt-derived objects (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 11 months ago by robertphillips
Modified:
11 years, 11 months ago
Reviewers:
bungeman, bsalomon, reed1
CC:
skia-review_googlegroups.com
Base URL:
http://skia.googlecode.com/svn/trunk/
Visibility:
Public.

Description

What do you all think about this as a debugging aide? Right now (on a trimmed down GM) 22 SkRefCnt-derived objects are being reported at the end of gmmain. After the assert only the GrGLInterface stored in GrGLCreateDebugInterface is being deleted -> 21 objects MIA.

Patch Set 1 #

Patch Set 2 : Revised version of instance counting (macro-based) #

Total comments: 6

Patch Set 3 : Removed need to modify derived class ctors & dtors #

Patch Set 4 : Moved macros to their own file #

Patch Set 5 : Missed core.gyp change #

Patch Set 6 : Fixed copyright notice on new files #

Patch Set 7 : Fixed problem in CanvasTest #

Patch Set 8 : fixed tests.gyp #

Unified diffs Side-by-side diffs Delta from patch set Stats (+97 lines, -5 lines) Patch
M gm/gmmain.cpp View 1 2 3 4 5 6 7 5 chunks +10 lines, -3 lines 0 comments Download
M gyp/core.gyp View 1 2 3 4 5 6 7 2 chunks +2 lines, -0 lines 0 comments Download
A include/core/SkInstCnt.h View 1 2 3 4 5 1 chunk +51 lines, -0 lines 0 comments Download
M include/core/SkRefCnt.h View 1 2 3 4 5 6 7 2 chunks +3 lines, -0 lines 0 comments Download
M include/gpu/GrResource.h View 1 2 3 4 5 6 7 1 chunk +2 lines, -0 lines 0 comments Download
A src/core/SkRefCnt.cpp View 1 2 3 4 5 1 chunk +12 lines, -0 lines 0 comments Download
M src/gpu/GrResource.cpp View 1 2 3 4 5 6 7 1 chunk +2 lines, -0 lines 0 comments Download
M tests/CanvasTest.cpp View 1 2 3 4 5 6 7 2 chunks +15 lines, -2 lines 0 comments Download

Messages

Total messages: 18
robertphillips
11 years, 11 months ago (2012-05-30 19:07:55 UTC) #1
bsalomon
On 2012/05/30 19:07:55, robertphillips wrote: In general I'm interested in this type of debugging facility. ...
11 years, 11 months ago (2012-05-30 19:32:22 UTC) #2
robertphillips
Sure - I'm ready whenever you all are.
11 years, 11 months ago (2012-05-30 19:52:08 UTC) #3
robertphillips
In addition to being macro-based, this CL also updates GrResource to illustrate how invasive this ...
11 years, 11 months ago (2012-05-30 21:44:56 UTC) #4
bsalomon
On 2012/05/30 21:44:56, robertphillips wrote: > In addition to being macro-based, this CL also updates ...
11 years, 11 months ago (2012-05-31 12:39:53 UTC) #5
bsalomon
http://codereview.appspot.com/6242070/diff/6/include/core/SkRefCnt.h File include/core/SkRefCnt.h (right): http://codereview.appspot.com/6242070/diff/6/include/core/SkRefCnt.h#newcode30 include/core/SkRefCnt.h:30: static int32_t getInstanceCount() { \ cap for static (GetInstanceCount()) ...
11 years, 11 months ago (2012-05-31 12:40:01 UTC) #6
bungeman
This may be more of a lament than a suggestion, but SkPostConfig.h has SkNEW and ...
11 years, 11 months ago (2012-05-31 14:02:31 UTC) #7
robertphillips
Not super cool but hopefully better. http://codereview.appspot.com/6242070/diff/6/include/core/SkRefCnt.h File include/core/SkRefCnt.h (right): http://codereview.appspot.com/6242070/diff/6/include/core/SkRefCnt.h#newcode30 include/core/SkRefCnt.h:30: static int32_t getInstanceCount() ...
11 years, 11 months ago (2012-05-31 14:43:51 UTC) #8
reed1
much nicer. can we move the macro definitions into their own header? Doesn't seem like ...
11 years, 11 months ago (2012-05-31 14:46:43 UTC) #9
bsalomon
Definitely better.
11 years, 11 months ago (2012-05-31 14:58:57 UTC) #10
robertphillips
Moved macros. Brian - any feelings on hiding SkRefCnt's definition in another file?
11 years, 11 months ago (2012-05-31 15:20:16 UTC) #11
bsalomon
On 2012/05/31 15:20:16, robertphillips wrote: > Moved macros. Brian - any feelings on hiding SkRefCnt's ...
11 years, 11 months ago (2012-05-31 15:26:49 UTC) #12
reed1
new files should get the new copyright /* * Copyright 2012 Google Inc. * * ...
11 years, 11 months ago (2012-05-31 17:10:46 UTC) #13
robertphillips
On 2012/05/31 17:10:46, reed1 wrote: > new files should get the new copyright > > ...
11 years, 11 months ago (2012-06-04 12:40:04 UTC) #14
reed1
lgtm lets prepare the DEPS roll w/ associated skia.gyp change right after this lands.
11 years, 11 months ago (2012-06-04 12:42:30 UTC) #15
robertphillips
committed as r4162
11 years, 11 months ago (2012-06-05 15:41:26 UTC) #16
robertphillips
rolled back in r4164
11 years, 11 months ago (2012-06-05 19:27:15 UTC) #17
robertphillips
11 years, 11 months ago (2012-06-05 19:50:53 UTC) #18
received verbal LGTM on CanvasTest changes from Brian

committed as r4170
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b