better memuse graph
This commit is contained in:
parent
b3d31ced79
commit
c0b8b67987
@ -154,9 +154,6 @@ void vips__region_take_ownership( struct _VipsRegion *reg );
|
|||||||
void vips__region_check_ownership( struct _VipsRegion *reg );
|
void vips__region_check_ownership( struct _VipsRegion *reg );
|
||||||
void vips__region_no_ownership( struct _VipsRegion *reg );
|
void vips__region_no_ownership( struct _VipsRegion *reg );
|
||||||
|
|
||||||
int vips__region_start( struct _VipsRegion *reg );
|
|
||||||
void vips__region_stop( struct _VipsRegion *reg );
|
|
||||||
|
|
||||||
typedef int (*VipsRegionFillFn)( struct _VipsRegion *, void * );
|
typedef int (*VipsRegionFillFn)( struct _VipsRegion *, void * );
|
||||||
int vips_region_fill( struct _VipsRegion *reg,
|
int vips_region_fill( struct _VipsRegion *reg,
|
||||||
VipsRect *r, VipsRegionFillFn fn, void *a );
|
VipsRect *r, VipsRegionFillFn fn, void *a );
|
||||||
|
@ -75,8 +75,8 @@
|
|||||||
/*
|
/*
|
||||||
#define DEBUG_MOVE
|
#define DEBUG_MOVE
|
||||||
#define DEBUG_ENVIRONMENT 1
|
#define DEBUG_ENVIRONMENT 1
|
||||||
#define DEBUG_CREATE
|
|
||||||
#define DEBUG
|
#define DEBUG
|
||||||
|
#define VIPS_DEBUG
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
@ -199,7 +199,7 @@ vips_region_finalize( GObject *gobject )
|
|||||||
|
|
||||||
/* Call a start function if no sequence is running on this VipsRegion.
|
/* Call a start function if no sequence is running on this VipsRegion.
|
||||||
*/
|
*/
|
||||||
int
|
static int
|
||||||
vips__region_start( VipsRegion *region )
|
vips__region_start( VipsRegion *region )
|
||||||
{
|
{
|
||||||
VipsImage *image = region->im;
|
VipsImage *image = region->im;
|
||||||
@ -229,7 +229,7 @@ vips__region_start( VipsRegion *region )
|
|||||||
|
|
||||||
/* Call a stop function if a sequence is running in this VipsRegion.
|
/* Call a stop function if a sequence is running in this VipsRegion.
|
||||||
*/
|
*/
|
||||||
void
|
static void
|
||||||
vips__region_stop( VipsRegion *region )
|
vips__region_stop( VipsRegion *region )
|
||||||
{
|
{
|
||||||
IMAGE *image = region->im;
|
IMAGE *image = region->im;
|
||||||
@ -267,7 +267,7 @@ vips_region_dispose( GObject *gobject )
|
|||||||
VipsImage *image = region->im;
|
VipsImage *image = region->im;
|
||||||
|
|
||||||
#ifdef VIPS_DEBUG
|
#ifdef VIPS_DEBUG
|
||||||
VIPS_DEBUG_MSG( "vips_region_dispose: " );
|
printf( "vips_region_dispose: \n" );
|
||||||
vips_object_print_name( VIPS_OBJECT( gobject ) );
|
vips_object_print_name( VIPS_OBJECT( gobject ) );
|
||||||
#endif /*VIPS_DEBUG*/
|
#endif /*VIPS_DEBUG*/
|
||||||
|
|
||||||
@ -493,6 +493,10 @@ vips_region_new( VipsImage *image )
|
|||||||
{
|
{
|
||||||
VipsRegion *region;
|
VipsRegion *region;
|
||||||
|
|
||||||
|
/*
|
||||||
|
printf( "vips_region_new: on image %p\n", image );
|
||||||
|
*/
|
||||||
|
|
||||||
/* Ref quickly, we want to make sure we keep the image around.
|
/* Ref quickly, we want to make sure we keep the image around.
|
||||||
* We can't use the property system, we need to be very threaded.
|
* We can't use the property system, we need to be very threaded.
|
||||||
*/
|
*/
|
||||||
|
24
tools/vipsprofile
Executable file → Normal file
24
tools/vipsprofile
Executable file → Normal file
@ -370,20 +370,30 @@ for thread in threads:
|
|||||||
for event in thread.events:
|
for event in thread.events:
|
||||||
draw_event(ctx, event)
|
draw_event(ctx, event)
|
||||||
|
|
||||||
|
memory_y = total_y * PIXELS_PER_GATE
|
||||||
|
|
||||||
|
label = "memory"
|
||||||
|
xbearing, ybearing, twidth, theight, xadvance, yadvance = \
|
||||||
|
ctx.text_extents(label)
|
||||||
|
ctx.move_to(0, memory_y + theight + 8)
|
||||||
|
ctx.set_source_rgb(1.00, 1.00, 1.00)
|
||||||
|
ctx.show_text(label)
|
||||||
|
|
||||||
memory = 0
|
memory = 0
|
||||||
|
ctx.move_to(LEFT_BORDER, memory_y + MEM_HEIGHT)
|
||||||
|
|
||||||
for event in all_events:
|
for event in all_events:
|
||||||
if event.memory:
|
if event.memory:
|
||||||
memory += event.size
|
memory += event.size
|
||||||
|
|
||||||
left = LEFT_BORDER + event.start * PIXELS_PER_SECOND
|
left = LEFT_BORDER + event.start * PIXELS_PER_SECOND
|
||||||
top = total_y * PIXELS_PER_GATE + MEM_HEIGHT
|
top = memory_y + MEM_HEIGHT - (MEM_HEIGHT * memory / peak_memory)
|
||||||
top -= MEM_HEIGHT * memory / peak_memory
|
|
||||||
width = 1
|
|
||||||
height = 1
|
|
||||||
|
|
||||||
ctx.rectangle(left, top, width, height)
|
ctx.line_to(left, top)
|
||||||
ctx.set_source_rgb(1.00, 1.00, 1.00)
|
|
||||||
ctx.fill()
|
ctx.set_line_width(1)
|
||||||
|
ctx.set_source_rgb(1.00, 1.00, 1.00)
|
||||||
|
ctx.stroke()
|
||||||
|
|
||||||
axis_y = total_y * PIXELS_PER_GATE + MEM_HEIGHT
|
axis_y = total_y * PIXELS_PER_GATE + MEM_HEIGHT
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user