Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
c19bd769
Commit
c19bd769
authored
Dec 07, 2011
by
Ian Lance Taylor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libgo: Add back tests of syscall time.
From-SVN: r182075
parent
598fd331
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
9 deletions
+33
-9
libgo/go/runtime/export_test.go
+2
-5
libgo/go/runtime/proc_test.go
+0
-4
libgo/runtime/proc.c
+31
-0
No files found.
libgo/go/runtime/export_test.go
View file @
c19bd769
...
@@ -18,11 +18,8 @@ var F64toint = f64toint
...
@@ -18,11 +18,8 @@ var F64toint = f64toint
func
entersyscall
()
func
entersyscall
()
func
exitsyscall
()
func
exitsyscall
()
func
LockedOSThread
()
bool
func
golockedOSThread
()
bool
/* Useless for gccgo.
var
Entersyscall
=
entersyscall
var
Entersyscall
=
entersyscall
var
Exitsyscall
=
exitsyscall
var
Exitsyscall
=
exitsyscall
var
LockedOSThread
=
golockedOSThread
*/
libgo/go/runtime/proc_test.go
View file @
c19bd769
...
@@ -74,8 +74,6 @@ func BenchmarkStackGrowth(b *testing.B) {
...
@@ -74,8 +74,6 @@ func BenchmarkStackGrowth(b *testing.B) {
}
}
}
}
/* These benchmarks are meaningless for gccgo.
func
BenchmarkSyscall
(
b
*
testing
.
B
)
{
func
BenchmarkSyscall
(
b
*
testing
.
B
)
{
const
CallsPerSched
=
1000
const
CallsPerSched
=
1000
procs
:=
runtime
.
GOMAXPROCS
(
-
1
)
procs
:=
runtime
.
GOMAXPROCS
(
-
1
)
...
@@ -125,5 +123,3 @@ func BenchmarkSyscallWork(b *testing.B) {
...
@@ -125,5 +123,3 @@ func BenchmarkSyscallWork(b *testing.B) {
<-
c
<-
c
}
}
}
}
*/
libgo/runtime/proc.c
View file @
c19bd769
...
@@ -1156,6 +1156,26 @@ runtime_malg(int32 stacksize, byte** ret_stack, size_t* ret_stacksize)
...
@@ -1156,6 +1156,26 @@ runtime_malg(int32 stacksize, byte** ret_stack, size_t* ret_stacksize)
return
newg
;
return
newg
;
}
}
/* For runtime package testing. */
void
runtime_testing_entersyscall
(
void
)
__asm__
(
"libgo_runtime.runtime.entersyscall"
);
void
runtime_testing_entersyscall
()
{
runtime_entersyscall
();
}
void
runtime_testing_exitsyscall
(
void
)
__asm__
(
"libgo_runtime.runtime.exitsyscall"
);
void
runtime_testing_exitsyscall
()
{
runtime_exitsyscall
();
}
G
*
G
*
__go_go
(
void
(
*
fn
)(
void
*
),
void
*
arg
)
__go_go
(
void
(
*
fn
)(
void
*
),
void
*
arg
)
{
{
...
@@ -1330,6 +1350,17 @@ runtime_lockedOSThread(void)
...
@@ -1330,6 +1350,17 @@ runtime_lockedOSThread(void)
return
g
->
lockedm
!=
nil
&&
m
->
lockedg
!=
nil
;
return
g
->
lockedm
!=
nil
&&
m
->
lockedg
!=
nil
;
}
}
// for testing of callbacks
_Bool
runtime_golockedOSThread
(
void
)
asm
(
"libgo_runtime.runtime.golockedOSThread"
);
_Bool
runtime_golockedOSThread
(
void
)
{
return
runtime_lockedOSThread
();
}
// for testing of wire, unwire
// for testing of wire, unwire
uint32
uint32
runtime_mid
()
runtime_mid
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment